[Goodies-commits] r4497 - in xfce4-dict/trunk: . lib

Enrico Troeger enrico at xfce.org
Mon Mar 31 21:27:13 CEST 2008


Author: enrico
Date: 2008-03-31 19:27:13 +0000 (Mon, 31 Mar 2008)
New Revision: 4497

Modified:
   xfce4-dict/trunk/ChangeLog
   xfce4-dict/trunk/lib/common.c
Log:
Bring main window up when received data in panel plugin via DnD.

Modified: xfce4-dict/trunk/ChangeLog
===================================================================
--- xfce4-dict/trunk/ChangeLog	2008-03-31 18:32:56 UTC (rev 4496)
+++ xfce4-dict/trunk/ChangeLog	2008-03-31 19:27:13 UTC (rev 4497)
@@ -1,3 +1,9 @@
+2008-03-31  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+	* Prefix some more functions.
+	* Bring main window up when received data in panel plugin via DnD.
+
+
 2008-03-30  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
 	* More code reorganisation and cleanup.

Modified: xfce4-dict/trunk/lib/common.c
===================================================================
--- xfce4-dict/trunk/lib/common.c	2008-03-31 18:32:56 UTC (rev 4496)
+++ xfce4-dict/trunk/lib/common.c	2008-03-31 19:27:13 UTC (rev 4497)
@@ -215,6 +215,8 @@
 
 void dict_search_word(DictData *dd, const gchar *word)
 {
+	gboolean browser_started = FALSE;
+
 	/* sanity checks */
 	if (! NZV(word))
 	{
@@ -252,15 +254,8 @@
 		}
 		case DICTMODE_WEB:
 		{
-			gboolean browser_started = start_web_query(dd, dd->searched_word);
+			browser_started = start_web_query(dd, dd->searched_word);
 
-			/* If the browser was successfully started and we are not in the
-			 * stand-alone app, then hide the main window in favour of the started browser.
-			 * If we are in the stand-alone app, don't hide the main window, we don't want this */
-			if (browser_started && dd->is_plugin)
-			{
-				gtk_widget_hide(dd->window);
-			}
 			break;
 		}
 		case DICTMODE_SPELL:
@@ -269,6 +264,17 @@
 			break;
 		}
 	}
+	/* If the browser was successfully started and we are not in the stand-alone app,
+	 * then hide the main window in favour of the started browser.
+	 * If we are in the stand-alone app, don't hide the main window, we don't want this */
+	if (browser_started && dd->is_plugin)
+	{
+		gtk_widget_hide(dd->window);
+	}
+	else
+	{
+		dict_gui_show_main_window(dd);
+	}
 }
 
 




More information about the Goodies-commits mailing list