]>
Commit | Line | Data |
---|---|---|
f72e2b22 JB |
1 | diff --git a/configure.ac b/configure.ac |
2 | index 9be879ce..0429f601 100644 | |
3 | --- a/configure.ac | |
4 | +++ b/configure.ac | |
5 | @@ -823,88 +823,104 @@ uim_pixmapsdir=`eval eval echo ${datadir}/${PACKAGE_TARNAME}/pixmaps` | |
6 | AC_DEFINE_UNQUOTED(UIM_PIXMAPSDIR, "${uim_pixmapsdir}", [pixmaps directory]) | |
7 | AC_SUBST(uim_pixmapsdir) | |
8 | ||
9 | -dnl ***************************** | |
10 | -dnl *** Check for Gtk Library *** | |
11 | -dnl ***************************** | |
12 | +dnl ****************************** | |
13 | +dnl *** Check for GTK+ Library *** | |
14 | +dnl ****************************** | |
15 | AC_ARG_WITH(gtk2, | |
16 | AC_HELP_STRING([--without-gtk2], | |
17 | - [don't build against Gtk+2]), | |
18 | - [ | |
19 | - case $with_gtk2 in | |
20 | - no) | |
21 | - use_gtk2="no" | |
22 | - ;; | |
23 | - yes|*) | |
24 | - PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0 gdk-x11-2.0, use_gtk2="yes",use_gtk2="no") | |
25 | - PKG_CHECK_MODULES(GTK2_4, gtk+-2.0 >= 2.4.0 gdk-x11-2.0, use_gtk2_4="yes",use_gtk2_4="no") | |
26 | - ;; | |
27 | - esac | |
28 | - ], | |
29 | - [ PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0 gdk-x11-2.0, use_gtk2="yes",use_gtk2="no") | |
30 | - PKG_CHECK_MODULES(GTK2_4, gtk+-2.0 >= 2.4.0 gdk-x11-2.0, use_gtk2_4="yes",use_gtk2_4="no") ]) | |
31 | + [do not build against GTK+2]), | |
32 | + [], | |
33 | + [with_gtk2=yes]) | |
34 | + | |
35 | +if test "x$with_gtk2" != xno; then | |
36 | + PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0 gdk-x11-2.0, | |
37 | + with_gtk2=yes, with_gtk2=no) | |
38 | + PKG_CHECK_MODULES(GTK2_4, gtk+-2.0 >= 2.4.0 gdk-x11-2.0, | |
39 | + with_gtk2_4=yes, with_gtk2_4=no) | |
40 | +fi | |
41 | + | |
42 | +AM_CONDITIONAL(GTK2, test "x$with_gtk2" = xyes) | |
43 | +AM_CONDITIONAL(GTK2_4, test "x$with_gtk2_4" = xyes) | |
44 | + | |
45 | +if test "x$with_gtk2" = xyes; then | |
46 | + GTK_BINARY_VERSION=`$PKG_CONFIG gtk+-2.0 --variable=gtk_binary_version` | |
47 | + GTK_LIBDIR=`$PKG_CONFIG gtk+-2.0 --variable=libdir` | |
48 | + AC_SUBST(GTK_BINARY_VERSION) | |
49 | + AC_SUBST(GTK_LIBDIR) | |
50 | + AC_DEFINE(USE_GTK2, 1, [use GTK+2]) | |
51 | +fi | |
52 | ||
53 | AC_ARG_ENABLE(gnome-applet, | |
54 | AC_HELP_STRING([--disable-gnome-applet], | |
55 | - [disable uim applet for Gnome panel]), | |
56 | - [ | |
57 | - case $enable_gnome_applet in | |
58 | - no) | |
59 | - use_applet_gnome="no" | |
60 | - ;; | |
61 | - yes|*) | |
62 | - PKG_CHECK_MODULES(APPLET_GNOME, libpanelapplet-2.0, use_applet_gnome="yes",use_applet_gnome="no") | |
63 | - PKG_CHECK_MODULES(APPLET_2_14, libpanelapplet-2.0 >= 2.14.0, panelapplet_have_set_background_api="yes",panelapplet_have_set_background_api="no") | |
64 | - ;; | |
65 | - esac | |
66 | - ], | |
67 | - [ | |
68 | - PKG_CHECK_MODULES(APPLET_GNOME, libpanelapplet-2.0, use_applet_gnome="yes",use_applet_gnome="no") | |
69 | - PKG_CHECK_MODULES(APPLET_2_14, libpanelapplet-2.0 >= 2.14.0, panelapplet_have_set_background_api="yes",panelapplet_have_set_background_api="no") | |
70 | - ]) | |
71 | + [disable uim applet for GNOME2 panel]), | |
72 | + [], | |
73 | + [enable_gnome_applet=yes]) | |
74 | + | |
75 | +if test "x$enable_gnome_applet" != xno; then | |
76 | + PKG_CHECK_MODULES(GNOME_APPLET, libpanelapplet-2.0, | |
77 | + enable_gnome_applet=yes, enable_gnome_applet=no) | |
78 | + PKG_CHECK_MODULES(APPLET_2_14, libpanelapplet-2.0 >= 2.14.0, | |
79 | + panelapplet_have_set_background_api=yes, | |
80 | + panelapplet_have_set_background_api=no) | |
81 | +fi | |
82 | ||
83 | if test x"$panelapplet_have_set_background_api" = xyes; then | |
84 | AC_DEFINE(LIBPANEL_APPLET_HAVE_SET_BACKGROUND_WIDGET, 1 , [libpanel-applet have set_background api]) | |
85 | fi | |
86 | ||
87 | +AM_CONDITIONAL(GNOME_APPLET, test "x$enable_gnome_applet" = xyes) | |
88 | ||
89 | -dnl ****************************** | |
90 | -dnl *** Check for Gtk3 Library *** | |
91 | -dnl ****************************** | |
92 | +dnl ******************************* | |
93 | +dnl *** Check for GTK+3 Library *** | |
94 | +dnl ******************************* | |
95 | AC_ARG_WITH(gtk3, | |
96 | - AC_HELP_STRING([--with-gtk3], | |
97 | - [build GTK+3 immodule and helper applications | |
98 | - @<:@default=yes@:>@]), | |
99 | - [ | |
100 | - case $with_gtk3 in | |
101 | - no) | |
102 | - use_gtk3="no" | |
103 | - ;; | |
104 | - yes|*) | |
105 | - PKG_CHECK_MODULES(GTK3, gtk+-3.0, use_gtk3="yes",use_gtk3="no") | |
106 | - ;; | |
107 | - esac | |
108 | - ], | |
109 | - [ | |
110 | - PKG_CHECK_MODULES(GTK3, gtk+-3.0, use_gtk3="yes",use_gtk3="no") | |
111 | - ]) | |
112 | + AC_HELP_STRING([--without-gtk3], | |
113 | + [do not build GTK+3 immodule and helper applications]), | |
114 | + [], | |
115 | + [with_gtk3=yes]) | |
116 | + | |
117 | +if test "x$with_gtk3" != xno; then | |
118 | + PKG_CHECK_MODULES(GTK3, gtk+-3.0, with_gtk3=yes, with_gtk3=no) | |
119 | +fi | |
120 | + | |
121 | +AM_CONDITIONAL(GTK3, test "x$with_gtk3" = xyes) | |
122 | + | |
123 | +if test "x$with_gtk3" = xyes; then | |
124 | + AC_DEFINE(USE_GTK3, 1, [use GTK+3]) | |
125 | + GTK3_BINARY_VERSION=`$PKG_CONFIG gtk+-3.0 --variable=gtk_binary_version` | |
126 | + GTK3_LIBDIR=`$PKG_CONFIG gtk+-3.0 --variable=libdir` | |
127 | + AC_SUBST(GTK3_BINARY_VERSION) | |
128 | + AC_SUBST(GTK3_LIBDIR) | |
129 | +fi | |
130 | ||
131 | AC_ARG_ENABLE(gnome3-applet, | |
132 | - AC_HELP_STRING([--enable-gnome3-applet], | |
133 | - [enable uim applet for Gnome3 panel | |
134 | - @<:@default=yes@:>@]), | |
135 | - [ | |
136 | - case $enable_gnome3_applet in | |
137 | - no) | |
138 | - use_applet_gnome3="no" | |
139 | - ;; | |
140 | - yes|*) | |
141 | - PKG_CHECK_MODULES(APPLET_GNOME3, libpanelapplet-4.0, use_applet_gnome3="yes",use_applet_gnome3="no") | |
142 | - ;; | |
143 | - esac | |
144 | - ], | |
145 | - [ | |
146 | - PKG_CHECK_MODULES(APPLET_GNOME3, libpanelapplet-4.0, use_applet_gnome3="yes",use_applet_gnome3="no") | |
147 | - ]) | |
148 | + AC_HELP_STRING([--disable-gnome3-applet], | |
149 | + [disable uim applet for GNOME3 panel]), | |
150 | + [], | |
151 | + [enable_gnome3_applet=yes]) | |
152 | + | |
153 | +if test "x$enable_gnome3_applet" != xno; then | |
154 | + PKG_CHECK_MODULES(GNOME3_APPLET, libpanel-applet, | |
155 | + enable_gnome3_applet=yes, enable_gnome3_applet=no) | |
156 | +fi | |
157 | + | |
158 | +AM_CONDITIONAL(GNOME3_APPLET, test "x$enable_gnome3_applet" = xyes) | |
159 | + | |
160 | +if test "x$enable_gnome3_applet" = xyes; then | |
161 | + AC_ARG_WITH([libpanel-applet-dir], [], [LIBPANEL_APPLET_DIR=$withval], [LIBPANEL_APPLET_DIR=""]) | |
162 | + if test "$LIBPANEL_APPLET_DIR" == ""; then | |
163 | + LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanel-applet` | |
164 | + fi | |
165 | + AC_SUBST(LIBPANEL_APPLET_DIR) | |
166 | +fi | |
167 | + | |
168 | +AC_ARG_ENABLE(debug, | |
169 | + AC_HELP_STRING([--enable-debug], | |
170 | + [enable debugging]), | |
171 | + [], | |
172 | + [enable_debug=no]) | |
173 | + | |
174 | +AM_CONDITIONAL(DEBUG, test "x$enable_debug" = xyes) | |
175 | ||
176 | dnl **************************** | |
177 | dnl *** Check for Qt Library *** | |
178 | diff --git a/gtk2/candwin/gtk.c b/gtk2/candwin/gtk.c | |
179 | index 3964ccd9..dfc9fc40 100644 | |
180 | --- a/gtk2/candwin/gtk.c | |
181 | +++ b/gtk2/candwin/gtk.c | |
182 | @@ -1,6 +1,6 @@ | |
183 | /* | |
184 | ||
185 | - Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
186 | + Copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
187 | ||
188 | All rights reserved. | |
189 | ||
190 | @@ -801,6 +801,9 @@ candwin_show_page(gchar **str) | |
191 | ||
192 | uim_cand_win_gtk_set_page(cwin, page); | |
193 | gtk_widget_show_all(GTK_WIDGET(cwin)); | |
194 | +#if GTK_CHECK_VERSION(3, 7, 8) | |
195 | + gtk_widget_queue_resize_no_redraw(cwin->view); | |
196 | +#endif | |
197 | } | |
198 | ||
199 | static void str_parse(gchar *str) | |
200 | diff --git a/gtk2/candwin/horizontal-gtk.c b/gtk2/candwin/horizontal-gtk.c | |
201 | index 9620d223..752fb829 100644 | |
202 | --- a/gtk2/candwin/horizontal-gtk.c | |
203 | +++ b/gtk2/candwin/horizontal-gtk.c | |
204 | @@ -1,6 +1,6 @@ | |
205 | /* | |
206 | ||
207 | - Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
208 | + Copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
209 | ||
210 | All rights reserved. | |
211 | ||
212 | @@ -181,7 +181,11 @@ static void candwin_set_page_candidates(gchar **str); | |
213 | static void candwin_show_page(gchar **str); | |
214 | static void str_parse(char *str); | |
215 | static void clear_button(struct index_button *idxbutton, gint cell_index); | |
216 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
217 | +static void show_table(GtkGrid *view, GPtrArray *buttons); | |
218 | +#else | |
219 | static void show_table(GtkTable *view, GPtrArray *buttons); | |
220 | +#endif | |
221 | static void scale_label(GtkEventBox *button, double factor); | |
222 | ||
223 | static void index_changed_cb(UIMCandidateWindow *cwin) | |
224 | @@ -345,8 +349,7 @@ button_clicked(GtkEventBox *button, GdkEventButton *event, gpointer data) | |
225 | prev_selected = cwin->selected; | |
226 | if (prev_selected) { | |
227 | GtkWidget *label = gtk_bin_get_child(GTK_BIN(prev_selected->button)); | |
228 | - gtk_widget_unmap(label); | |
229 | - gtk_widget_map(label); | |
230 | + gtk_widget_queue_draw(label); | |
231 | } | |
232 | ||
233 | for (i = 0; i < (gint)cwin->buttons->len; i++) { | |
234 | @@ -360,8 +363,7 @@ button_clicked(GtkEventBox *button, GdkEventButton *event, gpointer data) | |
235 | if (p == button) { | |
236 | GtkWidget *label = gtk_bin_get_child(GTK_BIN(button)); | |
237 | idx = idxbutton->cand_index_in_page; | |
238 | - gtk_widget_unmap(label); | |
239 | - gtk_widget_map(label); | |
240 | + gtk_widget_queue_draw(label); | |
241 | cwin->selected = idxbutton; | |
242 | break; | |
243 | } | |
244 | @@ -481,8 +483,13 @@ candidate_window_init(UIMCandidateWindow *cwin) | |
245 | GTK_POLICY_NEVER); | |
246 | gtk_box_pack_start(GTK_BOX(cwin->vbox), cwin->scrolled_window, TRUE, TRUE, 0); | |
247 | ||
248 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
249 | + cwin->view = gtk_grid_new(); | |
250 | + gtk_grid_set_column_spacing(GTK_GRID(cwin->view), 10); | |
251 | +#else | |
252 | cwin->view = gtk_table_new(1, DEFAULT_NR_CELLS, FALSE); | |
253 | gtk_table_set_col_spacings(GTK_TABLE(cwin->view), 10); | |
254 | +#endif | |
255 | g_signal_connect(G_OBJECT(cwin->view), "destroy", | |
256 | G_CALLBACK(cb_table_view_destroy), cwin->stores); | |
257 | cwin->viewport = gtk_viewport_new(NULL, NULL); | |
258 | @@ -505,7 +512,13 @@ candidate_window_init(UIMCandidateWindow *cwin) | |
259 | #else | |
260 | g_signal_connect_after(label, "expose-event", G_CALLBACK(label_exposed), cwin); | |
261 | #endif | |
262 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
263 | + gtk_widget_set_hexpand(button, TRUE); | |
264 | + gtk_widget_set_vexpand(button, TRUE); | |
265 | + gtk_grid_attach(GTK_GRID(cwin->view), button, col, 0, 1, 1); | |
266 | +#else | |
267 | gtk_table_attach_defaults(GTK_TABLE(cwin->view), button, col, col + 1, 0, 1); | |
268 | +#endif | |
269 | idxbutton = g_malloc(sizeof(struct index_button)); | |
270 | if (idxbutton) { | |
271 | idxbutton->button = GTK_EVENT_BOX(button); | |
272 | @@ -579,7 +592,13 @@ assign_cellbutton(GPtrArray *buttons, gint cand_index, gint display_limit) | |
273 | #else | |
274 | g_signal_connect_after(label, "expose-event", G_CALLBACK(label_exposed), cwin); | |
275 | #endif | |
276 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
277 | + gtk_widget_set_hexpand(button, TRUE); | |
278 | + gtk_widget_set_vexpand(button, TRUE); | |
279 | + gtk_grid_attach(GTK_GRID(cwin->view), button, cand_index, 0, 1, 1); | |
280 | +#else | |
281 | gtk_table_attach_defaults(GTK_TABLE(cwin->view), button, cand_index, cand_index + 1, 0, 1); | |
282 | +#endif | |
283 | idxbutton = g_malloc(sizeof(struct index_button)); | |
284 | if (idxbutton) { | |
285 | idxbutton->button = GTK_EVENT_BOX(button); | |
286 | @@ -1019,12 +1038,10 @@ uim_cand_win_gtk_set_index(UIMCandidateWindow *cwin, gint index) | |
287 | prev_selected = (gpointer)cwin->selected; | |
288 | if (prev_selected && prev_index != cwin->candidate_index) { | |
289 | label = gtk_bin_get_child(GTK_BIN(prev_selected->button)); | |
290 | - gtk_widget_unmap(label); | |
291 | - gtk_widget_map(label); | |
292 | + gtk_widget_queue_draw(label); | |
293 | } | |
294 | label = gtk_bin_get_child(GTK_BIN(idxbutton->button)); | |
295 | - gtk_widget_unmap(label); | |
296 | - gtk_widget_map(label); | |
297 | + gtk_widget_queue_draw(label); | |
298 | cwin->selected = idxbutton; | |
299 | ||
300 | /* show subwin */ | |
301 | @@ -1157,8 +1174,9 @@ update_table_button(GtkTreeModel *model, GPtrArray *buttons, gint display_limit) | |
302 | g_free(idxbutton); | |
303 | g_ptr_array_remove_index(buttons, i); | |
304 | } | |
305 | - | |
306 | +#if !GTK_CHECK_VERSION(3, 4, 0) | |
307 | gtk_table_resize(GTK_TABLE(cwin->view), 1, cand_index); | |
308 | +#endif | |
309 | } | |
310 | } | |
311 | ||
312 | @@ -1185,7 +1203,11 @@ uim_cand_win_gtk_set_page(UIMCandidateWindow *cwin, gint page) | |
313 | if (cwin->stores->pdata[new_page]) { | |
314 | update_table_button(GTK_TREE_MODEL(cwin->stores->pdata[new_page]), | |
315 | cwin->buttons, cwin->display_limit); | |
316 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
317 | + show_table(GTK_GRID(cwin->view), cwin->buttons); | |
318 | +#else | |
319 | show_table(GTK_TABLE(cwin->view), cwin->buttons); | |
320 | +#endif | |
321 | } | |
322 | ||
323 | cwin->page_index = new_page; | |
324 | @@ -1372,7 +1394,11 @@ uim_cand_win_gtk_layout_sub_window(UIMCandidateWindow *cwin) | |
325 | gtk_window_move(GTK_WINDOW(cwin->sub_window.window), x3, y); | |
326 | } | |
327 | static void | |
328 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
329 | +show_table(GtkGrid *view, GPtrArray *buttons) | |
330 | +#else | |
331 | show_table(GtkTable *view, GPtrArray *buttons) | |
332 | +#endif | |
333 | { | |
334 | gint col; | |
335 | ||
336 | diff --git a/gtk2/dict/word-win-gtk.c b/gtk2/dict/word-win-gtk.c | |
337 | index 64d583e4..a4c3c3ec 100644 | |
338 | --- a/gtk2/dict/word-win-gtk.c | |
339 | +++ b/gtk2/dict/word-win-gtk.c | |
340 | @@ -1,6 +1,6 @@ | |
341 | /* | |
342 | ||
343 | - Copyright (c) 2004-2013 uim Project http://code.google.com/p/uim/ | |
344 | + Copyright (c) 2004-2013 uim Project https://github.com/uim/uim | |
345 | ||
346 | All rights reserved. | |
347 | ||
348 | @@ -144,7 +144,7 @@ word_window_init(WordWindow *window) | |
349 | #endif | |
350 | gtk_container_set_border_width(GTK_CONTAINER(vbox1), 10); | |
351 | ||
352 | - /* Necessary infomation area */ | |
353 | + /* Necessary information area */ | |
354 | #if GTK_CHECK_VERSION(3, 2, 0) | |
355 | vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6); | |
356 | #else | |
357 | @@ -152,7 +152,7 @@ word_window_init(WordWindow *window) | |
358 | #endif | |
359 | gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); | |
360 | ||
361 | - label = gtk_label_new(_("Necessary infomation")); | |
362 | + label = gtk_label_new(_("Necessary information")); | |
363 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); | |
364 | gtk_box_pack_start(GTK_BOX(vbox2), label, TRUE, TRUE, 0); | |
365 | ||
366 | @@ -172,7 +172,7 @@ word_window_init(WordWindow *window) | |
367 | gtk_container_add(GTK_CONTAINER(alignment), | |
368 | word_window_necessary_create(window)); | |
369 | ||
370 | - /* Additional infomation area */ | |
371 | + /* Additional information area */ | |
372 | #if GTK_CHECK_VERSION(3, 2, 0) | |
373 | vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6); | |
374 | #else | |
375 | @@ -180,7 +180,7 @@ word_window_init(WordWindow *window) | |
376 | #endif | |
377 | gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); | |
378 | ||
379 | - label = gtk_label_new (_("Additional infomation")); | |
380 | + label = gtk_label_new (_("Additional information")); | |
381 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 1.0); | |
382 | gtk_box_pack_start(GTK_BOX(vbox2), label, TRUE, TRUE, 0); | |
383 | ||
384 | @@ -293,27 +293,56 @@ word_window_necessary_create(WordWindow *window) | |
385 | GtkWidget *alignment, *spin_freq; | |
386 | int i; | |
387 | ||
388 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
389 | + table1 = gtk_grid_new(); | |
390 | + gtk_grid_set_row_spacing(GTK_GRID(table1), 5); | |
391 | + gtk_grid_set_column_spacing(GTK_GRID(table1), 5); | |
392 | +#else | |
393 | table1 = gtk_table_new(5, 5, FALSE); | |
394 | +#endif | |
395 | ||
396 | label = gtk_label_new_with_mnemonic(_("_Phonetic:")); | |
397 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
398 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
399 | + gtk_widget_set_hexpand(label, TRUE); | |
400 | + gtk_grid_attach(GTK_GRID(table1), label, 0, 0, 1, 1); | |
401 | +#else | |
402 | gtk_table_attach(GTK_TABLE(table1), label, 0, 1, 0, 1, GTK_FILL, 0, 5, 5); | |
403 | +#endif | |
404 | ||
405 | entry_phon = gtk_entry_new(); | |
406 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry_phon); | |
407 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
408 | + gtk_grid_attach(GTK_GRID(table1), entry_phon, 1, 0, 1, 1); | |
409 | +#else | |
410 | gtk_table_attach(GTK_TABLE(table1), entry_phon, 1, 2, 0, 1, 0, 0, 5, 5); | |
411 | +#endif | |
412 | ||
413 | label = gtk_label_new_with_mnemonic(_("_Literal:")); | |
414 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
415 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
416 | + gtk_widget_set_hexpand(label, TRUE); | |
417 | + gtk_grid_attach(GTK_GRID(table1), label, 0, 1, 1, 1); | |
418 | +#else | |
419 | gtk_table_attach(GTK_TABLE(table1), label, 0, 1, 1, 2, GTK_FILL, 0, 5, 5); | |
420 | +#endif | |
421 | ||
422 | entry_desc = gtk_entry_new(); | |
423 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry_desc); | |
424 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
425 | + gtk_grid_attach(GTK_GRID(table1), entry_desc, 1, 1, 1, 1); | |
426 | +#else | |
427 | gtk_table_attach(GTK_TABLE(table1), entry_desc, 1, 2, 1, 2, 0, 0, 5, 5); | |
428 | +#endif | |
429 | ||
430 | label = gtk_label_new_with_mnemonic(_("Part of _Speech:")); | |
431 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
432 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
433 | + gtk_widget_set_hexpand(label, TRUE); | |
434 | + gtk_grid_attach(GTK_GRID(table1), label, 0, 2, 1, 1); | |
435 | +#else | |
436 | gtk_table_attach(GTK_TABLE(table1), label, 0, 1, 2, 3, GTK_FILL, 0, 5, 5); | |
437 | +#endif | |
438 | { | |
439 | GtkWidget *alignment_pos_broad; | |
440 | gint pos_num; | |
441 | @@ -341,8 +370,15 @@ word_window_necessary_create(WordWindow *window) | |
442 | gtk_container_add(GTK_CONTAINER(alignment_pos_broad), | |
443 | combobox_pos_broad); | |
444 | gtk_widget_show(alignment_pos_broad); | |
445 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
446 | + gtk_widget_set_hexpand(alignment_pos_broad, TRUE); | |
447 | + gtk_widget_set_vexpand(alignment_pos_broad, TRUE); | |
448 | + gtk_grid_attach(GTK_GRID(table1), alignment_pos_broad, | |
449 | + 1, 2, 1, 1); | |
450 | +#else | |
451 | gtk_table_attach(GTK_TABLE(table1), alignment_pos_broad, | |
452 | 1, 2, 2, 3, GTK_FILL, GTK_FILL, 5, 5); | |
453 | +#endif | |
454 | gtk_combo_box_set_active(GTK_COMBO_BOX(combobox_pos_broad), 0); | |
455 | ||
456 | g_signal_connect(G_OBJECT(combobox_pos_broad), "changed", | |
457 | @@ -352,11 +388,22 @@ word_window_necessary_create(WordWindow *window) | |
458 | label = gtk_label_new_with_mnemonic(_("_Frequency:")); | |
459 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
460 | gtk_widget_show(label); | |
461 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
462 | + gtk_widget_set_hexpand(label, TRUE); | |
463 | + gtk_grid_attach(GTK_GRID(table1), label, 0, 4, 1, 1); | |
464 | +#else | |
465 | gtk_table_attach(GTK_TABLE(table1), label, 0, 1, 4, 5, GTK_FILL, 0, 5, 5); | |
466 | +#endif | |
467 | ||
468 | alignment = gtk_alignment_new(0.0, 0.5, 0.0, 0.0); | |
469 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
470 | + gtk_widget_set_hexpand(alignment, TRUE); | |
471 | + gtk_grid_attach(GTK_GRID(table1), alignment, | |
472 | + 1, 4, 1, 1); | |
473 | +#else | |
474 | gtk_table_attach(GTK_TABLE(table1), alignment, | |
475 | 1, 2, 4, 5, GTK_FILL, 0, 5, 5); | |
476 | +#endif | |
477 | gtk_widget_show(alignment); | |
478 | adjustment_freq = (GtkAdjustment*)gtk_adjustment_new(1.0, 1.0, 65535.0, | |
479 | 1.0, 100.0, 0); | |
480 | @@ -378,22 +425,43 @@ word_window_additional_create(WordWindow *window) | |
481 | GtkWidget *table; | |
482 | GtkWidget *label, *entry, *button; | |
483 | ||
484 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
485 | + table = gtk_grid_new(); | |
486 | + gtk_grid_set_row_spacing(GTK_GRID(table), 5); | |
487 | + gtk_grid_set_column_spacing(GTK_GRID(table), 5); | |
488 | +#else | |
489 | table = gtk_table_new(5, 5, FALSE); | |
490 | +#endif | |
491 | ||
492 | label = gtk_label_new_with_mnemonic(_("Part of Speech(_narrow):")); | |
493 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
494 | gtk_widget_show(label); | |
495 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
496 | + gtk_widget_set_hexpand(label, TRUE); | |
497 | + gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 1); | |
498 | +#else | |
499 | gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 5, 5); | |
500 | +#endif | |
501 | ||
502 | entry = gtk_entry_new(); | |
503 | gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); | |
504 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
505 | gtk_widget_show(entry); | |
506 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
507 | + gtk_widget_set_hexpand(entry, TRUE); | |
508 | + gtk_grid_attach(GTK_GRID(table), entry, 1, 0, 1, 1); | |
509 | +#else | |
510 | gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 5, 5); | |
511 | +#endif | |
512 | ||
513 | button = gtk_button_new_with_mnemonic(_("_Browse...")); | |
514 | gtk_widget_show(button); | |
515 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
516 | + gtk_widget_set_hexpand(button, TRUE); | |
517 | + gtk_grid_attach(GTK_GRID(table), button, 2, 0, 1, 1); | |
518 | +#else | |
519 | gtk_table_attach(GTK_TABLE(table), button, 2, 3, 0, 1, GTK_FILL, 0, 5, 5); | |
520 | +#endif | |
521 | g_signal_connect(G_OBJECT(button), "clicked", | |
522 | G_CALLBACK(button_cclass_browse_clicked_cb), window); | |
523 | ||
524 | @@ -533,7 +601,7 @@ word_window_add(WordWindow *window) | |
525 | GTK_DIALOG_MODAL, | |
526 | GTK_MESSAGE_INFO, | |
527 | GTK_BUTTONS_CLOSE, | |
528 | - "%s", _("Word registration succeded.")); | |
529 | + "%s", _("Word registration succeeded.")); | |
530 | } | |
531 | ||
532 | g_signal_connect(G_OBJECT(dialog), "response", | |
533 | @@ -563,7 +631,7 @@ word_window_validate_values(WordWindow *window) | |
534 | GTK_DIALOG_MODAL, | |
535 | GTK_MESSAGE_ERROR, | |
536 | GTK_BUTTONS_CLOSE, | |
537 | - "%s", _("Phonetic is emtpy!")); | |
538 | + "%s", _("Phonetic is empty!")); | |
539 | g_signal_connect(G_OBJECT(dialog), "response", | |
540 | G_CALLBACK(message_dialog_response_cb), window); | |
541 | gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(window)); | |
542 | @@ -578,7 +646,7 @@ word_window_validate_values(WordWindow *window) | |
543 | GTK_DIALOG_MODAL, | |
544 | GTK_MESSAGE_ERROR, | |
545 | GTK_BUTTONS_CLOSE, | |
546 | - "%s", _("Literal is emtpy!")); | |
547 | + "%s", _("Literal is empty!")); | |
548 | g_signal_connect(G_OBJECT(dialog), "response", | |
549 | G_CALLBACK(message_dialog_response_cb), window); | |
550 | gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(window)); | |
551 | @@ -596,7 +664,7 @@ word_window_validate_values(WordWindow *window) | |
552 | GTK_DIALOG_MODAL, | |
553 | GTK_MESSAGE_ERROR, | |
554 | GTK_BUTTONS_CLOSE, | |
555 | - "%s", _("Part of speech is emtpy!")); | |
556 | + "%s", _("Part of speech is empty!")); | |
557 | g_signal_connect(G_OBJECT(dialog), "response", | |
558 | G_CALLBACK(message_dialog_response_cb), window); | |
559 | gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(window)); | |
560 | diff --git a/gtk2/immodule/gtk-im-uim.c b/gtk2/immodule/gtk-im-uim.c | |
561 | index 940f5a63..ac2918ce 100644 | |
562 | --- a/gtk2/immodule/gtk-im-uim.c | |
563 | +++ b/gtk2/immodule/gtk-im-uim.c | |
564 | @@ -1,6 +1,6 @@ | |
565 | /* | |
566 | ||
567 | - Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
568 | + Copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
569 | ||
570 | All rights reserved. | |
571 | ||
572 | @@ -1283,12 +1283,13 @@ helper_read_cb(GIOChannel *channel, GIOCondition c, gpointer p) | |
573 | } | |
574 | ||
575 | static void | |
576 | -check_helper_connection() | |
577 | +check_helper_connection(uim_context uc) | |
578 | { | |
579 | if (im_uim_fd < 0) { | |
580 | im_uim_fd = uim_helper_init_client_fd(helper_disconnect_cb); | |
581 | if (im_uim_fd >= 0) { | |
582 | GIOChannel *channel; | |
583 | + uim_set_uim_fd(uc, im_uim_fd); | |
584 | channel = g_io_channel_unix_new(im_uim_fd); | |
585 | read_tag = g_io_add_watch(channel, G_IO_IN | G_IO_HUP | G_IO_ERR, | |
586 | helper_read_cb, NULL); | |
587 | @@ -1416,7 +1417,7 @@ im_uim_focus_in(GtkIMContext *ic) | |
588 | update_cur_toplevel(uic); | |
589 | #endif | |
590 | ||
591 | - check_helper_connection(); | |
592 | + check_helper_connection(uic->uc); | |
593 | uim_helper_client_focus_in(uic->uc); | |
594 | uim_prop_list_update(uic->uc); | |
595 | ||
596 | @@ -1447,7 +1448,7 @@ im_uim_focus_out(GtkIMContext *ic) | |
597 | ||
598 | uim_focus_out_context(uic->uc); | |
599 | ||
600 | - check_helper_connection(); | |
601 | + check_helper_connection(uic->uc); | |
602 | uim_helper_client_focus_out(uic->uc); | |
603 | ||
604 | if (uic->cwin) | |
605 | @@ -1681,7 +1682,7 @@ im_module_create(const gchar *context_id) | |
606 | return NULL; | |
607 | } | |
608 | ||
609 | - check_helper_connection(); | |
610 | + check_helper_connection(uic->uc); | |
611 | ||
612 | uim_set_preedit_cb(uic->uc, clear_cb, pushback_cb, update_cb); | |
613 | uim_set_prop_list_update_cb(uic->uc, update_prop_list_cb); | |
614 | diff --git a/gtk2/immodule/key-util-gtk.c b/gtk2/immodule/key-util-gtk.c | |
615 | index 6c0c2183..27abd834 100644 | |
616 | --- a/gtk2/immodule/key-util-gtk.c | |
617 | +++ b/gtk2/immodule/key-util-gtk.c | |
618 | @@ -1,6 +1,6 @@ | |
619 | /* | |
620 | ||
621 | - Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
622 | + Copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
623 | ||
624 | All rights reserved. | |
625 | ||
626 | @@ -55,6 +55,7 @@ | |
627 | #endif | |
628 | ||
629 | #include "uim/uim.h" | |
630 | +#include "uim/uim-scm.h" | |
631 | #if UIM_GTK_USE_JAPANESE_KANA_KEYBOARD_HACK | |
632 | #include "uim/uim-x-util.h" | |
633 | #endif | |
634 | @@ -389,6 +390,9 @@ im_uim_init_modifier_keys() | |
635 | XFreeModifiermap(map); | |
636 | XFree(sym); | |
637 | ||
638 | + if (uim_scm_c_bool(uim_scm_callf("require-dynlib", "s", "xkb"))) | |
639 | + uim_scm_callf("%xkb-set-display", "p", display); | |
640 | + | |
641 | #if UIM_GTK_USE_JAPANESE_KANA_KEYBOARD_HACK | |
642 | uim_x_kana_input_hack_init(display); | |
643 | #endif | |
644 | diff --git a/gtk2/immodule/uim-cand-win-gtk.c b/gtk2/immodule/uim-cand-win-gtk.c | |
645 | index 4d282660..41590d06 100644 | |
646 | --- a/gtk2/immodule/uim-cand-win-gtk.c | |
647 | +++ b/gtk2/immodule/uim-cand-win-gtk.c | |
648 | @@ -1,6 +1,6 @@ | |
649 | /* | |
650 | ||
651 | - copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
652 | + copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
653 | ||
654 | All rights reserved. | |
655 | ||
656 | @@ -225,7 +225,7 @@ uim_cand_win_gtk_init (UIMCandWinGtk *cwin) | |
657 | ||
658 | gtk_widget_set_size_request(cwin->num_label, DEFAULT_MIN_WINDOW_WIDTH, -1); | |
659 | gtk_window_set_default_size(GTK_WINDOW(cwin), DEFAULT_MIN_WINDOW_WIDTH, -1); | |
660 | - gtk_window_set_resizable(GTK_WINDOW(cwin), FALSE); | |
661 | + gtk_window_set_resizable(GTK_WINDOW(cwin), TRUE); | |
662 | } | |
663 | ||
664 | static void | |
665 | @@ -765,6 +765,10 @@ uim_cand_win_gtk_layout(UIMCandWinGtk *cwin, | |
666 | } | |
667 | ||
668 | gtk_window_move(GTK_WINDOW(cwin), x, y); | |
669 | +#if GTK_CHECK_VERSION(3, 7, 8) | |
670 | + if (gtk_widget_get_mapped(cwin->view) && GTK_IS_TREE_VIEW(cwin->view)) | |
671 | + gtk_widget_queue_resize_no_redraw(cwin->view); | |
672 | +#endif | |
673 | ||
674 | uim_cand_win_gtk_layout_sub_window(cwin); | |
675 | } | |
676 | diff --git a/gtk2/immodule/uim-cand-win-horizontal-gtk.c b/gtk2/immodule/uim-cand-win-horizontal-gtk.c | |
677 | index 4fac7411..0e008cd0 100644 | |
678 | --- a/gtk2/immodule/uim-cand-win-horizontal-gtk.c | |
679 | +++ b/gtk2/immodule/uim-cand-win-horizontal-gtk.c | |
680 | @@ -1,6 +1,6 @@ | |
681 | /* | |
682 | ||
683 | - copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
684 | + copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
685 | ||
686 | All rights reserved. | |
687 | ||
688 | @@ -68,7 +68,11 @@ static gboolean label_draw(GtkWidget *label, cairo_t *cr, gpointer data); | |
689 | static gboolean label_exposed(GtkWidget *label, GdkEventExpose *event, gpointer data); | |
690 | #endif | |
691 | static void clear_button(struct index_button *idxbutton, gint cell_index); | |
692 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
693 | +static void show_table(GtkGrid *view, GPtrArray *buttons); | |
694 | +#else | |
695 | static void show_table(GtkTable *view, GPtrArray *buttons); | |
696 | +#endif | |
697 | static void scale_label(GtkEventBox *button, double factor); | |
698 | ||
699 | ||
700 | @@ -133,8 +137,13 @@ uim_cand_win_horizontal_gtk_init (UIMCandWinHorizontalGtk *horizontal_cwin) | |
701 | horizontal_cwin->buttons = g_ptr_array_new(); | |
702 | horizontal_cwin->selected = NULL; | |
703 | ||
704 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
705 | + cwin->view = gtk_grid_new(); | |
706 | + gtk_grid_set_column_spacing(GTK_GRID(cwin->view), 10); | |
707 | +#else | |
708 | cwin->view = gtk_table_new(1, DEFAULT_NR_CELLS, FALSE); | |
709 | gtk_table_set_col_spacings(GTK_TABLE(cwin->view), 10); | |
710 | +#endif | |
711 | viewport = gtk_viewport_new(NULL, NULL); | |
712 | gtk_container_add(GTK_CONTAINER(viewport), cwin->view); | |
713 | gtk_container_add(GTK_CONTAINER(cwin->scrolled_window), viewport); | |
714 | @@ -155,7 +164,13 @@ uim_cand_win_horizontal_gtk_init (UIMCandWinHorizontalGtk *horizontal_cwin) | |
715 | #else | |
716 | g_signal_connect_after(label, "expose-event", G_CALLBACK(label_exposed), horizontal_cwin); | |
717 | #endif | |
718 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
719 | + gtk_widget_set_hexpand(button, TRUE); | |
720 | + gtk_widget_set_vexpand(button, TRUE); | |
721 | + gtk_grid_attach(GTK_GRID(cwin->view), button, col, 0, 1, 1); | |
722 | +#else | |
723 | gtk_table_attach_defaults(GTK_TABLE(cwin->view), button, col, col + 1, 0, 1); | |
724 | +#endif | |
725 | idxbutton = g_malloc(sizeof(struct index_button)); | |
726 | if (idxbutton) { | |
727 | idxbutton->button = GTK_EVENT_BOX(button); | |
728 | @@ -283,8 +298,7 @@ button_clicked(GtkEventBox *button, GdkEventButton *event, gpointer data) | |
729 | prev_selected = horizontal_cwin->selected; | |
730 | if (prev_selected) { | |
731 | GtkWidget *label = gtk_bin_get_child(GTK_BIN(prev_selected->button)); | |
732 | - gtk_widget_unmap(label); | |
733 | - gtk_widget_map(label); | |
734 | + gtk_widget_queue_draw(label); | |
735 | } | |
736 | ||
737 | for (i = 0; i < (gint)horizontal_cwin->buttons->len; i++) { | |
738 | @@ -298,8 +312,7 @@ button_clicked(GtkEventBox *button, GdkEventButton *event, gpointer data) | |
739 | if (p == button) { | |
740 | GtkWidget *label = gtk_bin_get_child(GTK_BIN(button)); | |
741 | idx = idxbutton->cand_index_in_page; | |
742 | - gtk_widget_unmap(label); | |
743 | - gtk_widget_map(label); | |
744 | + gtk_widget_queue_draw(label); | |
745 | horizontal_cwin->selected = idxbutton; | |
746 | break; | |
747 | } | |
748 | @@ -379,7 +392,14 @@ assign_cellbutton(UIMCandWinHorizontalGtk *horizontal_cwin, | |
749 | #else | |
750 | g_signal_connect_after(label, "expose-event", G_CALLBACK(label_exposed), horizontal_cwin); | |
751 | #endif | |
752 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
753 | + gtk_widget_set_hexpand(button, TRUE); | |
754 | + gtk_widget_set_vexpand(button, TRUE); | |
755 | + gtk_grid_attach(GTK_GRID(UIM_CAND_WIN_GTK(horizontal_cwin)->view), button, | |
756 | + cand_index, 0, 1, 1); | |
757 | +#else | |
758 | gtk_table_attach_defaults(GTK_TABLE(UIM_CAND_WIN_GTK(horizontal_cwin)->view), button, cand_index, cand_index + 1, 0, 1); | |
759 | +#endif | |
760 | idxbutton = g_malloc(sizeof(struct index_button)); | |
761 | if (idxbutton) { | |
762 | idxbutton->button = GTK_EVENT_BOX(button); | |
763 | @@ -432,12 +452,10 @@ uim_cand_win_horizontal_gtk_set_index(UIMCandWinHorizontalGtk *horizontal_cwin, | |
764 | prev_selected = (gpointer)horizontal_cwin->selected; | |
765 | if (prev_selected && prev_index != cwin->candidate_index) { | |
766 | label = gtk_bin_get_child(GTK_BIN(prev_selected->button)); | |
767 | - gtk_widget_unmap(label); | |
768 | - gtk_widget_map(label); | |
769 | + gtk_widget_queue_draw(label); | |
770 | } | |
771 | label = gtk_bin_get_child(GTK_BIN(idxbutton->button)); | |
772 | - gtk_widget_unmap(label); | |
773 | - gtk_widget_map(label); | |
774 | + gtk_widget_queue_draw(label); | |
775 | horizontal_cwin->selected = idxbutton; | |
776 | ||
777 | /* show subwin */ | |
778 | @@ -580,8 +598,9 @@ update_table_button(UIMCandWinHorizontalGtk *horizontal_cwin, guint new_page) | |
779 | g_free(idxbutton); | |
780 | g_ptr_array_remove_index(buttons, i); | |
781 | } | |
782 | - | |
783 | +#if !GTK_CHECK_VERSION(3, 4, 0) | |
784 | gtk_table_resize(GTK_TABLE(cwin->view), 1, cand_index); | |
785 | +#endif | |
786 | } | |
787 | } | |
788 | ||
789 | @@ -607,7 +626,11 @@ uim_cand_win_horizontal_gtk_set_page(UIMCandWinHorizontalGtk *horizontal_cwin, g | |
790 | new_page = page; | |
791 | ||
792 | update_table_button(horizontal_cwin, new_page); | |
793 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
794 | + show_table(GTK_GRID(cwin->view), horizontal_cwin->buttons); | |
795 | +#else | |
796 | show_table(GTK_TABLE(cwin->view), horizontal_cwin->buttons); | |
797 | +#endif | |
798 | ||
799 | cwin->page_index = new_page; | |
800 | ||
801 | @@ -629,7 +652,11 @@ uim_cand_win_horizontal_gtk_set_page(UIMCandWinHorizontalGtk *horizontal_cwin, g | |
802 | } | |
803 | ||
804 | static void | |
805 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
806 | +show_table(GtkGrid *view, GPtrArray *buttons) | |
807 | +#else | |
808 | show_table(GtkTable *view, GPtrArray *buttons) | |
809 | +#endif | |
810 | { | |
811 | gint col; | |
812 | ||
813 | diff --git a/gtk2/immodule/uim-cand-win-vertical-gtk.c b/gtk2/immodule/uim-cand-win-vertical-gtk.c | |
814 | index 8034cbd9..eec0fbeb 100644 | |
815 | --- a/gtk2/immodule/uim-cand-win-vertical-gtk.c | |
816 | +++ b/gtk2/immodule/uim-cand-win-vertical-gtk.c | |
817 | @@ -1,6 +1,6 @@ | |
818 | /* | |
819 | ||
820 | - copyright (c) 2011-2013 uim Project http://code.google.com/p/uim/ | |
821 | + copyright (c) 2011-2013 uim Project https://github.com/uim/uim | |
822 | ||
823 | All rights reserved. | |
824 | ||
825 | @@ -206,16 +206,19 @@ tree_selection_change(GtkTreeSelection *selection, | |
826 | g_return_val_if_fail(indicies, TRUE); | |
827 | idx = *indicies + cwin->display_limit * cwin->page_index; | |
828 | ||
829 | + if (path_currently_selected && cwin->candidate_index >= 0) { | |
830 | + /* if emit "index-changed" here and IM deactivates this candwin, | |
831 | + * activates new candwin and selects a candidate on new candwin | |
832 | + * from index-changed callback, SEGV occurs in gtk because gtk tries to | |
833 | + * select on old candwin after return of this tree_selection_change(). | |
834 | + * To avoid SEGV, instead of emitting before selection change by gtk, | |
835 | + * emit after selection changed by gtk. */ | |
836 | + cwin->index_changed = TRUE; | |
837 | + } | |
838 | + | |
839 | if (!path_currently_selected && cwin->candidate_index != idx) { | |
840 | if (cwin->candidate_index >= 0) { | |
841 | cwin->candidate_index = idx; | |
842 | - /* if emit "index-changed" here and IM deactivates this candwin, | |
843 | - * activates new candwin and selects a candidate on new candwin | |
844 | - * from index-changed callback, SEGV occurs in gtk because gtk tries to | |
845 | - * select on old candwin after return of this tree_selection_change(). | |
846 | - * To avoid SEGV, instead of emitting before selection change by gtk, | |
847 | - * emit after selection changed by gtk. */ | |
848 | - cwin->index_changed = TRUE; | |
849 | } | |
850 | ||
851 | uim_cand_win_gtk_update_label(cwin); | |
852 | diff --git a/gtk2/pad/ja.c b/gtk2/pad/ja.c | |
853 | index f1b87fc0..a93bc6db 100644 | |
854 | --- a/gtk2/pad/ja.c | |
855 | +++ b/gtk2/pad/ja.c | |
856 | @@ -1,6 +1,6 @@ | |
857 | /* | |
858 | ||
859 | - Copyright (c) 2004-2013 uim Project http://code.google.com/p/uim/ | |
860 | + Copyright (c) 2004-2013 uim Project https://github.com/uim/uim | |
861 | ||
862 | All rights reserved. | |
863 | ||
864 | @@ -264,6 +264,7 @@ gchar *line[] = { | |
865 | }; | |
866 | ||
867 | static int uim_fd = -1; | |
868 | +static unsigned int read_tag; | |
869 | ||
870 | static GtkWidget *buttontable_create(char **table, int tablelen); | |
871 | static GtkWidget *create_hiragana_tab(void); | |
872 | @@ -280,13 +281,34 @@ static GtkWidget *input_table_create(gchar *localename); | |
873 | static void padbutton_clicked(GtkButton *button, gpointer user_data); | |
874 | ||
875 | ||
876 | +static gboolean | |
877 | +fd_read_cb(GIOChannel *channel, GIOCondition c, gpointer p) | |
878 | +{ | |
879 | + gchar *msg; | |
880 | + int fd = g_io_channel_unix_get_fd(channel); | |
881 | + | |
882 | + uim_helper_read_proc(fd); | |
883 | + | |
884 | + while ((msg = uim_helper_get_message())) { | |
885 | + /* do nothing */ | |
886 | + free(msg); | |
887 | + } | |
888 | + | |
889 | + return TRUE; | |
890 | +} | |
891 | + | |
892 | static void | |
893 | check_helper_connection(void) | |
894 | { | |
895 | if (uim_fd < 0) { | |
896 | uim_fd = uim_helper_init_client_fd(helper_disconnect_cb); | |
897 | - if (uim_fd < 0) | |
898 | - return; | |
899 | + if (uim_fd >= 0) { | |
900 | + GIOChannel *channel; | |
901 | + channel = g_io_channel_unix_new(uim_fd); | |
902 | + read_tag = g_io_add_watch(channel, G_IO_IN | G_IO_HUP | G_IO_ERR, | |
903 | + fd_read_cb, NULL); | |
904 | + g_io_channel_unref(channel); | |
905 | + } | |
906 | } | |
907 | } | |
908 | ||
909 | @@ -294,6 +316,7 @@ static void | |
910 | helper_disconnect_cb(void) | |
911 | { | |
912 | uim_fd = -1; | |
913 | + g_source_remove(read_tag); | |
914 | } | |
915 | ||
916 | static void | |
917 | @@ -321,11 +344,17 @@ buttontable_create(gchar **table, int len) | |
918 | gint i,j; | |
919 | gint rows = ((len-2)/ BUTTON_H_ALIGN)+1; | |
920 | ||
921 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
922 | + _table = gtk_grid_new(); | |
923 | + gtk_grid_set_row_spacing(GTK_GRID(_table), 3); | |
924 | + gtk_grid_set_column_spacing(GTK_GRID(_table), 3); | |
925 | +#else | |
926 | _table = gtk_table_new(rows, | |
927 | BUTTON_H_ALIGN, | |
928 | TRUE); | |
929 | gtk_table_set_row_spacings(GTK_TABLE(_table), 3); | |
930 | gtk_table_set_col_spacings(GTK_TABLE(_table), 3); | |
931 | +#endif | |
932 | ||
933 | for (i=0; i < rows; i++) { | |
934 | for (j=0; j < BUTTON_H_ALIGN; j++) { | |
935 | @@ -338,10 +367,16 @@ buttontable_create(gchar **table, int len) | |
936 | g_signal_connect(button, "clicked", | |
937 | G_CALLBACK(padbutton_clicked), "button"); | |
938 | ||
939 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
940 | + gtk_widget_set_hexpand(button, TRUE); | |
941 | + gtk_widget_set_vexpand(button, TRUE); | |
942 | + gtk_grid_attach(GTK_GRID(_table), button, j, i, 1, 1); | |
943 | +#else | |
944 | gtk_table_attach_defaults(GTK_TABLE(_table), | |
945 | button, | |
946 | j, j + 1, | |
947 | i, i + 1); | |
948 | +#endif | |
949 | } | |
950 | } | |
951 | out: | |
952 | diff --git a/gtk2/pref/gtk-custom-widgets.c b/gtk2/pref/gtk-custom-widgets.c | |
953 | index b1cdff6e..1307d7c0 100644 | |
954 | --- a/gtk2/pref/gtk-custom-widgets.c | |
955 | +++ b/gtk2/pref/gtk-custom-widgets.c | |
956 | @@ -1,6 +1,6 @@ | |
957 | /* | |
958 | ||
959 | - Copyright (c) 2005-2013 uim Project http://code.google.com/p/uim/ | |
960 | + Copyright (c) 2005-2013 uim Project https://github.com/uim/uim | |
961 | ||
962 | All rights reserved. | |
963 | ||
964 | @@ -1280,18 +1280,30 @@ choose_olist_clicked_cb(GtkWidget *widget, GtkEntry *olist_entry) | |
965 | FALSE, FALSE, 4); | |
966 | gtk_widget_show(vbox); | |
967 | ||
968 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
969 | + table = gtk_grid_new(); | |
970 | + gtk_grid_set_row_spacing(GTK_GRID(table), 3); | |
971 | + gtk_grid_set_column_spacing(GTK_GRID(table), 3); | |
972 | +#else | |
973 | table = gtk_table_new(3, 6, FALSE); | |
974 | gtk_table_set_row_spacings(GTK_TABLE(table), 3); | |
975 | gtk_table_set_col_spacings(GTK_TABLE(table), 3); | |
976 | +#endif | |
977 | gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); | |
978 | gtk_widget_show(table); | |
979 | ||
980 | /* up button */ | |
981 | button = gtk_button_new(); | |
982 | olist_pref_win.up_button = button; | |
983 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
984 | + gtk_widget_set_hexpand(button, TRUE); | |
985 | + gtk_widget_set_vexpand(button, TRUE); | |
986 | + gtk_grid_attach(GTK_GRID(table), button, 1, 0, 1, 1); | |
987 | +#else | |
988 | gtk_table_attach_defaults(GTK_TABLE(table), button, | |
989 | 1, 2, | |
990 | 0, 1); | |
991 | +#endif | |
992 | gtk_widget_show(button); | |
993 | arrow = gtk_arrow_new(GTK_ARROW_UP, GTK_SHADOW_NONE); | |
994 | gtk_container_add(GTK_CONTAINER(button), arrow); | |
995 | @@ -1302,9 +1314,15 @@ choose_olist_clicked_cb(GtkWidget *widget, GtkEntry *olist_entry) | |
996 | /* down button */ | |
997 | button = gtk_button_new(); | |
998 | olist_pref_win.down_button = button; | |
999 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
1000 | + gtk_widget_set_hexpand(button, TRUE); | |
1001 | + gtk_widget_set_vexpand(button, TRUE); | |
1002 | + gtk_grid_attach(GTK_GRID(table), button, 1, 2, 1, 1); | |
1003 | +#else | |
1004 | gtk_table_attach_defaults(GTK_TABLE(table), button, | |
1005 | 1, 2, | |
1006 | 2, 3); | |
1007 | +#endif | |
1008 | gtk_widget_show(button); | |
1009 | arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE); | |
1010 | gtk_container_add(GTK_CONTAINER(button), arrow); | |
1011 | @@ -1315,9 +1333,15 @@ choose_olist_clicked_cb(GtkWidget *widget, GtkEntry *olist_entry) | |
1012 | /* left button */ | |
1013 | button = gtk_button_new(); | |
1014 | olist_pref_win.left_button = button; | |
1015 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
1016 | + gtk_widget_set_hexpand(button, TRUE); | |
1017 | + gtk_widget_set_vexpand(button, TRUE); | |
1018 | + gtk_grid_attach(GTK_GRID(table), button, 0, 1, 1, 1); | |
1019 | +#else | |
1020 | gtk_table_attach_defaults(GTK_TABLE(table), button, | |
1021 | 0, 1, | |
1022 | 1, 2); | |
1023 | +#endif | |
1024 | gtk_widget_show(button); | |
1025 | arrow = gtk_arrow_new(GTK_ARROW_LEFT, GTK_SHADOW_NONE); | |
1026 | gtk_container_add(GTK_CONTAINER(button), arrow); | |
1027 | @@ -1328,9 +1352,15 @@ choose_olist_clicked_cb(GtkWidget *widget, GtkEntry *olist_entry) | |
1028 | /* right button */ | |
1029 | button = gtk_button_new(); | |
1030 | olist_pref_win.right_button = button; | |
1031 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
1032 | + gtk_widget_set_hexpand(button, TRUE); | |
1033 | + gtk_widget_set_vexpand(button, TRUE); | |
1034 | + gtk_grid_attach(GTK_GRID(table), button, 2, 1, 1, 1); | |
1035 | +#else | |
1036 | gtk_table_attach_defaults(GTK_TABLE(table), button, | |
1037 | 2, 3, | |
1038 | 1, 2); | |
1039 | +#endif | |
1040 | gtk_widget_show(button); | |
1041 | arrow = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE); | |
1042 | gtk_container_add(GTK_CONTAINER(button), arrow); | |
1043 | diff --git a/gtk2/pref/gtk.c b/gtk2/pref/gtk.c | |
1044 | index 72747362..08a02fdb 100644 | |
1045 | --- a/gtk2/pref/gtk.c | |
1046 | +++ b/gtk2/pref/gtk.c | |
1047 | @@ -1,6 +1,6 @@ | |
1048 | /* | |
1049 | ||
1050 | - Copyright (c) 2005-2013 uim Project http://code.google.com/p/uim/ | |
1051 | + Copyright (c) 2005-2013 uim Project https://github.com/uim/uim | |
1052 | ||
1053 | All rights reserved. | |
1054 | ||
1055 | @@ -439,8 +439,12 @@ create_group_widget(const char *group_name) | |
1056 | #else | |
1057 | vbox = gtk_vbox_new(FALSE, 8); | |
1058 | #endif | |
1059 | +#if GTK_CHECK_VERSION(3, 8, 0) | |
1060 | + gtk_container_add(GTK_CONTAINER(scrolled_win), vbox); | |
1061 | +#else | |
1062 | gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_win), | |
1063 | vbox); | |
1064 | +#endif | |
1065 | ||
1066 | gtk_container_set_border_width(GTK_CONTAINER(vbox), 4); | |
1067 | ||
1068 | diff --git a/gtk2/toolbar/Makefile.am b/gtk2/toolbar/Makefile.am | |
1069 | index 887fb6f0..48773a56 100644 | |
1070 | --- a/gtk2/toolbar/Makefile.am | |
1071 | +++ b/gtk2/toolbar/Makefile.am | |
1072 | @@ -2,15 +2,15 @@ EXTRA_DIST = GNOME_UimApplet.server.in.in | |
1073 | ||
1074 | helper_defs = -DUIM_DATADIR=\""$(datadir)/@PACKAGE@"\" | |
1075 | ||
1076 | -if APPLET_GNOME | |
1077 | +if GNOME_APPLET | |
1078 | libexec_PROGRAMS = uim-toolbar-applet | |
1079 | ||
1080 | -uim_toolbar_applet_LDADD = @GTK2_LIBS@ @APPLET_GNOME_LIBS@ \ | |
1081 | +uim_toolbar_applet_LDADD = @GTK2_LIBS@ @GNOME_APPLET_LIBS@ \ | |
1082 | $(top_builddir)/uim/libuim-scm.la \ | |
1083 | $(top_builddir)/uim/libuim.la \ | |
1084 | $(top_builddir)/uim/libuim-custom.la | |
1085 | uim_toolbar_applet_CPPFLAGS = $(helper_defs) -I$(top_srcdir) -I$(top_builddir) | |
1086 | -uim_toolbar_applet_CFLAGS = @GTK2_CFLAGS@ @APPLET_GNOME_CFLAGS@ | |
1087 | +uim_toolbar_applet_CFLAGS = @GTK2_CFLAGS@ @GNOME_APPLET_CFLAGS@ | |
1088 | if GCC | |
1089 | # to cancel "-std=gnu89 -pedantic -Werror" and accept the string | |
1090 | # uim_menu_xml longer than ISO C 89 maximum length (509) | |
1091 | diff --git a/gtk2/toolbar/common-gtk.c b/gtk2/toolbar/common-gtk.c | |
1092 | index 1deefaa6..c63519ba 100644 | |
1093 | --- a/gtk2/toolbar/common-gtk.c | |
1094 | +++ b/gtk2/toolbar/common-gtk.c | |
1095 | @@ -1,6 +1,6 @@ | |
1096 | /* | |
1097 | ||
1098 | - Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
1099 | + Copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
1100 | ||
1101 | All rights reserved. | |
1102 | ||
1103 | @@ -171,31 +171,65 @@ static gboolean prop_menu_showing = FALSE; | |
1104 | static gboolean custom_enabled; | |
1105 | static gboolean with_dark_bg; | |
1106 | ||
1107 | -static void set_button_style(GtkWidget *button); | |
1108 | +static void set_button_style(GtkWidget *button, gint type); | |
1109 | static const char *safe_gettext(const char *msgid); | |
1110 | static gboolean has_n_strs(gchar **str_list, guint n); | |
1111 | static gboolean register_icon(const gchar *name); | |
1112 | static void reset_icon(void); | |
1113 | ||
1114 | static void | |
1115 | -set_button_style(GtkWidget *button) | |
1116 | +set_button_style(GtkWidget *button, gint type) | |
1117 | { | |
1118 | #if GTK_CHECK_VERSION(2, 90, 0) | |
1119 | GtkStyleContext *context = gtk_widget_get_style_context(button); | |
1120 | GtkCssProvider *provider = gtk_css_provider_new(); | |
1121 | - gtk_css_provider_load_from_data(provider, | |
1122 | - "#uim-systray-button {\n" | |
1123 | - " -GtkWidget-focus-line-width: 0;\n" | |
1124 | - " -GtkWidget-focus-padding: 0;\n" | |
1125 | - " padding-top: 0;\n" | |
1126 | - " padding-bottom: 0;\n" | |
1127 | - "}\n", -1, NULL); | |
1128 | + switch (type) { | |
1129 | + case TYPE_ICON: | |
1130 | + gtk_css_provider_load_from_data(provider, | |
1131 | + "#uim-systray-button {\n" | |
1132 | +#if GTK_CHECK_VERSION(3, 14, 0) | |
1133 | + " outline-width: 0;\n" | |
1134 | +#else | |
1135 | + " -GtkWidget-focus-line-width: 0;\n" | |
1136 | + " -GtkWidget-focus-padding: 0;\n" | |
1137 | +#endif | |
1138 | + " padding-top: 0;\n" | |
1139 | + " padding-bottom: 0;\n" | |
1140 | + " padding-left: 2px;\n" | |
1141 | + " padding-right: 2px;\n" | |
1142 | + "}\n", -1, NULL); | |
1143 | + break; | |
1144 | + case TYPE_STANDALONE: | |
1145 | + gtk_css_provider_load_from_data(provider, | |
1146 | + "#uim-toolbar-button {\n" | |
1147 | + " padding-left: 5px;\n" | |
1148 | + " padding-right: 5px;\n" | |
1149 | + "}\n", -1, NULL); | |
1150 | + break; | |
1151 | + case TYPE_APPLET: | |
1152 | + gtk_css_provider_load_from_data(provider, | |
1153 | + "#uim-applet-button {\n" | |
1154 | + " padding-left: 2px;\n" | |
1155 | + " padding-right: 2px;\n" | |
1156 | + "}\n", -1, NULL); | |
1157 | + break; | |
1158 | + } | |
1159 | gtk_style_context_add_provider(context, | |
1160 | GTK_STYLE_PROVIDER(provider), | |
1161 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | |
1162 | g_object_unref(provider); | |
1163 | #endif | |
1164 | - gtk_widget_set_name(button, "uim-systray-button"); | |
1165 | + switch (type) { | |
1166 | + case TYPE_ICON: | |
1167 | + gtk_widget_set_name(button, "uim-systray-button"); | |
1168 | + break; | |
1169 | + case TYPE_STANDALONE: | |
1170 | + gtk_widget_set_name(button, "uim-toolbar-button"); | |
1171 | + break; | |
1172 | + case TYPE_APPLET: | |
1173 | + gtk_widget_set_name(button, "uim-applet-button"); | |
1174 | + break; | |
1175 | + } | |
1176 | } | |
1177 | ||
1178 | static const char * | |
1179 | @@ -605,14 +639,11 @@ tool_button_destroy(gpointer data, gpointer user_data) | |
1180 | gtk_widget_destroy(GTK_WIDGET(data)); | |
1181 | } | |
1182 | ||
1183 | -static GtkWidget * | |
1184 | -prop_button_create(GtkWidget *widget, const gchar *icon_name, | |
1185 | - const gchar *label, const gchar *tip_text) | |
1186 | +static GtkWidget* | |
1187 | +button_create(GtkWidget *widget, GtkSizeGroup *sg, const gchar *icon_name, | |
1188 | + const gchar *label, gint type) | |
1189 | { | |
1190 | GtkWidget *button; | |
1191 | - GtkSizeGroup *sg; | |
1192 | - | |
1193 | - sg = g_object_get_data(G_OBJECT(widget), OBJECT_DATA_SIZE_GROUP); | |
1194 | ||
1195 | if (register_icon(icon_name)) { | |
1196 | GtkWidget *img = gtk_image_new_from_stock(icon_name, GTK_ICON_SIZE_MENU); | |
1197 | @@ -622,18 +653,35 @@ prop_button_create(GtkWidget *widget, const gchar *icon_name, | |
1198 | button = gtk_button_new_with_label(label); | |
1199 | } | |
1200 | ||
1201 | - if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), | |
1202 | - OBJECT_DATA_TOOLBAR_TYPE)) == TYPE_ICON) | |
1203 | - set_button_style(button); | |
1204 | + set_button_style(button, type); | |
1205 | ||
1206 | gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1207 | gtk_size_group_add_widget(sg, button); | |
1208 | g_object_set_data(G_OBJECT(button), OBJECT_DATA_BUTTON_TYPE, | |
1209 | GINT_TO_POINTER(BUTTON_PROP)); | |
1210 | - gtk_widget_set_tooltip_text(button, tip_text); | |
1211 | ||
1212 | g_signal_connect(G_OBJECT(button), "button-press-event", | |
1213 | G_CALLBACK(button_pressed), widget); | |
1214 | + | |
1215 | + return button; | |
1216 | +} | |
1217 | + | |
1218 | +static GtkWidget * | |
1219 | +prop_button_create(GtkWidget *widget, const gchar *icon_name, | |
1220 | + const gchar *label, const gchar *tip_text) | |
1221 | +{ | |
1222 | + GtkWidget *button; | |
1223 | + GtkSizeGroup *sg; | |
1224 | + gint type; | |
1225 | + | |
1226 | + sg = g_object_get_data(G_OBJECT(widget), OBJECT_DATA_SIZE_GROUP); | |
1227 | + type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), | |
1228 | + OBJECT_DATA_TOOLBAR_TYPE)); | |
1229 | + | |
1230 | + button = button_create(widget, sg, icon_name, label, type); | |
1231 | + | |
1232 | + gtk_widget_set_tooltip_text(button, tip_text); | |
1233 | + | |
1234 | g_signal_connect(G_OBJECT(button), "button-release-event", | |
1235 | G_CALLBACK(prop_button_released), widget); | |
1236 | ||
1237 | @@ -829,9 +877,9 @@ helper_toolbar_prop_list_update(GtkWidget *widget, gchar **lines) | |
1238 | ||
1239 | tool_button = gtk_button_new(); | |
1240 | ||
1241 | - if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), | |
1242 | - OBJECT_DATA_TOOLBAR_TYPE)) == TYPE_ICON) | |
1243 | - set_button_style(tool_button); | |
1244 | + set_button_style(tool_button, | |
1245 | + GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), | |
1246 | + OBJECT_DATA_TOOLBAR_TYPE))); | |
1247 | ||
1248 | g_object_set_data(G_OBJECT(tool_button), OBJECT_DATA_BUTTON_TYPE, | |
1249 | GINT_TO_POINTER(BUTTON_TOOL)); | |
1250 | @@ -1102,24 +1150,9 @@ toolbar_new(gint type) | |
1251 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
1252 | ||
1253 | /* prop menu button */ | |
1254 | - if (register_icon("uim-icon")) { | |
1255 | - GtkWidget *img = gtk_image_new_from_stock("uim-icon", GTK_ICON_SIZE_MENU); | |
1256 | - button = gtk_button_new(); | |
1257 | - gtk_container_add(GTK_CONTAINER(button), img); | |
1258 | - } else { | |
1259 | - button = gtk_button_new_with_label(" x"); | |
1260 | - } | |
1261 | + button = button_create(hbox, sg, "uim-icon", " x", type); | |
1262 | ||
1263 | - if (type == TYPE_ICON) | |
1264 | - set_button_style(button); | |
1265 | - | |
1266 | - gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1267 | - gtk_size_group_add_widget(sg, button); | |
1268 | - g_signal_connect(G_OBJECT(button), "button-press-event", | |
1269 | - G_CALLBACK(button_pressed), hbox); | |
1270 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1271 | - g_object_set_data(G_OBJECT(button), OBJECT_DATA_BUTTON_TYPE, | |
1272 | - GINT_TO_POINTER(BUTTON_PROP)); | |
1273 | ||
1274 | prop_buttons = g_list_append(prop_buttons, button); | |
1275 | ||
1276 | diff --git a/gtk2/toolbar/eggtrayicon.c b/gtk2/toolbar/eggtrayicon.c | |
1277 | index 7c0f51f9..6d944ca6 100644 | |
1278 | --- a/gtk2/toolbar/eggtrayicon.c | |
1279 | +++ b/gtk2/toolbar/eggtrayicon.c | |
1280 | @@ -727,8 +727,14 @@ egg_tray_icon_realize (GtkWidget *widget) | |
1281 | if (icon->manager_visual_rgba) | |
1282 | { | |
1283 | /* Set a transparent background */ | |
1284 | +#if GTK_CHECK_VERSION(3, 4, 0) | |
1285 | + GdkRGBA transparent = { 0, 0, 0, 0 }; | |
1286 | + gdk_window_set_background_rgba (gtk_widget_get_window(widget), | |
1287 | + &transparent); | |
1288 | +#else | |
1289 | GdkColor transparent = { 0, 0, 0, 0 }; /* Only pixel=0 matters */ | |
1290 | gdk_window_set_background (gtk_widget_get_window(widget), &transparent); | |
1291 | +#endif | |
1292 | } | |
1293 | else | |
1294 | { | |
1295 | diff --git a/gtk3/immodule/Makefile.am b/gtk3/immodule/Makefile.am | |
1296 | index 40554967..18c26f5f 100644 | |
1297 | --- a/gtk3/immodule/Makefile.am | |
1298 | +++ b/gtk3/immodule/Makefile.am | |
1299 | @@ -35,26 +35,16 @@ IM_UIM_SOURCES = \ | |
1300 | ../../gtk2/immodule/compose.c ../../gtk2/immodule/compose.h \ | |
1301 | ../../gtk2/immodule/text-util.c ../../gtk2/immodule/text-util.h | |
1302 | ||
1303 | -noinst_PROGRAMS = gtk3-rc-get-immodule-file | |
1304 | -gtk3_rc_get_immodule_file_SOURCES = \ | |
1305 | - ../../gtk2/immodule/gtk-rc-get-immodule-file.c | |
1306 | -gtk3_rc_get_immodule_file_CFLAGS = @GTK3_CFLAGS@ | |
1307 | -gtk3_rc_get_immodule_file_LDADD = @GTK3_LIBS@ | |
1308 | -GTK3_RC_GET_IMMODULE_FILE = $(top_builddir)/gtk3/immodule/gtk3-rc-get-immodule-file | |
1309 | QUERY_COMMAND = gtk-query-immodules-3.0 | |
1310 | ||
1311 | -install-data-hook: gtk3-rc-get-immodule-file | |
1312 | +install-data-hook: | |
1313 | if test -z $(DESTDIR); then \ | |
1314 | if test $(libdir) = $(GTK3_LIBDIR); then \ | |
1315 | if type $(QUERY_COMMAND) > /dev/null 2>&1; then \ | |
1316 | $(QUERY_COMMAND) --update-cache; \ | |
1317 | - echo "*** \"`$(GTK3_RC_GET_IMMODULE_FILE)`\" is updated. ***"; \ | |
1318 | else \ | |
1319 | echo "********************** Warning ***********************"; \ | |
1320 | echo " $(QUERY_COMMAND) not found"; \ | |
1321 | - echo " Please make sure to update"; \ | |
1322 | - echo " \"`$(GTK3_RC_GET_IMMODULE_FILE)`\""; \ | |
1323 | - echo " manually."; \ | |
1324 | echo "******************************************************"; \ | |
1325 | fi \ | |
1326 | else \ | |
1327 | diff --git a/gtk3/toolbar/Makefile.am b/gtk3/toolbar/Makefile.am | |
1328 | index 201d5121..e78fced5 100644 | |
1329 | --- a/gtk3/toolbar/Makefile.am | |
1330 | +++ b/gtk3/toolbar/Makefile.am | |
1331 | @@ -1,46 +1,47 @@ | |
1332 | EXTRA_DIST = UimApplet.panel-applet.in.in \ | |
1333 | - org.gnome.panel.applet.UimAppletFactory.service.in | |
1334 | + uim-applet-menu.xml | |
1335 | ||
1336 | -if APPLET_GNOME3 | |
1337 | +if GNOME3_APPLET | |
1338 | helper_defs = -DUIM_DATADIR=\""$(datadir)/@PACKAGE@"\" | |
1339 | ||
1340 | -libexec_PROGRAMS = uim-toolbar-applet-gnome3 | |
1341 | +uim_toolbar_applet_gnome3_libdir = $(pkglibdir) | |
1342 | +uim_toolbar_applet_gnome3_lib_LTLIBRARIES = libuim-toolbar-applet-gnome3.la | |
1343 | ||
1344 | -uim_toolbar_applet_gnome3_LDADD = @GTK3_LIBS@ @APPLET_GNOME3_LIBS@ \ | |
1345 | +xmluidir = $(pkgdatadir)/ui | |
1346 | +xmlui_DATA = uim-applet-menu.xml | |
1347 | + | |
1348 | +libuim_toolbar_applet_gnome3_la_LIBADD = @GTK3_LIBS@ @GNOME3_APPLET_LIBS@ \ | |
1349 | $(top_builddir)/uim/libuim-scm.la \ | |
1350 | $(top_builddir)/uim/libuim.la \ | |
1351 | $(top_builddir)/uim/libuim-custom.la | |
1352 | -uim_toolbar_applet_gnome3_CPPFLAGS = \ | |
1353 | +libuim_toolbar_applet_gnome3_la_CPPFLAGS = \ | |
1354 | + -DUIM_UIDATADIR="\"${xmluidir}\"" \ | |
1355 | $(helper_defs) -I$(top_srcdir) -I$(top_builddir) | |
1356 | - | |
1357 | -uim_toolbar_applet_gnome3_CFLAGS = @GTK3_CFLAGS@ @APPLET_GNOME3_CFLAGS@ | |
1358 | +libuim_toolbar_applet_gnome3_la_LDFLAGS = \ | |
1359 | + -module -avoid-version | |
1360 | + | |
1361 | +libuim_toolbar_applet_gnome3_la_CFLAGS = @GTK3_CFLAGS@ @GNOME3_APPLET_CFLAGS@ | |
1362 | ||
1363 | -uim_toolbar_applet_gnome3_SOURCES = applet-gnome3.c \ | |
1364 | +libuim_toolbar_applet_gnome3_la_SOURCES = applet-gnome3.c \ | |
1365 | ../../gtk2/toolbar/common-gtk.c | |
1366 | ||
1367 | -appletdir = $(datadir)/gnome-panel/4.0/applets | |
1368 | +APPLET_LOCATION = $(pkglibdir)/libuim-toolbar-applet-gnome3.so | |
1369 | + | |
1370 | +appletdir = $(LIBPANEL_APPLET_DIR) | |
1371 | applet_DATA = UimApplet.panel-applet | |
1372 | applet_in_files = $(applet_DATA:=.in) | |
1373 | applet_in_in_files = $(applet_in_files:=.in) | |
1374 | ||
1375 | $(applet_in_files): $(applet_in_in_files) Makefile | |
1376 | - $(SED) s,@LIBEXECDIR@,$(libexecdir),g <$< >$@.tmp | |
1377 | + $(SED) s,@APPLET_LOCATION@,$(APPLET_LOCATION),g <$< >$@.tmp | |
1378 | $(SED) s,@UIM_PIXMAPSDIR@,$(uim_pixmapsdir),g <$@.tmp >$@ | |
1379 | ||
1380 | po_files = $(wildcard $(top_srcdir)/po/*.po) | |
1381 | $(applet_DATA): $(applet_in_files) $(INTLTOOL_MERGE) $(po_files) | |
1382 | LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ | |
1383 | ||
1384 | -servicedir = $(datadir)/dbus-1/services | |
1385 | -service_DATA = org.gnome.panel.applet.UimAppletFactory.service | |
1386 | -service_in_files = $(service_DATA:=.in) | |
1387 | - | |
1388 | -$(service_DATA): $(service_in_files) Makefile | |
1389 | - sed s,@LIBEXECDIR@,$(libexecdir),g <$< >$@ | |
1390 | - | |
1391 | DISTCLEANFILES = UimApplet.panel-applet.in UimApplet.panel-applet \ | |
1392 | - UimApplet.panel-applet.in.tmp \ | |
1393 | - org.gnome.panel.applet.UimAppletFactory.service | |
1394 | + UimApplet.panel-applet.in.tmp | |
1395 | endif | |
1396 | ||
1397 | if GTK3 | |
1398 | diff --git a/gtk3/toolbar/UimApplet.panel-applet.in.in b/gtk3/toolbar/UimApplet.panel-applet.in.in | |
1399 | index 88550957..c2e2696b 100644 | |
1400 | --- a/gtk3/toolbar/UimApplet.panel-applet.in.in | |
1401 | +++ b/gtk3/toolbar/UimApplet.panel-applet.in.in | |
1402 | @@ -1,6 +1,7 @@ | |
1403 | [Applet Factory] | |
1404 | Id=UimAppletFactory | |
1405 | -Location=@LIBEXECDIR@/uim-toolbar-applet-gnome3 | |
1406 | +InProcess=true | |
1407 | +Location=@APPLET_LOCATION@ | |
1408 | _Name=uim Applet Factory | |
1409 | _Description=uim applet factory | |
1410 | ||
1411 | diff --git a/gtk3/toolbar/applet-gnome3.c b/gtk3/toolbar/applet-gnome3.c | |
1412 | index 19d19930..708f0342 100644 | |
1413 | --- a/gtk3/toolbar/applet-gnome3.c | |
1414 | +++ b/gtk3/toolbar/applet-gnome3.c | |
1415 | @@ -1,6 +1,6 @@ | |
1416 | /* | |
1417 | ||
1418 | - Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/ | |
1419 | + Copyright (c) 2003-2013 uim Project https://github.com/uim/uim | |
1420 | ||
1421 | All rights reserved. | |
1422 | ||
1423 | @@ -44,83 +44,66 @@ | |
1424 | ||
1425 | PanelApplet *uimapplet; | |
1426 | ||
1427 | -static void exec_switcher(GtkAction *action, gpointer data); | |
1428 | -static void exec_pref(GtkAction *action, gpointer data); | |
1429 | -static void exec_dic(GtkAction *action, gpointer data); | |
1430 | -static void exec_pad(GtkAction *action, gpointer data); | |
1431 | -static void exec_hand(GtkAction *action, gpointer data); | |
1432 | -static void exec_help(GtkAction *action, gpointer data); | |
1433 | -static void display_about_dialog(GtkAction *action, gpointer data); | |
1434 | +static void exec_switcher(GSimpleAction *action, GVariant *parameter, gpointer data); | |
1435 | +static void exec_pref(GSimpleAction *action, GVariant *parameter, gpointer data); | |
1436 | +static void exec_dic(GSimpleAction *action, GVariant *parameter, gpointer data); | |
1437 | +static void exec_pad(GSimpleAction *action, GVariant *parameter, gpointer data); | |
1438 | +static void exec_hand(GSimpleAction *action, GVariant *parameter, gpointer data); | |
1439 | +static void exec_help(GSimpleAction *action, GVariant *parameter, gpointer data); | |
1440 | +static void display_about_dialog(GSimpleAction *action, GVariant *parameter, gpointer data); | |
1441 | ||
1442 | extern GtkWidget *uim_toolbar_applet_new(void); | |
1443 | extern void uim_toolbar_launch_helper_application(const char *command); | |
1444 | ||
1445 | - | |
1446 | -static const GtkActionEntry uim_menu_actions[] = { | |
1447 | - {"Switcher", "im_switcher", | |
1448 | - N_("Switch input method"), NULL, NULL, G_CALLBACK(exec_switcher)}, | |
1449 | - {"Pref", GTK_STOCK_PREFERENCES, | |
1450 | - N_("Preference"), NULL, NULL, G_CALLBACK(exec_pref)}, | |
1451 | - {"Dic", "uim-dict", | |
1452 | - N_("Japanese dictionary editor"), NULL, NULL, G_CALLBACK(exec_dic)}, | |
1453 | - {"Pad", GTK_STOCK_BOLD, | |
1454 | - N_("Input pad"), NULL, NULL, G_CALLBACK(exec_pad)}, | |
1455 | - {"Hand", GTK_STOCK_EDIT, | |
1456 | - N_("Handwriting input pad"), NULL, NULL, G_CALLBACK(exec_hand)}, | |
1457 | - {"Help", GTK_STOCK_HELP, | |
1458 | - N_("Help"), NULL, NULL, G_CALLBACK(exec_help)}, | |
1459 | - {"About", GTK_STOCK_ABOUT, | |
1460 | - N_("About"), NULL, NULL, G_CALLBACK(display_about_dialog)} | |
1461 | +static const GActionEntry uim_menu_actions[] = { | |
1462 | + { "switcher", exec_switcher }, | |
1463 | + { "pref", exec_pref }, | |
1464 | + { "dic", exec_dic }, | |
1465 | + { "pad", exec_pad }, | |
1466 | + { "hand", exec_hand }, | |
1467 | + { "help", exec_help }, | |
1468 | + { "about", display_about_dialog } | |
1469 | }; | |
1470 | ||
1471 | -static const char uim_menu_xml[] = | |
1472 | - "<menuitem action=\"Switcher\"/>" | |
1473 | - "<menuitem action=\"Pref\"/>" | |
1474 | - "<menuitem action=\"Dic\"/>" | |
1475 | - "<menuitem action=\"Pad\"/>" | |
1476 | - "<menuitem action=\"Hand\"/>" | |
1477 | - "<menuitem action=\"Help\"/>" | |
1478 | - "<menuitem action=\"About\"/>"; | |
1479 | - | |
1480 | static void | |
1481 | -exec_switcher(GtkAction *action, gpointer data) | |
1482 | +exec_switcher(GSimpleAction *action, GVariant *parameter, gpointer data) | |
1483 | { | |
1484 | uim_toolbar_launch_helper_application("uim-im-switcher-gtk3"); | |
1485 | } | |
1486 | ||
1487 | static void | |
1488 | -exec_pref(GtkAction *action, gpointer data) | |
1489 | +exec_pref(GSimpleAction *action, GVariant *parameter, gpointer data) | |
1490 | { | |
1491 | uim_toolbar_launch_helper_application("uim-pref-gtk3"); | |
1492 | } | |
1493 | ||
1494 | static void | |
1495 | -exec_dic(GtkAction *action, gpointer data) | |
1496 | +exec_dic(GSimpleAction *action, GVariant *parameter, gpointer data) | |
1497 | { | |
1498 | uim_toolbar_launch_helper_application("uim-dict-gtk3"); | |
1499 | } | |
1500 | ||
1501 | static void | |
1502 | -exec_pad(GtkAction *action, gpointer data) | |
1503 | +exec_pad(GSimpleAction *action, GVariant *parameter, gpointer data) | |
1504 | { | |
1505 | uim_toolbar_launch_helper_application("uim-input-pad-ja-gtk3"); | |
1506 | } | |
1507 | ||
1508 | static void | |
1509 | -exec_hand(GtkAction *action, gpointer data) | |
1510 | +exec_hand(GSimpleAction *action, GVariant *parameter, gpointer data) | |
1511 | { | |
1512 | uim_toolbar_launch_helper_application("uim-tomoe-gtk"); | |
1513 | } | |
1514 | ||
1515 | static void | |
1516 | -exec_help(GtkAction *uic, gpointer data) | |
1517 | +exec_help(GSimpleAction *action, GVariant *parameter, gpointer data) | |
1518 | { | |
1519 | uim_toolbar_launch_helper_application("uim-help"); | |
1520 | } | |
1521 | ||
1522 | /* Just the about window... If it's already open, just focus it */ | |
1523 | static void | |
1524 | -display_about_dialog(GtkAction *action, gpointer data) | |
1525 | +display_about_dialog(GSimpleAction *action, GVariant *parameter, gpointer data) | |
1526 | { | |
1527 | GdkPixbuf *icon = NULL; | |
1528 | const gchar *authors[] = {"uim Project", NULL}; | |
1529 | @@ -149,7 +132,8 @@ static gboolean | |
1530 | uim_applet_new(PanelApplet *applet, const gchar *iid, gpointer data) | |
1531 | { | |
1532 | GtkWidget *toolbar; | |
1533 | - GtkActionGroup *action_group; | |
1534 | + GSimpleActionGroup *action_group; | |
1535 | + gchar *ui_path; | |
1536 | ||
1537 | uimapplet = applet; | |
1538 | ||
1539 | @@ -164,11 +148,16 @@ uim_applet_new(PanelApplet *applet, const gchar *iid, gpointer data) | |
1540 | ||
1541 | gtk_widget_show_all(GTK_WIDGET(applet)); | |
1542 | ||
1543 | - action_group = gtk_action_group_new("uim Applet Actions"); | |
1544 | - gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE); | |
1545 | - gtk_action_group_add_actions(action_group, uim_menu_actions, | |
1546 | + action_group = g_simple_action_group_new(); | |
1547 | + g_action_map_add_action_entries(G_ACTION_MAP (action_group), uim_menu_actions, | |
1548 | G_N_ELEMENTS(uim_menu_actions), toolbar); | |
1549 | - panel_applet_setup_menu(applet, uim_menu_xml, action_group); | |
1550 | + | |
1551 | + ui_path = g_build_filename (UIM_UIDATADIR, "uim-applet-menu.xml", NULL); | |
1552 | + panel_applet_setup_menu_from_file(applet, ui_path, action_group, GETTEXT_PACKAGE); | |
1553 | + g_free(ui_path); | |
1554 | + | |
1555 | + gtk_widget_insert_action_group (GTK_WIDGET (applet), "uim", | |
1556 | + G_ACTION_GROUP (action_group)); | |
1557 | #if LIBPANEL_APPLET_HAVE_SET_BACKGROUND_WIDGET | |
1558 | panel_applet_set_background_widget(applet, GTK_WIDGET(applet)); | |
1559 | #endif | |
1560 | @@ -179,7 +168,7 @@ uim_applet_new(PanelApplet *applet, const gchar *iid, gpointer data) | |
1561 | ||
1562 | ||
1563 | ||
1564 | -PANEL_APPLET_OUT_PROCESS_FACTORY("UimAppletFactory", | |
1565 | +PANEL_APPLET_IN_PROCESS_FACTORY("UimAppletFactory", | |
1566 | PANEL_TYPE_APPLET, | |
1567 | (PanelAppletFactoryCallback)uim_applet_new, | |
1568 | NULL) | |
1569 | diff --git a/gtk3/toolbar/org.gnome.panel.applet.UimAppletFactory.service.in b/gtk3/toolbar/org.gnome.panel.applet.UimAppletFactory.service.in | |
1570 | deleted file mode 100644 | |
1571 | index 04864d08..00000000 | |
1572 | --- a/gtk3/toolbar/org.gnome.panel.applet.UimAppletFactory.service.in | |
1573 | +++ /dev/null | |
1574 | @@ -1,3 +0,0 @@ | |
1575 | -[D-BUS Service] | |
1576 | -Name=org.gnome.panel.applet.UimAppletFactory | |
1577 | -Exec=@LIBEXECDIR@/uim-toolbar-applet-gnome3 | |
1578 | diff --git a/gtk3/toolbar/uim-applet-menu.xml b/gtk3/toolbar/uim-applet-menu.xml | |
1579 | new file mode 100644 | |
1580 | index 00000000..6220369d | |
1581 | --- /dev/null | |
1582 | +++ b/gtk3/toolbar/uim-applet-menu.xml | |
1583 | @@ -0,0 +1,30 @@ | |
1584 | +<section> | |
1585 | + <item> | |
1586 | + <attribute name="label" translatable="yes">Switch input method</attribute> | |
1587 | + <attribute name="action">uim.switcher</attribute> | |
1588 | + </item> | |
1589 | + <item> | |
1590 | + <attribute name="label" translatable="yes">Preference</attribute> | |
1591 | + <attribute name="action">uim.pref</attribute> | |
1592 | + </item> | |
1593 | + <item> | |
1594 | + <attribute name="label" translatable="yes">Japanese dictionary editor</attribute> | |
1595 | + <attribute name="action">uim.dic</attribute> | |
1596 | + </item> | |
1597 | + <item> | |
1598 | + <attribute name="label" translatable="yes">Input pad</attribute> | |
1599 | + <attribute name="action">uim.pad</attribute> | |
1600 | + </item> | |
1601 | + <item> | |
1602 | + <attribute name="label" translatable="yes">Handwriting input pad</attribute> | |
1603 | + <attribute name="action">uim.hand</attribute> | |
1604 | + </item> | |
1605 | + <item> | |
1606 | + <attribute name="label" translatable="yes">Help</attribute> | |
1607 | + <attribute name="action">uim.help</attribute> | |
1608 | + </item> | |
1609 | + <item> | |
1610 | + <attribute name="label" translatable="yes">About</attribute> | |
1611 | + <attribute name="action">uim.about</attribute> | |
1612 | + </item> | |
1613 | +</section> | |
1614 | --- uim-1.8.6/configure.ac.orig 2017-02-11 11:02:15.467236998 +0100 | |
1615 | +++ uim-1.8.6/configure.ac 2017-02-11 11:02:19.537435202 +0100 | |
1616 | @@ -1041,10 +1041,10 @@ | |
1617 | [Determine default toolkit (gtk, gtk3, qt, or qt4) | |
1618 | @<:@default=gtk@:>@]), | |
1619 | [ | |
1620 | - if test x"$enable_default_toolkit" = "xgtk" && test x"$use_gtk2" = "xyes"; then | |
1621 | + if test x"$enable_default_toolkit" = "xgtk" && test x"$with_gtk2" = "xyes"; then | |
1622 | default_toolkit="gtk" | |
1623 | fi | |
1624 | - if test x"$enable_default_toolkit" = "xgtk3" && test x"$use_gtk3" = "xyes"; then | |
1625 | + if test x"$enable_default_toolkit" = "xgtk3" && test x"$with_gtk3" = "xyes"; then | |
1626 | default_toolkit="gtk3" | |
1627 | fi | |
1628 | if test x"$enable_default_toolkit" = "xqt" && test x"$use_qt" = "xyes"; then | |
1629 | @@ -1277,15 +1277,10 @@ | |
1630 | AM_CONDITIONAL(OPENSSL, test x$use_openssl = xyes) | |
1631 | AM_CONDITIONAL(SQLITE3, test x$use_sqlite3 = xyes) | |
1632 | AM_CONDITIONAL(FFI, test x$use_ffi = xyes) | |
1633 | -AM_CONDITIONAL(GTK2, test x$use_gtk2 = xyes) | |
1634 | -AM_CONDITIONAL(GTK2_4, test x$use_gtk2_4 = xyes) | |
1635 | -AM_CONDITIONAL(GTK3, test x$use_gtk3 = xyes) | |
1636 | AM_CONDITIONAL(DEFAULT_TOOLKIT_GTK, test x$default_toolkit = xgtk) | |
1637 | AM_CONDITIONAL(DEFAULT_TOOLKIT_GTK3, test x$default_toolkit = xgtk3) | |
1638 | AM_CONDITIONAL(DEFAULT_TOOLKIT_QT, test x$default_toolkit = xqt) | |
1639 | AM_CONDITIONAL(DEFAULT_TOOLKIT_QT4, test x$default_toolkit = xqt4) | |
1640 | -AM_CONDITIONAL(APPLET_GNOME, test x$use_applet_gnome = xyes) | |
1641 | -AM_CONDITIONAL(APPLET_GNOME3, test x$use_applet_gnome3 = xyes) | |
1642 | AM_CONDITIONAL(UIM_FEP, test x$use_uim_fep = xyes) | |
1643 | AM_CONDITIONAL(UIM_EL, test x$use_uim_el = xyes) | |
1644 | AM_CONDITIONAL(XIM, test x$use_xim = xyes) | |
1645 | @@ -1301,24 +1296,6 @@ | |
1646 | ||
1647 | IT_PROG_INTLTOOL([0.36.3], [no-xml]) | |
1648 | ||
1649 | -GTK_BINARY_VERSION=`$PKG_CONFIG gtk+-2.0 --variable=gtk_binary_version` | |
1650 | -GTK_LIBDIR=`$PKG_CONFIG gtk+-2.0 --variable=libdir` | |
1651 | -AC_SUBST(GTK_BINARY_VERSION) | |
1652 | -AC_SUBST(GTK_LIBDIR) | |
1653 | - | |
1654 | -GTK3_BINARY_VERSION=`$PKG_CONFIG gtk+-3.0 --variable=gtk_binary_version` | |
1655 | -GTK3_LIBDIR=`$PKG_CONFIG gtk+-3.0 --variable=libdir` | |
1656 | -AC_SUBST(GTK3_BINARY_VERSION) | |
1657 | -AC_SUBST(GTK3_LIBDIR) | |
1658 | - | |
1659 | -if test x$use_gtk2 = xyes ; then | |
1660 | -AC_DEFINE(USE_GTK2, 1, [use gtk2]) | |
1661 | -fi | |
1662 | - | |
1663 | -if test x$use_gtk3 = xyes ; then | |
1664 | - AC_DEFINE(USE_GTK3, 1, [use gtk3]) | |
1665 | -fi | |
1666 | - | |
1667 | if test x$use_qt = xyes ; then | |
1668 | # minimum version | |
1669 | QT_VERSION=3.2.0 | |
1670 | @@ -1570,10 +1570,10 @@ | |
1671 | ;; | |
1672 | yes|*) | |
1673 | if test x"$default_toolkit" = "xgtk" && \ | |
1674 | - test x"$use_gtk2_4" = "xyes"; then | |
1675 | + test x"$with_gtk2_4" = "xyes"; then | |
1676 | use_pref="yes" | |
1677 | elif test x"$default_toolkit" = "xgtk3" && \ | |
1678 | - test x"$use_gtk3" = "xyes"; then | |
1679 | + test x"$with_gtk3" = "xyes"; then | |
1680 | use_pref="yes" | |
1681 | elif test x"$default_toolkit" = "xqt" && \ | |
1682 | test x"$use_qt" = "xyes"; then | |
1683 | @@ -1589,10 +1589,10 @@ | |
1684 | esac ], | |
1685 | [ | |
1686 | if test x"$default_toolkit" = "xgtk" && \ | |
1687 | - test x"$use_gtk2_4" = "xyes"; then | |
1688 | + test x"$with_gtk2_4" = "xyes"; then | |
1689 | use_pref="yes" | |
1690 | elif test x"$default_toolkit" = "xgtk3" && \ | |
1691 | - test x"$use_gtk3" = "xyes"; then | |
1692 | + test x"$with_gtk3" = "xyes"; then | |
1693 | use_pref="yes" | |
1694 | elif test x"$default_toolkit" = "xqt" && \ | |
1695 | test x"$use_qt" = "xyes"; then | |
1696 | @@ -2063,10 +2063,10 @@ | |
1697 | OpenSSL : ${use_openssl} | |
1698 | SQLite3 : ${use_sqlite3} | |
1699 | ffi : ${use_ffi} | |
1700 | - Gtk+ : ${use_gtk2} | |
1701 | - Gnome Applet : ${use_applet_gnome} | |
1702 | - Gtk+3 : ${use_gtk3} | |
1703 | - Gnome3 Applet : ${use_applet_gnome3} | |
1704 | + Gtk+ : ${with_gtk2} | |
1705 | + Gnome Applet : ${enable_gnome_applet} | |
1706 | + Gtk+3 : ${with_gtk3} | |
1707 | + Gnome3 Applet : ${enable_gnome3_applet} | |
1708 | Qt3 : ${use_qt} | |
1709 | Qt3 immodule : ${use_qtimmodule} | |
1710 | Qt4 : ${use_qt4} |