],
"| void scroll_to_line" : [
"(int line) {",
- " this.notebook.el.page = 1;// code preview...",
+ " // code preview...",
" ",
- " GLib.Timeout.add(500, () => {",
+ " GLib.Timeout.add(100, () => {",
" ",
" ",
- "\t ",
+ "\t this.notebook.el.set_current_page(1);",
"\t ",
"\t\t var buf = this.sourceview.el.get_buffer();",
"\t ",
}
public void scroll_to_line (int line) {
- this.notebook.el.page = 1;// code preview...
+ // code preview...
- GLib.Timeout.add(500, () => {
+ GLib.Timeout.add(100, () => {
-
+ this.notebook.el.set_current_page(1);
var buf = this.sourceview.el.get_buffer();
],
"| void scroll_to_line" : [
"(int line) {",
- " this.notebook.el.page = 1;// code preview...",
- " ",
- " GLib.Timeout.add(500, () => {",
+ " // code preview...",
" ",
+ " GLib.Timeout.add(100, () => {",
" ",
+ "\t\tthis.notebook.el.set_current_page( 1 );",
"\t ",
"\t ",
"\t\t var buf = this.sourceview.el.get_buffer();",
}
public void scroll_to_line (int line) {
- this.notebook.el.page = 1;// code preview...
-
- GLib.Timeout.add(500, () => {
+ // code preview...
+ GLib.Timeout.add(100, () => {
+ this.notebook.el.set_current_page( 1 );
var buf = this.sourceview.el.get_buffer();
public void gotoLine(int line)
{
+ if (line < 0) {
+ return;
+ }
if (file.xtype == "PlainFile") {
this.switchState (State.CODEONLY);
- if (line> -1) {
- this.code_editor_tab.scroll_to_line(line);
- }
+
+ this.code_editor_tab.scroll_to_line(line);
+
} else {
this.switchState (State.PREVIEW);
if (file.project.xtype == "Gtk" && line> -1 ) {
// fixme - show the editing tab.
this.window_gladeview.scroll_to_line(line);
- }
+ } else {
+ this.window_rooview.scroll_to_line(line);
// fixme - what about Roo?
-
+ }
}
}