]>
Commit | Line | Data |
---|---|---|
f322f76f JB |
1 | --- uim-1.8.9/configure.ac.orig 2022-08-19 02:18:18.000000000 +0200 |
2 | +++ uim-1.8.9/configure.ac 2023-01-31 17:04:41.616929265 +0100 | |
3 | @@ -874,7 +874,7 @@ AC_ARG_ENABLE(gnome3-applet, | |
bd5acb7e JB |
4 | [enable_gnome3_applet=yes]) |
5 | ||
6 | if test "x$enable_gnome3_applet" != xno; then | |
7 | - PKG_CHECK_MODULES(GNOME3_APPLET, libpanel-applet, | |
8 | + PKG_CHECK_MODULES(GNOME3_APPLET, libgnome-panel, | |
9 | enable_gnome3_applet=yes, enable_gnome3_applet=no) | |
10 | fi | |
11 | ||
f322f76f | 12 | @@ -883,7 +883,7 @@ AM_CONDITIONAL(GNOME3_APPLET, test "x$en |
bd5acb7e JB |
13 | if test "x$enable_gnome3_applet" = xyes; then |
14 | AC_ARG_WITH([libpanel-applet-dir], [], [LIBPANEL_APPLET_DIR=$withval], [LIBPANEL_APPLET_DIR=""]) | |
f322f76f | 15 | if test "$LIBPANEL_APPLET_DIR" = ""; then |
bd5acb7e JB |
16 | - LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanel-applet` |
17 | + LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=modulesdir libgnome-panel` | |
18 | fi | |
19 | AC_SUBST(LIBPANEL_APPLET_DIR) | |
20 | fi | |
21 | --- uim-1.8.8/gtk3/toolbar/applet-gnome3.c.orig 2017-08-14 02:07:26.000000000 +0200 | |
22 | +++ uim-1.8.8/gtk3/toolbar/applet-gnome3.c 2020-10-18 09:54:01.329023695 +0200 | |
23 | @@ -38,11 +38,23 @@ | |
24 | #include <stdlib.h> | |
25 | #include <string.h> | |
26 | #include <locale.h> | |
27 | -#include <panel-applet.h> | |
28 | +#include <libgnome-panel/gp-applet.h> | |
29 | +#include <libgnome-panel/gp-module.h> | |
30 | #include <uim/uim.h> | |
31 | #include <uim/gettext.h> | |
32 | ||
33 | -PanelApplet *uimapplet; | |
34 | +G_BEGIN_DECLS | |
35 | +#define UIM_TYPE_APPLET uim_applet_get_type() | |
36 | +G_DECLARE_FINAL_TYPE (UimApplet, uim_applet, UIM, APPLET, GpApplet) | |
37 | +G_END_DECLS | |
38 | + | |
39 | +struct _UimApplet | |
40 | +{ | |
41 | + GpApplet parent; | |
42 | + GtkWidget *toolbar; | |
43 | +}; | |
44 | + | |
45 | +G_DEFINE_TYPE (UimApplet, uim_applet, GP_TYPE_APPLET) | |
46 | ||
47 | static void exec_switcher(GSimpleAction *action, GVariant *parameter, gpointer data); | |
48 | static void exec_pref(GSimpleAction *action, GVariant *parameter, gpointer data); | |
49 | @@ -62,7 +74,8 @@ | |
50 | { "pad", exec_pad }, | |
51 | { "hand", exec_hand }, | |
52 | { "help", exec_help }, | |
53 | - { "about", display_about_dialog } | |
54 | + { "about", display_about_dialog }, | |
55 | + { NULL } | |
56 | }; | |
57 | ||
58 | static void | |
59 | @@ -128,47 +141,60 @@ | |
60 | } | |
61 | } | |
62 | ||
63 | -static gboolean | |
64 | -uim_applet_new(PanelApplet *applet, const gchar *iid, gpointer data) | |
65 | +static void | |
66 | +uim_applet_init(UimApplet *uim_applet) | |
67 | { | |
68 | - GtkWidget *toolbar; | |
69 | - GSimpleActionGroup *action_group; | |
70 | gchar *ui_path; | |
71 | - | |
72 | - uimapplet = applet; | |
73 | - | |
74 | - if (strcmp(iid, "UimApplet") != 0) | |
75 | - return FALSE; | |
76 | - | |
77 | - uim_init(); | |
78 | - | |
79 | - toolbar = (GtkWidget*)uim_toolbar_applet_new(); | |
80 | ||
81 | - gtk_container_add(GTK_CONTAINER(applet), toolbar); | |
82 | + uim_applet->toolbar = (GtkWidget*)uim_toolbar_applet_new(); | |
83 | ||
84 | - gtk_widget_show_all(GTK_WIDGET(applet)); | |
85 | + gtk_container_add(GTK_CONTAINER(uim_applet), uim_applet->toolbar); | |
86 | ||
87 | - action_group = g_simple_action_group_new(); | |
88 | - g_action_map_add_action_entries(G_ACTION_MAP (action_group), uim_menu_actions, | |
89 | - G_N_ELEMENTS(uim_menu_actions), toolbar); | |
90 | + gtk_widget_show_all(GTK_WIDGET(uim_applet->toolbar)); | |
91 | ||
92 | ui_path = g_build_filename (UIM_UIDATADIR, "uim-applet-menu.xml", NULL); | |
93 | - panel_applet_setup_menu_from_file(applet, ui_path, action_group, GETTEXT_PACKAGE); | |
94 | + gp_applet_setup_menu_from_resource(GP_APPLET(uim_applet), ui_path, uim_menu_actions); | |
95 | g_free(ui_path); | |
96 | +} | |
97 | ||
98 | - gtk_widget_insert_action_group (GTK_WIDGET (applet), "uim", | |
99 | - G_ACTION_GROUP (action_group)); | |
100 | -#if LIBPANEL_APPLET_HAVE_SET_BACKGROUND_WIDGET | |
101 | - panel_applet_set_background_widget(applet, GTK_WIDGET(applet)); | |
102 | -#endif | |
103 | - g_object_unref(action_group); | |
104 | - | |
105 | - return TRUE; | |
106 | +static void | |
107 | +uim_applet_class_init(UimAppletClass *uim_applet_class) | |
108 | +{ | |
109 | } | |
110 | ||
111 | +static GpAppletInfo * | |
112 | +uim_get_applet_info (const gchar *id) | |
113 | +{ | |
114 | + const gchar *name; | |
115 | + const gchar *description; | |
116 | + const gchar *icon; | |
117 | + GpAppletInfo *info; | |
118 | ||
119 | + name = _("Input Method Indicator"); | |
120 | + description = _("Indicates and controls the state of input method (for uim)"); | |
121 | + icon = UIM_PIXMAPSDIR "/uim-icon.png"; | |
122 | + info = gp_applet_info_new (uim_applet_get_type, name, description, icon); | |
123 | + return info; | |
124 | +} | |
125 | ||
126 | -PANEL_APPLET_IN_PROCESS_FACTORY("UimAppletFactory", | |
127 | - PANEL_TYPE_APPLET, | |
128 | - (PanelAppletFactoryCallback)uim_applet_new, | |
129 | - NULL) | |
130 | +static const char * | |
131 | +uim_get_applet_id_from_iid (const gchar *iid) | |
132 | +{ | |
133 | + if (g_strcmp0 (iid, "UimApplet") == 0) | |
134 | + return "uim"; | |
135 | + return NULL; | |
136 | +} | |
137 | + | |
138 | +void gp_module_load (GpModule *module) | |
139 | +{ | |
140 | + uim_init(); | |
141 | + bindtextdomain(PACKAGE, LOCALEDIR); | |
142 | + bind_textdomain_codeset(PACKAGE, "UTF-8"); | |
143 | + gp_module_set_gettext_domain(module, GETTEXT_PACKAGE); | |
144 | + gp_module_set_abi_version (module, GP_MODULE_ABI_VERSION); | |
145 | + gp_module_set_id (module, "uim"); | |
146 | + gp_module_set_version (module, PACKAGE_VERSION); | |
147 | + gp_module_set_applet_ids (module, "uim", NULL); | |
148 | + gp_module_set_get_applet_info (module, uim_get_applet_info); | |
149 | + gp_module_set_compatibility (module, uim_get_applet_id_from_iid); | |
150 | +} | |
151 | --- uim-1.8.8/gtk3/toolbar/uim-applet-menu.xml.orig 2015-06-09 12:13:54.000000000 +0200 | |
152 | +++ uim-1.8.8/gtk3/toolbar/uim-applet-menu.xml 2020-10-18 09:55:08.851991225 +0200 | |
153 | @@ -1,3 +1,5 @@ | |
154 | +<interface> | |
155 | +<menu id="uim-menu"> | |
156 | <section> | |
157 | <item> | |
158 | <attribute name="label" translatable="yes">Switch input method</attribute> | |
159 | @@ -28,3 +30,5 @@ | |
160 | <attribute name="action">uim.about</attribute> | |
161 | </item> | |
162 | </section> | |
163 | +</menu> | |
164 | +</interface> | |
f322f76f JB |
165 | --- uim-1.8.9/gtk3/toolbar/Makefile.am.orig 2023-01-31 07:05:10.013442140 +0100 |
166 | +++ uim-1.8.9/gtk3/toolbar/Makefile.am 2023-01-31 17:07:05.979481235 +0100 | |
167 | @@ -4,46 +4,27 @@ EXTRA_DIST = UimApplet.panel-applet.in.i | |
bd5acb7e JB |
168 | if GNOME3_APPLET |
169 | helper_defs = -DUIM_DATADIR=\""$(datadir)/@PACKAGE@"\" | |
170 | ||
171 | -uim_toolbar_applet_gnome3_libdir = $(pkglibdir) | |
172 | -uim_toolbar_applet_gnome3_lib_LTLIBRARIES = libuim-toolbar-applet-gnome3.la | |
173 | +uim_toolbar_applet_gnome3_libdir = $(LIBPANEL_APPLET_DIR) | |
174 | +uim_toolbar_applet_gnome3_lib_LTLIBRARIES = uim.la | |
175 | ||
176 | xmluidir = $(pkgdatadir)/ui | |
177 | xmlui_DATA = uim-applet-menu.xml | |
178 | ||
179 | -libuim_toolbar_applet_gnome3_la_LIBADD = @GTK3_LIBS@ @GNOME3_APPLET_LIBS@ \ | |
180 | +uim_la_LIBADD = @GTK3_LIBS@ @GNOME3_APPLET_LIBS@ \ | |
181 | $(top_builddir)/uim/libuim-scm.la \ | |
182 | $(top_builddir)/uim/libuim.la \ | |
183 | $(top_builddir)/uim/libuim-custom.la | |
184 | -libuim_toolbar_applet_gnome3_la_CPPFLAGS = \ | |
185 | +uim_la_CPPFLAGS = \ | |
186 | -DUIM_UIDATADIR="\"${xmluidir}\"" \ | |
187 | $(helper_defs) -I$(top_srcdir) -I$(top_builddir) | |
188 | -libuim_toolbar_applet_gnome3_la_LDFLAGS = \ | |
189 | +uim_la_LDFLAGS = \ | |
190 | -module -avoid-version | |
191 | ||
192 | -libuim_toolbar_applet_gnome3_la_CFLAGS = @GTK3_CFLAGS@ @GNOME3_APPLET_CFLAGS@ | |
193 | +uim_la_CFLAGS = @GTK3_CFLAGS@ @GNOME3_APPLET_CFLAGS@ | |
194 | ||
195 | -libuim_toolbar_applet_gnome3_la_SOURCES = applet-gnome3.c \ | |
196 | +uim_la_SOURCES = applet-gnome3.c \ | |
197 | ../../gtk2/toolbar/common-gtk.c | |
198 | ||
199 | -APPLET_LOCATION = $(pkglibdir)/libuim-toolbar-applet-gnome3.so | |
200 | - | |
201 | -appletdir = $(LIBPANEL_APPLET_DIR) | |
202 | -applet_DATA = UimApplet.panel-applet | |
203 | -applet_in_files = $(applet_DATA:=.in) | |
204 | -applet_in_in_files = $(applet_in_files:=.in) | |
205 | - | |
206 | -$(applet_in_files): $(applet_in_in_files) Makefile | |
207 | - $(SED) s,@APPLET_LOCATION@,$(APPLET_LOCATION),g <$< >$@.tmp | |
208 | - $(SED) s,@UIM_PIXMAPSDIR@,$(uim_pixmapsdir),g <$@.tmp >$@ | |
209 | - | |
f322f76f JB |
210 | -if USE_NLS |
211 | - po_files = $(wildcard $(top_srcdir)/po/*.po) | |
212 | - $(applet_DATA): $(applet_in_files) $(INTLTOOL_MERGE) $(po_files) ;\ | |
213 | - LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ | |
214 | -else | |
215 | - $(applet_DATA): $(applet_in_files) ; cp $< $@ | |
216 | -endif | |
bd5acb7e JB |
217 | - |
218 | DISTCLEANFILES = UimApplet.panel-applet.in UimApplet.panel-applet \ | |
219 | UimApplet.panel-applet.in.tmp | |
220 | endif |