Revision: 482 Author: eht16 Date: 2006-06-25 10:02:27 -0700 (Sun, 25 Jun 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=482&view=rev
Log Message: ----------- Remember the active page when toggling the sidebar. Simplified code for toggling messages window.
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c trunk/src/keybindings.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-06-25 14:43:09 UTC (rev 481) +++ trunk/ChangeLog 2006-06-25 17:02:27 UTC (rev 482) @@ -1,6 +1,9 @@ 2006-06-25 Enrico Troeger enrico.troeger@uvena.de
* README, doc/geany.docbook: Added license notice Scintilla. + * src/callbacks.c, src/keybindings.c: + Remember the active page when toggling the sidebar. Simplified code + for toggling messages window.
2006-06-25 Nick Treleaven nick.treleaven@btinternet.com
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2006-06-25 14:43:09 UTC (rev 481) +++ trunk/src/callbacks.c 2006-06-25 17:02:27 UTC (rev 482) @@ -939,8 +939,6 @@ GdkEventConfigure *event, gpointer user_data) { - //GtkWidget *vpaned1 = lookup_widget(app->window, "vpaned1"); - //gtk_paned_set_position(GTK_PANED(vpaned1), event->height - GEANY_MSGWIN_HEIGHT); app->geometry[0] = event->x; app->geometry[1] = event->y; app->geometry[2] = event->width; @@ -1163,13 +1161,9 @@ gpointer user_data) { if (app->msgwindow_visible) - { - gtk_container_remove(GTK_CONTAINER(lookup_widget(app->window, "vpaned1")), lookup_widget(app->window, "scrolledwindow1")); - } + gtk_widget_hide(lookup_widget(app->window, "scrolledwindow1")); else - { - gtk_container_add(GTK_CONTAINER(lookup_widget(app->window, "vpaned1")), lookup_widget(app->window, "scrolledwindow1")); - } + gtk_widget_show(lookup_widget(app->window, "scrolledwindow1")); app->msgwindow_visible = (app->msgwindow_visible) ? FALSE : TRUE; }
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2006-06-25 14:43:09 UTC (rev 481) +++ trunk/src/keybindings.c 2006-06-25 17:02:27 UTC (rev 482) @@ -627,6 +627,7 @@ static gboolean symbol = FALSE; static gboolean openfiles = FALSE; static gboolean is_visible = FALSE; + static gint active_page = -1;
/* this code is a bit confusing, but I want to keep the settings in the preferences dialog * synchronous with the real status of the sidebar, so we have to store the previous state when @@ -638,6 +639,9 @@ openfiles = app->treeview_openfiles_visible; app->treeview_symbol_visible = FALSE; app->treeview_openfiles_visible = FALSE; + // to remember the active page because GTK (e.g. 2.8.18) doesn't do it and shows always + // the last page (for unknown reason, with GTK 2.6.4 it works) + active_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(app->treeview_notebook)); } else { @@ -646,6 +650,7 @@ }
utils_treeviews_showhide(); + gtk_notebook_set_current_page(GTK_NOTEBOOK(app->treeview_notebook), active_page); }
static void cb_func_edit_duplicateline(void)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.