Revision: 379 Author: ntrel Date: 2006-05-30 11:03:19 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=379&view=rev
Log Message: ----------- Scroll session files in view after all resizing of the Scintilla widget and rename sci_scroll_to_line
Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c trunk/src/keyfile.c trunk/src/sciwrappers.c trunk/src/sciwrappers.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-05-30 15:30:36 UTC (rev 378) +++ trunk/ChangeLog 2006-05-30 18:03:19 UTC (rev 379) @@ -1,3 +1,10 @@ +2006-05-30 Nick Treleaven nick.treleaven@btinternet.com + + * src/keyfile.c, src/sciwrappers.c, src/sciwrappers.h, src/document.c: + Scroll session files in view after all resizing of the Scintilla + widget and rename sci_scroll_to_line. + + 2006-05-30 Enrico Troeger enrico.troeger@uvena.de
* src/dialogs.c, src/main.c:
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2006-05-30 15:30:36 UTC (rev 378) +++ trunk/src/document.c 2006-05-30 18:03:19 UTC (rev 379) @@ -531,8 +531,6 @@ filetype *use_ft = (ft != NULL) ? ft : filetypes_get_from_filename(utf8_filename);
sci_goto_pos(doc_list[idx].sci, pos, TRUE); - //if (app->main_window_realized) // avoids warnings, but doesn't scroll, so accept warning - sci_scroll_to_line(doc_list[idx].sci, sci_get_line_from_position(doc_list[idx].sci, pos) - 10);
if (readonly) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( lookup_widget(app->window, "set_file_readonly1")), TRUE);
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2006-05-30 15:30:36 UTC (rev 378) +++ trunk/src/keyfile.c 2006-05-30 18:03:19 UTC (rev 379) @@ -401,6 +401,21 @@ gtk_paned_set_position(GTK_PANED(lookup_widget(app->window, "hpaned1")), hpan_position); gtk_paned_set_position(GTK_PANED(lookup_widget(app->window, "vpaned1")), vpan_position); } + + // now the scintilla widget pages may need scrolling in view + if (app->pref_main_load_session) + { + gint idx; + guint tabnum = 0; + + while (tabnum < gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook))) + { + idx = document_get_n_idx(tabnum); + if (idx < 0) break; + sci_scroll_caret(doc_list[idx].sci); + tabnum++; + } + } }
Modified: trunk/src/sciwrappers.c =================================================================== --- trunk/src/sciwrappers.c 2006-05-30 15:30:36 UTC (rev 378) +++ trunk/src/sciwrappers.c 2006-05-30 18:03:19 UTC (rev 379) @@ -744,9 +744,9 @@ SSM(sci, SCI_SETKEYWORDS, k, (sptr_t) text); }
-void sci_scroll_to_line(ScintillaObject *sci, gint line) +void sci_scroll_lines(ScintillaObject *sci, gint lines) { - SSM(sci, SCI_LINESCROLL, 0, line); + SSM(sci, SCI_LINESCROLL, 0, lines); }
void sci_set_readonly(ScintillaObject *sci, gboolean readonly)
Modified: trunk/src/sciwrappers.h =================================================================== --- trunk/src/sciwrappers.h 2006-05-30 15:30:36 UTC (rev 378) +++ trunk/src/sciwrappers.h 2006-05-30 18:03:19 UTC (rev 379) @@ -137,7 +137,7 @@ void sci_target_end (ScintillaObject * sci, gint end); void sci_target_replace (ScintillaObject * sci, const gchar *text); void sci_set_keywords (ScintillaObject * sci, gint k, gchar *text); -void sci_scroll_to_line (ScintillaObject * sci, gint line); +void sci_scroll_lines (ScintillaObject * sci, gint lines); gint sci_get_lexer (ScintillaObject * sci); void sci_set_readonly (ScintillaObject * sci, gboolean readonly); gboolean sci_get_readonly (ScintillaObject * sci);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.