rpms/imsettings/devel imsettings-fix-unpredictable-session-order.patch, NONE, 1.1 imsettings.spec, 1.20, 1.21

Akira TAGOH tagoh at fedoraproject.org
Mon Oct 27 12:39:29 UTC 2008


Author: tagoh

Update of /cvs/pkgs/rpms/imsettings/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21740

Modified Files:
	imsettings.spec 
Added Files:
	imsettings-fix-unpredictable-session-order.patch 
Log Message:
* Mon Oct 27 2008 Akira TAGOH <tagoh at redhat.com> - 0.105.1-2
- imsettings-fix-unpredictable-session-order.patch: Run imsettings-applet with
  --disable-xsettings for GNOME/XFCE. (#466206)

imsettings-fix-unpredictable-session-order.patch:

--- NEW FILE imsettings-fix-unpredictable-session-order.patch ---
Index: applet/main.c
===================================================================
--- applet/main.c	(リビジョン 213)
+++ applet/main.c	(作業コピー)
@@ -87,6 +87,7 @@
 #ifdef ENABLE_XSETTINGS
 	IMSettingsXSettings *xsettings;
 	GtkWidget           *checkbox_xsettings;
+	gboolean             disable_xsettings_forcibly;
 	gboolean             is_xsettings_manager_enabled;
 	gboolean             is_another_xsettings_manager_running;
 #endif
@@ -392,7 +393,7 @@
 
 		return;
 	}
-	if (g_ascii_strcasecmp(gconf_value_get_string(val), "auto") == 0) {
+	if (!applet->disable_xsettings_forcibly && g_ascii_strcasecmp(gconf_value_get_string(val), "auto") == 0) {
 		applet->is_xsettings_manager_enabled = TRUE;
 		if (applet->xsettings == NULL) {
 			if (imsettings_xsettings_is_available(gdk_display_get_default())) {
@@ -829,7 +830,7 @@
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (applet->checkbox_xsettings),
 				     applet->is_xsettings_manager_enabled);
 	gtk_widget_set_sensitive(applet->checkbox_xsettings,
-				 !applet->is_another_xsettings_manager_running);
+				 !applet->disable_xsettings_forcibly && !applet->is_another_xsettings_manager_running);
 #endif
 	gtk_editable_set_editable(GTK_EDITABLE (applet->entry_grabkey), FALSE);
 	gtk_widget_show(applet->dialog);
@@ -1152,7 +1153,7 @@
 #endif /* ENABLE_XIM */
 
 static IMApplet *
-_create_applet(void)
+_create_applet(gboolean is_xsettings_disabled)
 {
 	IMApplet *applet;
 	gchar *name;
@@ -1170,6 +1171,9 @@
 
 	applet = g_new0(IMApplet, 1);
 	applet->is_enabled = FALSE;
+#ifdef ENABLE_XSETTINGS
+	applet->disable_xsettings_forcibly = is_xsettings_disabled;
+#endif /* ENABLE_XSETTINGS */
 	applet->status_icon = gtk_status_icon_new_from_stock(GTK_STOCK_DISCONNECT);
 	applet->conn = dbus_bus_get(DBUS_BUS_SESSION, NULL);
 	if (applet->conn == NULL) {
@@ -1305,6 +1309,12 @@
      char **argv)
 {
 	IMApplet *applet;
+	gboolean arg_disable_xsettings = FALSE;
+	GOptionEntry entries[] = {
+		{"disable-xsettings", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_NONE, &arg_disable_xsettings, N_("Disable XSETTINGS manager feature")},
+		{NULL, 0, 0, 0, NULL, NULL, NULL}
+	};
+	GError *error = NULL;
 
 #ifdef ENABLE_NLS
 	bindtextdomain (GETTEXT_PACKAGE, IMAPPLET_LOCALEDIR);
@@ -1314,12 +1324,21 @@
 	textdomain (GETTEXT_PACKAGE);
 #endif /* ENABLE_NLS */
 
+#ifdef ENABLE_XSETTINGS
+	gtk_init_with_args(&argc, &argv, NULL, entries, GETTEXT_PACKAGE, &error);
+	if (error) {
+		g_print("%s\n", error->message);
+		g_error_free(error);
+		return 1;
+	}
+#else
 	gtk_init(&argc, &argv);
+#endif /* ENABLE_XSETTINGS */
 #ifdef ENABLE_XIM
 	g_xim_init();
 #endif
 
-	applet = _create_applet();
+	applet = _create_applet(arg_disable_xsettings);
 	if (applet == NULL)
 		goto end;
 
Index: applet/Makefile.am
===================================================================
--- applet/Makefile.am	(リビジョン 213)
+++ applet/Makefile.am	(作業コピー)
@@ -53,7 +53,10 @@
 #
 autostartdir = $(sysconfdir)/xdg/autostart
 #
-autostart_in_files = imsettings-applet.desktop.in
+autostart_in_files = 				\
+	imsettings-applet.desktop.in		\
+	gnome-imsettings-applet.desktop.in	\
+	$(NULL)
 autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
 #
 schemadir = @GCONF_SCHEMA_FILE_DIR@
Index: applet/imsettings-applet.desktop.in.in
===================================================================
--- applet/imsettings-applet.desktop.in.in	(リビジョン 213)
+++ applet/imsettings-applet.desktop.in.in	(作業コピー)
@@ -6,4 +6,5 @@
 Icon=imsettings-applet
 Exec=imsettings-applet
 Terminal=false
-Categories=TrayIcon
+Categories=TrayIcon;
+NotShowIn=GNOME;XFCE;
Index: applet/gnome-imsettings-applet.desktop.in.in
===================================================================
--- applet/gnome-imsettings-applet.desktop.in.in	(リビジョン 0)
+++ applet/gnome-imsettings-applet.desktop.in.in	(リビジョン 0)
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+_Name=IMSettings Applet
+_Comment=IMSettings Applet
+Icon=imsettings-applet
+Exec=imsettings-applet --disable-xsettings
+Terminal=false
+Categories=TrayIcon;
+OnlyShowIn=GNOME;XFCE;
Index: configure.ac
===================================================================
--- configure.ac	(リビジョン 213)
+++ configure.ac	(作業コピー)
@@ -280,6 +280,7 @@
 	imsettings.pc
 	imsettings-uninstalled.pc
 	applet/Makefile
+	applet/gnome-imsettings-applet.desktop.in
 	applet/imsettings-applet.desktop.in
 	backends/Makefile
 	backends/gconf/Makefile


Index: imsettings.spec
===================================================================
RCS file: /cvs/pkgs/rpms/imsettings/devel/imsettings.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- imsettings.spec	23 Oct 2008 13:24:26 -0000	1.20
+++ imsettings.spec	27 Oct 2008 12:38:59 -0000	1.21
@@ -1,10 +1,11 @@
 Name:		imsettings
 Version:	0.105.1
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	LGPLv2+
 URL:		http://code.google.com/p/imsettings/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	intltool gettext
+BuildRequires:	desktop-file-utils
 BuildRequires:	dbus-devel >= 0.23, dbus-glib-devel >= 0.74, glib2 >= 2.16
 BuildRequires:	libgxim-devel >= 0.3.1, libnotify-devel
 BuildRequires:	xfce-mcs-manager-devel libxfce4mcs-devel
@@ -14,6 +15,7 @@
 # workaround for KDE, it will be removed when we have a correct fix
 Source1: 	imsettings-kde.sh
 Patch0:		imsettings-constraint-of-language.patch
+Patch1:		imsettings-fix-unpredictable-session-order.patch
 
 Summary:	Delivery framework for general Input Method configuration
 Group:		Applications/System
@@ -78,6 +80,8 @@
 %prep
 %setup -q
 %patch0 -p1 -b .0-lang
+%patch1 -p0 -b .1-session-order
+autoreconf
 
 %build
 %configure	\
@@ -108,6 +112,15 @@
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kde/env
 install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/kde/env/
 
+desktop-file-install						\
+	--delete-original					\
+	--dir=$RPM_BUILD_ROOT%{_datadir}/gnome/autostart	\
+	$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/gnome-imsettings-applet.desktop
+#desktop-file-install						\
+#	--delete-original					\
+#	--dir=$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart	\
+#	$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/imsettings-applet.desktop
+
 %find_lang %{name}
 
 %clean
@@ -155,6 +168,7 @@
 %{_libexecdir}/im-settings-daemon
 %{_libexecdir}/xinputinfo.sh
 %{_datadir}/dbus-1/services/*.service
+%{_datadir}/gnome/autostart/gnome-imsettings-applet.desktop
 %{_datadir}/pixmaps/*.png
 %{_sysconfdir}/X11/xinit/xinitrc.d/50-xinput.sh
 %{_sysconfdir}/X11/xinit/xinput.d
@@ -185,6 +199,10 @@
 
 
 %changelog
+* Mon Oct 27 2008 Akira TAGOH <tagoh at redhat.com> - 0.105.1-2
+- imsettings-fix-unpredictable-session-order.patch: Run imsettings-applet with
+  --disable-xsettings for GNOME/XFCE. (#466206)
+
 * Thu Oct 23 2008 Akira TAGOH <tagoh at redhat.com> - 0.105.1-1
 - New upstream release.
   - Fix another freeze issue. (#452849)




More information about the fedora-extras-commits mailing list