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,
4 [enable_gnome3_applet=yes])
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)
12 @@ -883,7 +883,7 @@ AM_CONDITIONAL(GNOME3_APPLET, test "x$en
13 if test "x$enable_gnome3_applet" = xyes; then
14 AC_ARG_WITH([libpanel-applet-dir], [], [LIBPANEL_APPLET_DIR=$withval], [LIBPANEL_APPLET_DIR=""])
15 if test "$LIBPANEL_APPLET_DIR" = ""; then
16 - LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=libpanel_applet_dir libpanel-applet`
17 + LIBPANEL_APPLET_DIR=`$PKG_CONFIG --variable=modulesdir libgnome-panel`
19 AC_SUBST(LIBPANEL_APPLET_DIR)
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
27 -#include <panel-applet.h>
28 +#include <libgnome-panel/gp-applet.h>
29 +#include <libgnome-panel/gp-module.h>
31 #include <uim/gettext.h>
33 -PanelApplet *uimapplet;
35 +#define UIM_TYPE_APPLET uim_applet_get_type()
36 +G_DECLARE_FINAL_TYPE (UimApplet, uim_applet, UIM, APPLET, GpApplet)
45 +G_DEFINE_TYPE (UimApplet, uim_applet, GP_TYPE_APPLET)
47 static void exec_switcher(GSimpleAction *action, GVariant *parameter, gpointer data);
48 static void exec_pref(GSimpleAction *action, GVariant *parameter, gpointer data);
51 { "hand", exec_hand },
52 { "help", exec_help },
53 - { "about", display_about_dialog }
54 + { "about", display_about_dialog },
64 -uim_applet_new(PanelApplet *applet, const gchar *iid, gpointer data)
66 +uim_applet_init(UimApplet *uim_applet)
69 - GSimpleActionGroup *action_group;
74 - if (strcmp(iid, "UimApplet") != 0)
79 - toolbar = (GtkWidget*)uim_toolbar_applet_new();
81 - gtk_container_add(GTK_CONTAINER(applet), toolbar);
82 + uim_applet->toolbar = (GtkWidget*)uim_toolbar_applet_new();
84 - gtk_widget_show_all(GTK_WIDGET(applet));
85 + gtk_container_add(GTK_CONTAINER(uim_applet), uim_applet->toolbar);
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));
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);
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));
103 - g_object_unref(action_group);
107 +uim_applet_class_init(UimAppletClass *uim_applet_class)
111 +static GpAppletInfo *
112 +uim_get_applet_info (const gchar *id)
115 + const gchar *description;
117 + GpAppletInfo *info;
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);
126 -PANEL_APPLET_IN_PROCESS_FACTORY("UimAppletFactory",
128 - (PanelAppletFactoryCallback)uim_applet_new,
131 +uim_get_applet_id_from_iid (const gchar *iid)
133 + if (g_strcmp0 (iid, "UimApplet") == 0)
138 +void gp_module_load (GpModule *module)
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);
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
155 +<menu id="uim-menu">
158 <attribute name="label" translatable="yes">Switch input method</attribute>
160 <attribute name="action">uim.about</attribute>
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
169 helper_defs = -DUIM_DATADIR=\""$(datadir)/@PACKAGE@"\"
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
176 xmluidir = $(pkgdatadir)/ui
177 xmlui_DATA = uim-applet-menu.xml
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 = \
186 -DUIM_UIDATADIR="\"${xmluidir}\"" \
187 $(helper_defs) -I$(top_srcdir) -I$(top_builddir)
188 -libuim_toolbar_applet_gnome3_la_LDFLAGS = \
190 -module -avoid-version
192 -libuim_toolbar_applet_gnome3_la_CFLAGS = @GTK3_CFLAGS@ @GNOME3_APPLET_CFLAGS@
193 +uim_la_CFLAGS = @GTK3_CFLAGS@ @GNOME3_APPLET_CFLAGS@
195 -libuim_toolbar_applet_gnome3_la_SOURCES = applet-gnome3.c \
196 +uim_la_SOURCES = applet-gnome3.c \
197 ../../gtk2/toolbar/common-gtk.c
199 -APPLET_LOCATION = $(pkglibdir)/libuim-toolbar-applet-gnome3.so
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)
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 >$@
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 $< $@
215 - $(applet_DATA): $(applet_in_files) ; cp $< $@
218 DISTCLEANFILES = UimApplet.panel-applet.in UimApplet.panel-applet \
219 UimApplet.panel-applet.in.tmp