mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-25 18:10:38 +02:00
Merge branch 'master' of projects.qi-hardware.com:openwrt-packages
This commit is contained in:
commit
9279c0e696
@ -23,10 +23,9 @@ include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/cxxtools
|
||||
TITLE:=cxxtools
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+tntnet
|
||||
TITLE:=cxxtools
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
|
@ -12,7 +12,7 @@ PKG_NAME:=stardict
|
||||
PKG_VERSION:=3.0.1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=http://stardictproject.googlecode.com/files/
|
||||
PKG_SOURCE_URL:=http://downloads.sourceforge.net/stardict/
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
@ -8,17 +8,71 @@ when press "enter" will goto the translate result text
|
||||
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
|
||||
---
|
||||
|
||||
src/mainwin.cpp | 4 +++-
|
||||
src/mainwin.cpp | 27 ++++++++++++++++++++-------
|
||||
src/mainwin.h | 1 +
|
||||
src/stardict.cpp | 4 ++++
|
||||
3 files changed, 8 insertions(+), 1 deletions(-)
|
||||
3 files changed, 25 insertions(+), 7 deletions(-)
|
||||
|
||||
|
||||
diff --git a/src/mainwin.cpp b/src/mainwin.cpp
|
||||
index ccd5adc..eaa0650 100644
|
||||
index ccd5adc..a1d6373 100644
|
||||
--- a/src/mainwin.cpp
|
||||
+++ b/src/mainwin.cpp
|
||||
@@ -2689,8 +2689,10 @@ void MidWin::Create(GtkWidget *vbox)
|
||||
@@ -165,8 +165,13 @@ void TopWin::on_entry_changed(GtkEntry *entry, TopWin *oTopWin)
|
||||
return;
|
||||
const gchar *sWord = gtk_entry_get_text(entry);
|
||||
if(sWord[0]!='\0') {
|
||||
+ gtk_widget_show(gpAppFrame->oMidWin.oIndexWin.notebook);
|
||||
+ gtk_widget_hide(gpAppFrame->oMidWin.vbox1);
|
||||
gpAppFrame->TopWinWordChange(sWord);
|
||||
} else {
|
||||
+ gtk_widget_hide(gpAppFrame->oMidWin.oIndexWin.notebook);
|
||||
+ gtk_widget_show(gpAppFrame->oMidWin.vbox1);
|
||||
+
|
||||
gpAppFrame->oMidWin.oTextWin.queryWord.clear();
|
||||
gpAppFrame->oMidWin.oIndexWin.oResultWin.Clear();
|
||||
gpAppFrame->oMidWin.oTextWin.ShowTips();
|
||||
@@ -581,8 +586,13 @@ void TopWin::SetText(const gchar *word, bool notify)
|
||||
if (!notify)
|
||||
return;
|
||||
if(word[0]!='\0') {
|
||||
+ gtk_widget_show(gpAppFrame->oMidWin.oIndexWin.notebook);
|
||||
+ gtk_widget_hide(gpAppFrame->oMidWin.vbox1);
|
||||
gpAppFrame->TopWinWordChange(word);
|
||||
} else {
|
||||
+ gtk_widget_hide(gpAppFrame->oMidWin.oIndexWin.notebook);
|
||||
+ gtk_widget_show(gpAppFrame->oMidWin.vbox1);
|
||||
+
|
||||
gpAppFrame->oMidWin.oTextWin.queryWord.clear();
|
||||
gpAppFrame->oMidWin.oIndexWin.oResultWin.Clear();
|
||||
gpAppFrame->oMidWin.oTextWin.ShowTips();
|
||||
@@ -1815,18 +1825,19 @@ void TextWin::ShowTips()
|
||||
{
|
||||
query_result = TEXT_WIN_TIPS;
|
||||
view->set_text(
|
||||
- _(" Welcome to StarDict!\n\n"
|
||||
+ _(" Please type a word to start searching. \n\n"
|
||||
+ " Welcome to StarDict.\n"
|
||||
" Press Ctrl+Q to quit. \n"
|
||||
+ " Press Alt+C or ESC to clear the input entry's text.\n"
|
||||
#ifndef CONFIG_NANONOTE
|
||||
" Press Alt+Z to iconify the window or Alt+X to hide the window.\n"
|
||||
-#endif
|
||||
- " Press Alt+C or ESC to clear the input entry's text.\n"
|
||||
" Press Space key to move focus to the input entry.\n"
|
||||
- " If the query word was not found, you can press Tab key to select the first word in the word list.\n"
|
||||
" After selected some text, clicking the middle mouse button on the main window's Definition area or on the notification area icon will look up that word.\n"
|
||||
+ " When the floating window reports that a word was not found, double clicking will perform a fuzzy query.\n"
|
||||
+#endif
|
||||
+ " If the query word was not found, you can press Tab key to select the first word in the word list.\n"
|
||||
" StarDict can match strings against patterns containing '*' (wildcard) and '?' (joker).\n"
|
||||
- " Input a word beginning with \'/\' to do a Fuzzy query.\n"
|
||||
- " When the floating window reports that a word was not found, double clicking will perform a fuzzy query.\n")
|
||||
+ " Input a word beginning with \'/\' to do a Fuzzy query.\n")
|
||||
);
|
||||
view->scroll_to(0);
|
||||
}
|
||||
@@ -2689,8 +2700,10 @@ void MidWin::Create(GtkWidget *vbox)
|
||||
oLeftWin.Create(hbox, has_treedict);
|
||||
gtk_box_pack_start(GTK_BOX(hbox),notebook, true, true, 0);
|
||||
|
||||
@ -43,10 +97,19 @@ index c3589c6..569c978 100644
|
||||
LeftWin oLeftWin;
|
||||
IndexWin oIndexWin;
|
||||
diff --git a/src/stardict.cpp b/src/stardict.cpp
|
||||
index b84f5c5..8dd64ac 100644
|
||||
index b84f5c5..07cb57a 100644
|
||||
--- a/src/stardict.cpp
|
||||
+++ b/src/stardict.cpp
|
||||
@@ -588,6 +588,8 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
@@ -425,6 +425,8 @@ void AppCore::Create(gchar *queryword)
|
||||
} else {
|
||||
oMidWin.oTextWin.ShowInitFailed();
|
||||
}
|
||||
+ gtk_widget_hide(oMidWin.oIndexWin.notebook);
|
||||
+ gtk_widget_show(oMidWin.vbox1);
|
||||
}
|
||||
|
||||
gboolean AppCore::on_delete_event(GtkWidget * window, GdkEvent *event , AppCore *app)
|
||||
@@ -588,6 +590,8 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
gtk_tree_model_get(model, &iter, 0, &word, -1);
|
||||
oAppCore->ListClick(word);
|
||||
g_free(word);
|
||||
@ -55,12 +118,3 @@ index b84f5c5..8dd64ac 100644
|
||||
/* here to dispaly the result windows */
|
||||
}
|
||||
}
|
||||
@@ -613,6 +615,8 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
oAppCore->oTopWin.InsertBackList();
|
||||
oAppCore->oTopWin.SetText("");
|
||||
oAppCore->oTopWin.grab_focus();
|
||||
+ gtk_widget_show(oAppCore->oMidWin.oIndexWin.notebook);
|
||||
+ gtk_widget_hide(oAppCore->oMidWin.vbox1);
|
||||
} else {
|
||||
if (!oAppCore->oTopWin.has_focus())
|
||||
oAppCore->oTopWin.grab_focus();
|
||||
|
@ -6,8 +6,8 @@ Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
|
||||
---
|
||||
|
||||
src/pangoview.cpp | 16 ++++++++--------
|
||||
src/stardict.cpp | 7 +++++--
|
||||
2 files changed, 13 insertions(+), 10 deletions(-)
|
||||
src/stardict.cpp | 9 +++++++--
|
||||
2 files changed, 15 insertions(+), 10 deletions(-)
|
||||
|
||||
|
||||
diff --git a/src/pangoview.cpp b/src/pangoview.cpp
|
||||
@ -62,10 +62,10 @@ index e400ac3..b386b6e 100644
|
||||
|
||||
void TextPangoWidget::do_set_pango_text(const char *str)
|
||||
diff --git a/src/stardict.cpp b/src/stardict.cpp
|
||||
index 8dd64ac..ae5fb05 100644
|
||||
index 07cb57a..b4ade70 100644
|
||||
--- a/src/stardict.cpp
|
||||
+++ b/src/stardict.cpp
|
||||
@@ -487,11 +487,10 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
@@ -489,11 +489,10 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
if (event->type==GDK_KEY_PRESS)
|
||||
oAppCore->Quit();
|
||||
}
|
||||
@ -78,7 +78,7 @@ index 8dd64ac..ae5fb05 100644
|
||||
}
|
||||
}
|
||||
else if ((event->keyval==GDK_z || event->keyval==GDK_Z) && only_mod1_pressed) {
|
||||
@@ -508,6 +507,7 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
@@ -510,6 +509,7 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
if (event->type==GDK_KEY_PRESS)
|
||||
show_help(NULL);
|
||||
}
|
||||
@ -86,11 +86,13 @@ index 8dd64ac..ae5fb05 100644
|
||||
else if ((event->keyval==GDK_f || event->keyval==GDK_F) && only_ctrl_pressed) {
|
||||
if (event->type==GDK_KEY_PRESS)
|
||||
oAppCore->oMidWin.oToolWin.do_search();
|
||||
@@ -623,6 +623,9 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
@@ -623,6 +623,11 @@ gboolean AppCore::vKeyPressReleaseCallback(GtkWidget * window, GdkEventKey *even
|
||||
}
|
||||
}
|
||||
break;
|
||||
+ case GDK_Return:
|
||||
+ gtk_widget_hide(oAppCore->oMidWin.oIndexWin.notebook);
|
||||
+ gtk_widget_show(oAppCore->oMidWin.vbox1);
|
||||
+ return_val=true;
|
||||
+ break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user