Add ui_focus_current_document() and document_grab_focus().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5828 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
ecfab3e67a
commit
5141f14007
@ -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:
|
||||
|
@ -3129,3 +3129,9 @@ gint document_compare_by_tab_order_reverse(gconstpointer a, gconstpointer b)
|
||||
}
|
||||
|
||||
|
||||
void document_grab_focus(GeanyDocument *doc)
|
||||
{
|
||||
g_return_if_fail(doc != NULL);
|
||||
|
||||
gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci));
|
||||
}
|
||||
|
@ -267,4 +267,6 @@ gint document_compare_by_tab_order(gconstpointer a, gconstpointer b);
|
||||
|
||||
gint document_compare_by_tab_order_reverse(gconstpointer a, gconstpointer b);
|
||||
|
||||
void document_grab_focus(GeanyDocument *doc);
|
||||
|
||||
#endif
|
||||
|
@ -2572,3 +2572,11 @@ GdkPixbuf *ui_get_mime_icon(const gchar *mime_type, GtkIconSize size)
|
||||
return icon;
|
||||
}
|
||||
|
||||
|
||||
void ui_focus_current_document(void)
|
||||
{
|
||||
GeanyDocument *doc = document_get_current();
|
||||
|
||||
if (doc != NULL)
|
||||
document_grab_focus(doc);
|
||||
}
|
||||
|
@ -327,4 +327,7 @@ gint ui_get_gtk_settings_integer(const gchar *property_name, gint default_value)
|
||||
|
||||
GdkPixbuf *ui_get_mime_icon(const gchar *mime_type, GtkIconSize size);
|
||||
|
||||
void ui_focus_current_document(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user