SF.net SVN: geany: [1686] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Mon Jul 9 16:01:23 UTC 2007


Revision: 1686
          http://svn.sourceforge.net/geany/?rev=1686&view=rev
Author:   eht16
Date:     2007-07-09 09:01:23 -0700 (Mon, 09 Jul 2007)

Log Message:
-----------
Focus the editor widget after switching between files with the open files list.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-07-09 15:35:25 UTC (rev 1685)
+++ trunk/ChangeLog	2007-07-09 16:01:23 UTC (rev 1686)
@@ -11,6 +11,8 @@
  * src/symbols.c, tagmanager/php.c:
    Use CTags SVN version of PHP parser.
    Use only supported symbol types in the symbol view for PHP.
+ * src/treeviews.c: Focus the editor widget after switching between
+                    files with the open files list.
 
 
 2007-07-08  Enrico Tröger  <enrico.troeger at uvena.de>

Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c	2007-07-09 15:35:25 UTC (rev 1685)
+++ trunk/src/treeviews.c	2007-07-09 16:01:23 UTC (rev 1686)
@@ -414,6 +414,13 @@
 }
 
 
+static gboolean change_focus(GtkWidget *widget)
+{
+	gtk_widget_grab_focus(widget);
+	return FALSE;
+}
+
+
 static void on_openfiles_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
 {
 	GtkTreeIter iter;
@@ -427,6 +434,7 @@
 		gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook),
 					gtk_notebook_page_num(GTK_NOTEBOOK(app->notebook),
 					(GtkWidget*) doc_list[idx].sci));
+		g_idle_add((GSourceFunc) change_focus, GTK_WIDGET(doc_list[idx].sci));
 	}
 }
 


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