Date:2010-02-11 07:54:00 (11 years 14 days ago)
Author:Xiangfu Liu
Commit:22ad7219b6e0d34d6b84bfbac8691fcca2a2120b
Message:[stardict] disable check X header

Files: stardict/patches/001-fix-compile-error.patch (4 diffs)
stardict/patches/002-dont-need-hotkey-in-nanonote.patch (3 diffs)

Change Details

stardict/patches/001-fix-compile-error.patch
88 src/gconf_file.cpp | 2 ++
99 src/inifile.cpp | 1 +
1010 src/lib/common.cpp | 2 ++
11 src/lib/data.cpp | 1 +
11 src/lib/data.cpp | 2 ++
1212 src/lib/http_client.cpp | 1 +
1313 src/lib/pluginmanager.cpp | 2 +-
14 src/lib/stardict_client.cpp | 1 +
14 src/lib/stardict_client.cpp | 2 ++
1515 src/lib/treedict.cpp | 1 +
1616 src/pangoview.cpp | 2 ++
1717 src/prefsdlg.cpp | 1 +
...... 
3535 .../stardict_xdxf_parsedata.cpp | 1 +
3636 tests/t_config_file.cpp | 1 +
3737 tests/t_xml.cpp | 1 +
38 30 files changed, 38 insertions(+), 6 deletions(-)
38 30 files changed, 40 insertions(+), 6 deletions(-)
3939
4040
4141diff --git a/src/gconf_file.cpp b/src/gconf_file.cpp
...... 
7777
7878 static void parse_description(const char *p, long len, std::string &description)
7979diff --git a/src/lib/data.cpp b/src/lib/data.cpp
80index 45c7d1a..1b29ec3 100644
80index 45c7d1a..a428b37 100644
8181--- a/src/lib/data.cpp
8282+++ b/src/lib/data.cpp
83@@ -22,6 +22,7 @@
83@@ -22,6 +22,8 @@
8484 # include "config.h"
8585 #endif
8686
87+#include <cstdio>
8788+#include <cstring>
8889 #include "kmp.h"
8990
...... 
113114 StarDictPluginBaseObject::StarDictPluginBaseObject(const char *filename, GModule *module_, plugin_configure_func_t configure_func_):
114115     plugin_filename(filename), module(module_), configure_func(configure_func_)
115116diff --git a/src/lib/stardict_client.cpp b/src/lib/stardict_client.cpp
116index dcae5ce..c3d2511 100644
117index dcae5ce..407a907 100644
117118--- a/src/lib/stardict_client.cpp
118119+++ b/src/lib/stardict_client.cpp
119@@ -25,6 +25,7 @@
120@@ -25,6 +25,8 @@
120121 #include <glib.h>
121122 #include <glib/gi18n.h>
122123
124+#include <cstdio>
123125+#include <cstdlib>
124126 #include "sockets.hpp"
125127 #include "md5.h"
stardict/patches/002-dont-need-hotkey-in-nanonote.patch
55
66---
77
8 configure.in | 2
8 configure.in | 26 ++-
99 src/class_factory.cpp | 2
1010 src/conf.cpp | 6 -
11 src/stardict.cpp | 6 -
11 src/stardict.cpp | 35 +++-
1212 src/x11_iskeyspressed.cpp | 351 ---------------------------------------------
1313 src/x11_iskeyspressed.hpp | 65 --------
14 6 files changed, 8 insertions(+), 424 deletions(-)
14 6 files changed, 39 insertions(+), 446 deletions(-)
1515
1616
1717diff --git a/configure.in b/configure.in
18index 83d3d95..3676e2c 100644
18index 83d3d95..6be40db 100644
1919--- a/configure.in
2020+++ b/configure.in
21@@ -428,7 +428,7 @@ LDFLAGS="$LDFLAGS $X_EXTRA_LIBS"
22 fi
21@@ -414,21 +414,21 @@ dnl ==========================================================================
22
23 # Checks for header files. need by Solaris.
24 AC_PATH_XTRA
25-if test -n "$X_CFLAGS"; then
26-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
27-fi
28-if test -n "$X_LIBS"; then
29-LDFLAGS="$LDFLAGS $X_LIBS"
30-fi
31-if test -n "$X_PRE_LIBS"; then
32-LDFLAGS="$LDFLAGS $X_PRE_LIBS"
33-fi
34-if test -n "$X_EXTRA_LIBS"; then
35-LDFLAGS="$LDFLAGS $X_EXTRA_LIBS"
36-fi
37+#if test -n "$X_CFLAGS"; then
38+#CPPFLAGS="$CPPFLAGS $X_CFLAGS"
39+#fi
40+#if test -n "$X_LIBS"; then
41+#LDFLAGS="$LDFLAGS $X_LIBS"
42+#fi
43+#if test -n "$X_PRE_LIBS"; then
44+#LDFLAGS="$LDFLAGS $X_PRE_LIBS"
45+#fi
46+#if test -n "$X_EXTRA_LIBS"; then
47+#LDFLAGS="$LDFLAGS $X_EXTRA_LIBS"
48+#fi
2349
2450 # Checks for libraries.
2551-AC_CHECK_LIB([X11], [main], , [AC_MSG_ERROR([X11 lib not found])])
...... 
5884
5985 std::auto_ptr<AppConf> conf;
6086diff --git a/src/stardict.cpp b/src/stardict.cpp
61index 326ca4a..4c51d61 100644
87index 326ca4a..0e820ed 100644
6288--- a/src/stardict.cpp
6389+++ b/src/stardict.cpp
6490@@ -351,9 +351,9 @@ void AppCore::Create(gchar *queryword)
...... 
74100     oFloatWin.Create();
75101     bool scan=conf->get_bool_at("dictionary/scan_selection");
76102     oDockLet.reset(PlatformFactory::create_tray_icon(window, scan,
103@@ -2005,10 +2005,19 @@ private:
104
105 void AppCore::PopupPrefsDlg()
106 {
107+ static std::list<std::string> posb_combs;
108+ if (posb_combs.empty()) {
109+ posb_combs.push_back("Win");
110+ posb_combs.push_back("Shift");
111+ posb_combs.push_back("Alt");
112+ posb_combs.push_back("Ctrl");
113+ posb_combs.push_back("Ctrl+Alt");
114+ }
115+
116     if (!prefs_dlg) {
117         prefs_dlg = new PrefsDlg(GTK_WINDOW(window),
118- get_impl(oAppSkin.icon),
119- unlock_keys->possible_combs());
120+ get_impl(oAppSkin.icon),
121+ posb_combs);
122         bool enbcol =
123             conf->get_bool_at("dictionary/enable_collation");
124         int colf =
125@@ -2153,17 +2162,17 @@ void AppCore::Quit()
126     if (!conf->get_bool_at("main_window/maximized")) {
127         gint width, height;
128         gtk_window_get_size(GTK_WINDOW(window), &width, &height);
129- conf->set_int_at("main_window/window_width", width);
130- conf->set_int_at("main_window/window_height", height);
131+ conf->set_int_at("main_window/window_width", width);
132+ conf->set_int_at("main_window/window_height", height);
133     }
134     gint pos = gtk_paned_get_position(GTK_PANED(oMidWin.hpaned));
135- conf->set_int_at("main_window/hpaned_pos", pos);
136+ conf->set_int_at("main_window/hpaned_pos", pos);
137
138     if (conf->get_bool_at("floating_window/lock")) {
139         gint x, y;
140         gtk_window_get_position(GTK_WINDOW(oFloatWin.FloatWindow), &x, &y);
141- conf->set_int_at("floating_window/lock_x", x);
142- conf->set_int_at("floating_window/lock_y", y);
143+ conf->set_int_at("floating_window/lock_x", x);
144+ conf->set_int_at("floating_window/lock_y", y);
145     }
146
147     End();
148@@ -2171,9 +2180,9 @@ void AppCore::Quit()
149 #ifdef CONFIG_GNOME
150     bonobo_object_unref (stardict_app_server);
151 #endif
152- unlock_keys.reset(0);
153- conf.reset(0);
154- gtk_main_quit();
155+ unlock_keys.reset(0);
156+ conf.reset(0);
157+ gtk_main_quit();
158 }
159
160 void AppCore::on_main_win_hide_list_changed(const baseconfval* hideval)
77161diff --git a/src/x11_iskeyspressed.cpp b/src/x11_iskeyspressed.cpp
78162index 15e8fb0..8b13789 100644
79163--- a/src/x11_iskeyspressed.cpp

Archive Download the corresponding diff file



interactive