[libgda] GdaBrowser: UI focus improvement



commit 13aa5a8ddadf950dcb0a39074548f4e0dd9b05bd
Author: Vivien Malerba <malerba gnome-db org>
Date:   Tue Sep 22 22:14:32 2009 +0200

    GdaBrowser: UI focus improvement
    
    when a favorite statement is selected, copy the SQL code
    in the current editor and give it the focus

 tools/browser/query-exec/query-exec-perspective.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tools/browser/query-exec/query-exec-perspective.c b/tools/browser/query-exec/query-exec-perspective.c
index 24acee3..8df6780 100644
--- a/tools/browser/query-exec/query-exec-perspective.c
+++ b/tools/browser/query-exec/query-exec-perspective.c
@@ -211,8 +211,11 @@ fav_selection_changed_cb (GtkWidget *widget, gint fav_id, BrowserFavoritesType f
 
 	nb = GTK_NOTEBOOK (perspective->priv->notebook);
 	page = gtk_notebook_get_nth_page (nb, gtk_notebook_get_current_page (nb));
+	if (!page)
+		return;
 	if (IS_QUERY_CONSOLE (page)) {
-		query_console_set_text (QUERY_CONSOLE (page), selection);	
+		query_console_set_text (QUERY_CONSOLE (page), selection);
+		gtk_widget_grab_focus (page);
 	}
 	else {
 		TO_IMPLEMENT;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]