Skip to content
Snippets Groups Projects
Commit db3fb168 authored by Enrico Tröger's avatar Enrico Tröger
Browse files

Bring main window up when received data in panel plugin via DnD.

(Old svn revision: 4497)
parent 36fb3943
No related branches found
No related tags found
No related merge requests found
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.
......
......@@ -215,6 +215,8 @@ static gboolean start_web_query(DictData *dd, const gchar *word)
void dict_search_word(DictData *dd, const gchar *word)
{
gboolean browser_started = FALSE;
/* sanity checks */
if (! NZV(word))
{
......@@ -252,15 +254,8 @@ void dict_search_word(DictData *dd, const gchar *word)
}
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 @@ void dict_search_word(DictData *dd, const gchar *word)
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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment