SF.net SVN: geany:[5828] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Thu Jun 2 21:15:37 UTC 2011
Revision: 5828
http://geany.svn.sourceforge.net/geany/?rev=5828&view=rev
Author: eht16
Date: 2011-06-02 21:15:37 +0000 (Thu, 02 Jun 2011)
Log Message:
-----------
Add ui_focus_current_document() and document_grab_focus().
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
trunk/src/document.h
trunk/src/ui_utils.c
trunk/src/ui_utils.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-05-30 18:37:07 UTC (rev 5827)
+++ trunk/ChangeLog 2011-06-02 21:15:37 UTC (rev 5828)
@@ -1,3 +1,9 @@
+2011-06-02 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/document.c, src/document.h, src/ui_utils.c, src/ui_utils.h:
+ Add ui_focus_current_document() and document_grab_focus().
+
+
2011-05-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* data/filetypes.java:
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2011-05-30 18:37:07 UTC (rev 5827)
+++ trunk/src/document.c 2011-06-02 21:15:37 UTC (rev 5828)
@@ -3129,3 +3129,9 @@
}
+void document_grab_focus(GeanyDocument *doc)
+{
+ g_return_if_fail(doc != NULL);
+
+ gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci));
+}
Modified: trunk/src/document.h
===================================================================
--- trunk/src/document.h 2011-05-30 18:37:07 UTC (rev 5827)
+++ trunk/src/document.h 2011-06-02 21:15:37 UTC (rev 5828)
@@ -267,4 +267,6 @@
gint document_compare_by_tab_order_reverse(gconstpointer a, gconstpointer b);
+void document_grab_focus(GeanyDocument *doc);
+
#endif
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2011-05-30 18:37:07 UTC (rev 5827)
+++ trunk/src/ui_utils.c 2011-06-02 21:15:37 UTC (rev 5828)
@@ -2572,3 +2572,11 @@
return icon;
}
+
+void ui_focus_current_document(void)
+{
+ GeanyDocument *doc = document_get_current();
+
+ if (doc != NULL)
+ document_grab_focus(doc);
+}
Modified: trunk/src/ui_utils.h
===================================================================
--- trunk/src/ui_utils.h 2011-05-30 18:37:07 UTC (rev 5827)
+++ trunk/src/ui_utils.h 2011-06-02 21:15:37 UTC (rev 5828)
@@ -327,4 +327,7 @@
GdkPixbuf *ui_get_mime_icon(const gchar *mime_type, GtkIconSize size);
+void ui_focus_current_document(void);
+
+
#endif
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