diff --git a/SOURCES/im-chooser-hide-from-menu.patch b/SOURCES/im-chooser-hide-from-menu.patch new file mode 100644 index 0000000..cc78f99 --- /dev/null +++ b/SOURCES/im-chooser-hide-from-menu.patch @@ -0,0 +1,9 @@ +diff -pruN im-chooser-1.6.4.orig/src/app/im-chooser.desktop.in.in im-chooser-1.6.4/src/app/im-chooser.desktop.in.in +--- im-chooser-1.6.4.orig/src/app/im-chooser.desktop.in.in 2011-07-29 07:24:18.000000000 +0000 ++++ im-chooser-1.6.4/src/app/im-chooser.desktop.in.in 2019-02-26 07:42:20.847347184 +0000 +@@ -8,4 +8,4 @@ Terminal=false + Type=Application + StartupNotify=true + Categories=Applications;Settings;X-GNOME-PersonalSettings; +-NotShowIn=XFCE; ++NotShowIn=XFCE;GNOME; diff --git a/SOURCES/im-chooser-run-gnomecc-on-gnome.patch b/SOURCES/im-chooser-run-gnomecc-on-gnome.patch new file mode 100644 index 0000000..7ac72fc --- /dev/null +++ b/SOURCES/im-chooser-run-gnomecc-on-gnome.patch @@ -0,0 +1,40 @@ +diff -pruN im-chooser-1.6.4.orig/libimchooseui/imchooseui.c im-chooser-1.6.4/libimchooseui/imchooseui.c +--- im-chooser-1.6.4.orig/libimchooseui/imchooseui.c 2013-01-18 03:19:42.000000000 +0000 ++++ im-chooser-1.6.4/libimchooseui/imchooseui.c 2019-02-25 10:51:13.828775637 +0000 +@@ -267,6 +267,14 @@ _imchoose_ui_update_list(IMChooseUI *ui, + n_retry++; + goto retry; + } ++ if (!imsettings_client_is_supported_desktop(client, NULL, &err)) { ++ if (err) { ++ g_error_free(err); ++ err = NULL; ++ } ++ g_spawn_command_line_async("gnome-control-center region", &err); ++ goto bail; ++ } + + active_info = imsettings_client_get_active_im_info(client, NULL, &err); + if (err) +@@ -739,7 +747,8 @@ imchoose_ui_get(IMChooseUI *ui, + + retval = GTK_WIDGET (g_object_ref(gtk_builder_get_object(builder, "root"))); + g_object_set_data(tree, "imchoose-ui", ui); +- _imchoose_ui_update_list(ui, GTK_WIDGET (tree), &err); ++ if (!_imchoose_ui_update_list(ui, GTK_WIDGET (tree), &err)) ++ retval = NULL; + if (err) + goto bail; + bail: +diff -pruN im-chooser-1.6.4.orig/src/app/main.c im-chooser-1.6.4/src/app/main.c +--- im-chooser-1.6.4.orig/src/app/main.c 2013-04-12 07:55:59.000000000 +0000 ++++ im-chooser-1.6.4/src/app/main.c 2019-02-25 10:52:30.564740513 +0000 +@@ -209,6 +209,8 @@ main(int argc, + } + goto bail; + } ++ if (!widget) ++ goto bail; + progress = imchoose_ui_get_progress_dialog(ui, &err); + + gtk_window_set_title(GTK_WINDOW (window), _("Input Method Selector")); diff --git a/SPECS/im-chooser.spec b/SPECS/im-chooser.spec index 9583f2b..f758b34 100644 --- a/SPECS/im-chooser.spec +++ b/SPECS/im-chooser.spec @@ -8,12 +8,12 @@ Name: im-chooser Version: 1.6.4 -Release: 4%{?dist} +Release: 6%{?dist} License: GPLv2+ and LGPLv2+ URL: http://fedorahosted.org/im-chooser/ %{?_with_gtk2:BuildRequires: gtk2-devel} %{!?_with_gtk2:BuildRequires: gtk3-devel} -BuildRequires: libSM-devel imsettings-devel >= 1.3.0 +BuildRequires: libSM-devel imsettings-devel >= 1.6.3-11 %if 0%{?_with_xfce} BuildRequires: libxfce4util-devel %endif @@ -21,6 +21,8 @@ BuildRequires: desktop-file-utils intltool gettext Source0: http://fedorahosted.org/releases/i/m/%{name}/%{name}-%{version}.tar.bz2 Patch0: %{name}-1.6.4-translation-updates.patch +Patch1: %{name}-run-gnomecc-on-gnome.patch +Patch2: %{name}-hide-from-menu.patch Summary: Desktop Input Method configuration tool Group: Applications/System @@ -35,7 +37,7 @@ to be used or disable Input Method usage on the desktop. %package common Summary: Common files for im-chooser subpackages Group: Applications/System -Requires: imsettings >= 1.3.0 +Requires: imsettings >= 1.6.3-11 Obsoletes: im-chooser < 1.5.0.1 ## https://fedorahosted.org/fpc/ticket/174 Provides: bundled(egglib) @@ -65,6 +67,8 @@ This package contains the XFCE settings panel for im-chooser. %prep %setup -q %patch0 -p2 -b .0-trans +%patch1 -p1 -b .1-gnomecc +%patch2 -p1 -b .2-hide %build %configure @@ -134,6 +138,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Mon Feb 25 2019 Akira TAGOH - 1.6.4-6 +- Bring up gnome-control-center region if current desktop is GNOME. +- Hide application from menu. (#1657016) + * Fri Jan 24 2014 Daniel Mach - 1.6.4-4 - Mass rebuild 2014-01-24