[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.1.0-20070705-12-g4f245d7)
The branch, master has been updated
via 4f245d7023eec872e5dd484530dff9a77ff77dfc (commit)
from 29f4868bb8ac570445da493c69afb91aafcf69d0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/src/x_compselect.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit 4f245d7023eec872e5dd484530dff9a77ff77dfc
Author: Carlos Nieves Onega <cnieves@xxxxxxxxxx>
Date: Sun Jul 8 19:47:14 2007 +0200
Set the focus to the filter entry only if it is visible.
In the compselect window, focus can be set to the filter entry only
if it is visible (i.e.: its ancestor is the current tab). Otherwise,
GTK is confused.
:100644 100644 296c6ca... df11b1b... M gschem/src/x_compselect.c
=========
Changes
=========
commit 4f245d7023eec872e5dd484530dff9a77ff77dfc
Author: Carlos Nieves Onega <cnieves@xxxxxxxxxx>
Date: Sun Jul 8 19:47:14 2007 +0200
Set the focus to the filter entry only if it is visible.
In the compselect window, focus can be set to the filter entry only
if it is visible (i.e.: its ancestor is the current tab). Otherwise,
GTK is confused.
diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index 296c6ca..df11b1b 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -181,6 +181,9 @@ x_compselect_callback_response (GtkDialog *dialog,
void
x_compselect_open (TOPLEVEL *toplevel)
{
+ GtkWidget *current_tab, *entry_filter;
+ GtkNotebook *compselect_notebook;
+
if (toplevel->cswindow == NULL) {
toplevel->cswindow = GTK_WIDGET (
g_object_new (TYPE_COMPSELECT,
@@ -203,7 +206,16 @@ x_compselect_open (TOPLEVEL *toplevel)
gtk_window_present (GTK_WINDOW(toplevel->cswindow));
}
gtk_editable_select_region(GTK_EDITABLE(COMPSELECT(toplevel->cswindow)->entry_filter), 0, -1);
- gtk_widget_grab_focus (GTK_WIDGET(COMPSELECT(toplevel->cswindow)->entry_filter));
+
+ /* Set the focus to the filter entry only if it is in the current
+ displayed tab */
+ compselect_notebook = GTK_NOTEBOOK(COMPSELECT(toplevel->cswindow)->viewtabs);
+ current_tab = gtk_notebook_get_nth_page(compselect_notebook,
+ gtk_notebook_get_current_page(compselect_notebook));
+ entry_filter = GTK_WIDGET(COMPSELECT(toplevel->cswindow)->entry_filter);
+ if (gtk_widget_is_ancestor(entry_filter, current_tab)) {
+ gtk_widget_grab_focus (entry_filter);
+ }
}
/*! \brief Closes the component selection dialog.
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs