2 * MStarDict - International dictionary for Maemo.
3 * Copyright (C) 2010 Roman Moravcik
5 * base on code of stardict:
6 * Copyright (C) 2003-2007 Hu Zheng <huzheng_001@163.com>
8 * based on code of sdcv:
9 * Copyright (C) 2005-2006 Evgeniy <dushistov@mail.ru>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include <hildon/hildon.h>
29 #include "lib/pluginmanager.h"
31 extern MStarDict *pMStarDict;
44 GtkWidget *label_widget;
45 GtkWidget *results_widget;
46 GtkWidget *search_entry;
47 GtkWidget *results_view;
48 GtkWidget *results_view_scroll;
50 GtkListStore *results_list;
52 static gboolean onResultsViewSelectionChanged(GtkTreeSelection *selection,
53 MStarDict *mStarDict);
54 static gboolean onSearchEntryChanged(GtkEditable *editable,
55 MStarDict *mStarDict);
56 static gboolean onSearchClearClicked(GtkButton *button,
57 MStarDict *mStarDict);
58 static gboolean onDictionariesMenuItemClicked(GtkButton *button,
59 MStarDict *mStarDict);
60 static gboolean onPreferencesMenuItemClicked(GtkButton *button,
61 MStarDict *mStarDict);
62 static gboolean onQuitMenuItemClicked(GtkButton *button,
63 MStarDict *mStarDict);
64 static gboolean onLookupProgressDialogResponse(GtkDialog *dialog,
67 static gboolean onMainWindowKeyPressEvent(GtkWidget *window,
69 MStarDict *mStarDict);
79 StarDictPlugins *oPlugins;
83 GtkWidget *CreateLookupProgressDialog(bool *cancel);
84 void DestroyLookupProgressDialog(GtkWidget *dialog);
85 void CreateMainWindow();
86 GtkWidget *GetMainWindow();
87 GtkWidget *CreateSearchBar();
88 void CreateMainMenu();
92 void ResultsListClear();
93 void ResultsListInsertLast(const gchar *word);
94 void ResultsReScroll();
95 void ResultsUnselectAll(GtkSelectionMode mode);
96 void ShowNoResults(bool bNoResults);
97 void ShowNoDictionary(bool bNoDictionary);
98 void ShowProgressIndicator(bool bShow);