SF.net SVN: geany: [1103] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Fri Dec 15 18:33:29 UTC 2006
Revision: 1103
http://svn.sourceforge.net/geany/?rev=1103&view=rev
Author: eht16
Date: 2006-12-15 10:33:29 -0800 (Fri, 15 Dec 2006)
Log Message:
-----------
Bring the Find, Replace and FIF dialog back to top if they are already shown but lost focus.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-12-15 17:09:05 UTC (rev 1102)
+++ trunk/ChangeLog 2006-12-15 18:33:29 UTC (rev 1103)
@@ -5,6 +5,8 @@
Moved html_entities array to symbols.c.
Fixed some checks for the new D lexer and improved detection of
comments when auto completing or showing calltips.
+ * src/search.c: Bring the Find, Replace and FIF dialog back to top if
+ they are already shown but lost focus.
2006-12-15 Nick Treleaven <nick.treleaven at btinternet.com>
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2006-12-15 17:09:05 UTC (rev 1102)
+++ trunk/src/search.c 2006-12-15 18:33:29 UTC (rev 1103)
@@ -338,10 +338,14 @@
}
else
{
- if (sel) gtk_entry_set_text(GTK_ENTRY(GTK_BIN(
+ // only set selection if the dialog is not already visible
+ if (! GTK_WIDGET_VISIBLE(widgets.find_dialog) && sel)
+ gtk_entry_set_text(GTK_ENTRY(GTK_BIN(
lookup_widget(widgets.find_dialog, "entry"))->child), sel);
gtk_widget_grab_focus(GTK_WIDGET(GTK_BIN(lookup_widget(widgets.find_dialog, "entry"))->child));
gtk_widget_show(widgets.find_dialog);
+ // bring the dialog back in the foreground in case it is already open but the focus is away
+ gtk_window_present(GTK_WINDOW(widgets.find_dialog));
}
g_free(sel);
}
@@ -474,10 +478,14 @@
}
else
{
- if (sel) gtk_entry_set_text(GTK_ENTRY(GTK_BIN(
+ // only set selection if the dialog is not already visible
+ if (! GTK_WIDGET_VISIBLE(widgets.replace_dialog) && sel)
+ gtk_entry_set_text(GTK_ENTRY(GTK_BIN(
lookup_widget(widgets.replace_dialog, "entry_find"))->child), sel);
gtk_widget_grab_focus(GTK_WIDGET(GTK_BIN(lookup_widget(widgets.replace_dialog, "entry_find"))->child));
gtk_widget_show(widgets.replace_dialog);
+ // bring the dialog back in the foreground in case it is already open but the focus is away
+ gtk_window_present(GTK_WINDOW(widgets.replace_dialog));
}
g_free(sel);
}
@@ -620,7 +628,9 @@
sel = get_default_text(idx);
entry = GTK_BIN(combo)->child;
- if (sel) gtk_entry_set_text(GTK_ENTRY(entry), sel);
+ // only set selection if the dialog is not already visible
+ if (! GTK_WIDGET_VISIBLE(widgets.find_in_files_dialog) && sel)
+ gtk_entry_set_text(GTK_ENTRY(entry), sel);
g_free(sel);
entry = GTK_BIN(dir_combo)->child;
@@ -638,6 +648,8 @@
gtk_widget_grab_focus(combo);
gtk_widget_show(widgets.find_in_files_dialog);
+ // bring the dialog back in the foreground in case it is already open but the focus is away
+ gtk_window_present(GTK_WINDOW(widgets.find_in_files_dialog));
}
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