SF.net SVN: geany: [2602] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Mon May 19 14:33:50 UTC 2008


Revision: 2602
          http://geany.svn.sourceforge.net/geany/?rev=2602&view=rev
Author:   ntrel
Date:     2008-05-19 07:33:50 -0700 (Mon, 19 May 2008)

Log Message:
-----------
Fix Switch to Sidebar shortcut so that it works for whichever widget
is in the current sidebar notebook page (fixes #1967104).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/keybindings.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-05-19 12:52:38 UTC (rev 2601)
+++ trunk/ChangeLog	2008-05-19 14:33:50 UTC (rev 2602)
@@ -26,6 +26,9 @@
    when using documentation comments e.g. for TODO.
  * plugins/pluginmacros.h:
    Add deprecated p_encoding alias for p_encodings.
+ * src/keybindings.c:
+   Fix Switch to Sidebar shortcut so that it works for whichever widget
+   is in the current sidebar notebook page (fixes #1967104).
 
 
 2008-05-18  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2008-05-19 12:52:38 UTC (rev 2601)
+++ trunk/src/keybindings.c	2008-05-19 14:33:50 UTC (rev 2602)
@@ -1183,9 +1183,10 @@
 	if (ui_prefs.sidebar_visible)
 	{
 		gint page_num = gtk_notebook_get_current_page(GTK_NOTEBOOK(app->treeview_notebook));
-		GtkWidget *swin = gtk_notebook_get_nth_page(GTK_NOTEBOOK(app->treeview_notebook), page_num);
+		GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(app->treeview_notebook), page_num);
 
-		gtk_widget_grab_focus(gtk_bin_get_child(GTK_BIN(swin)));
+		/* gtk_widget_grab_focus() won't work because of the scrolled window containers */
+		gtk_widget_child_focus(page, GTK_DIR_TAB_FORWARD);
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list