gnome-settings-daemon r571 - in trunk: . gnome-settings-daemon plugins/a11y-keyboard



Author: jensg
Date: Wed Oct 29 19:40:54 2008
New Revision: 571
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=571&view=rev

Log:
2008-10-29  Jens Granseuer  <jensgr gmx net>

	Get rid of libgnome (bug #557808).

	* configure.ac: bump required gtk+ version to 2.13.1
	* gnome-settings-daemon/main.c: (main): don't use g_program_init
	* plugins/a11y-keyboard/Makefile.am:
	* plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c:
	(ax_response_callback), (ax_stickykeys_response),
	(ax_slowkeys_response), (on_slow_keys_action),
	(on_sticky_keys_action): replace gnome_help_display_desktop with
	gtk_show_uri


Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/gnome-settings-daemon/main.c
   trunk/plugins/a11y-keyboard/Makefile.am
   trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Oct 29 19:40:54 2008
@@ -44,7 +44,7 @@
 
 DBUS_GLIB_REQUIRED_VERSION=0.74
 GLIB_REQUIRED_VERSION=2.17.3
-GTK_REQUIRED_VERSION=2.10.0
+GTK_REQUIRED_VERSION=2.13.1
 GCONF_REQUIRED_VERSION=2.6.1
 GIO_REQUIRED_VERSION=2.17.3
 GNOME_DESKTOP_REQUIRED_VERSION=2.23.90
@@ -58,7 +58,6 @@
         gconf-2.0 >= $GCONF_REQUIRED_VERSION
         gmodule-2.0
         dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
-        libgnome-2.0
 )
 
 PKG_CHECK_MODULES(SETTINGS_PLUGIN,
@@ -70,9 +69,6 @@
         dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
 )
 
-PKG_CHECK_MODULES(GNOME, libgnome-2.0)
-PKG_CHECK_MODULES(LIBSOUNDS, gio-2.0 gtk+-2.0 libgnomeui-2.0)
-
 GSD_PLUGIN_LDFLAGS="-export_dynamic -module -avoid-version -no-undefined"
 AC_SUBST([GSD_PLUGIN_LDFLAGS])
 

Modified: trunk/gnome-settings-daemon/main.c
==============================================================================
--- trunk/gnome-settings-daemon/main.c	(original)
+++ trunk/gnome-settings-daemon/main.c	Wed Oct 29 19:40:54 2008
@@ -28,7 +28,6 @@
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
-#include <libgnome/libgnome.h>
 
 #include <dbus/dbus-glib.h>
 #include <dbus/dbus-glib-lowlevel.h>
@@ -228,14 +227,11 @@
 main (int argc, char *argv[])
 {
         GnomeSettingsManager *manager;
-        GnomeProgram         *program;
         DBusGConnection      *bus;
         gboolean              res;
         GError               *error;
-        gboolean              create_dirs;
 
         manager = NULL;
-        program = NULL;
 
         gnome_settings_profile_start (NULL);
 
@@ -276,22 +272,6 @@
                 goto out;
         }
 
-        /* If the user does not have a writable HOME directory, then
-           init libgnome with appropriate arguments to run without
-           needing one. */
-        create_dirs = (g_access (g_get_home_dir(), W_OK) == 0);
-
-        gnome_settings_profile_start ("gnome_program_init");
-        program = gnome_program_init (PACKAGE,
-                                      VERSION,
-                                      LIBGNOME_MODULE,
-                                      argc,
-                                      argv,
-                                      GNOME_PARAM_CREATE_DIRECTORIES,
-                                      create_dirs,
-                                      NULL);
-        gnome_settings_profile_end ("gnome_program_init");
-
         gnome_settings_profile_start ("gnome_settings_manager_new");
         manager = gnome_settings_manager_new ();
         gnome_settings_profile_end ("gnome_settings_manager_new");
@@ -331,10 +311,6 @@
                 g_object_unref (manager);
         }
 
-        if (program != NULL) {
-                g_object_unref (program);
-        }
-
         g_debug ("SettingsDaemon finished");
         gnome_settings_profile_end (NULL);
 

Modified: trunk/plugins/a11y-keyboard/Makefile.am
==============================================================================
--- trunk/plugins/a11y-keyboard/Makefile.am	(original)
+++ trunk/plugins/a11y-keyboard/Makefile.am	Wed Oct 29 19:40:54 2008
@@ -53,7 +53,6 @@
 liba11y_keyboard_la_CFLAGS = \
 	$(SETTINGS_PLUGIN_CFLAGS)	\
 	$(LIBNOTIFY_CFLAGS)		\
-	$(GNOME_CFLAGS)			\
 	$(AM_CFLAGS)
 
 liba11y_keyboard_la_LDFLAGS = 		\
@@ -64,7 +63,6 @@
 	$(SETTINGS_PLUGIN_LIBS)		\
 	$(XF86MISC_LIBS)		\
 	$(LIBNOTIFY_LIBS)		\
-	$(GNOME_LIBS)			\
 	$(NULL)
 
 plugin_in_files = 		\

Modified: trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
==============================================================================
--- trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c	(original)
+++ trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c	Wed Oct 29 19:40:54 2008
@@ -41,8 +41,6 @@
 #include <X11/XKBlib.h>
 #include <X11/extensions/XKBstr.h>
 
-#include <libgnome/gnome-help.h>
-
 #ifdef HAVE_LIBNOTIFY
 #include <libnotify/notify.h>
 #endif /* HAVE_LIBNOTIFY */
@@ -349,17 +347,19 @@
 
 static gboolean
 ax_response_callback (GsdA11yKeyboardManager *manager,
+                      GtkWindow              *parent,
                       gint                    response_id,
                       guint                   revert_controls_mask,
                       gboolean                enabled)
 {
+        GConfClient *client;
+	GdkScreen *screen;
         GError *err;
 
         switch (response_id) {
         case GTK_RESPONSE_DELETE_EVENT:
         case GTK_RESPONSE_REJECT:
-        case GTK_RESPONSE_CANCEL: {
-                GConfClient *client;
+        case GTK_RESPONSE_CANCEL:
 
                 client = gconf_client_get_default ();
 
@@ -383,16 +383,19 @@
                 g_object_unref (client);
 
                 break;
-        }
+
         case GTK_RESPONSE_HELP:
+                if (!parent)
+                        screen = gdk_screen_get_default ();
+                else
+                        screen = gtk_widget_get_screen (GTK_WIDGET (parent));
+
                 err = NULL;
-                gnome_help_display_desktop (NULL,
-                                            "user-guide",
-                                            "user-guide.xml",
-                                            "goscustaccess-6",
-                                            &err);
-                if (err != NULL) {
-                        GtkWidget *error_dialog = gtk_message_dialog_new (NULL,
+                if (!gtk_show_uri (screen,
+                                   "ghelp:user-guide#goscustaccess-6",
+                                   gtk_get_current_event_time(),
+                                   &err)) {
+                        GtkWidget *error_dialog = gtk_message_dialog_new (parent,
                                                                           0,
                                                                           GTK_MESSAGE_ERROR,
                                                                           GTK_BUTTONS_CLOSE,
@@ -416,7 +419,9 @@
                         gint                    response_id,
                         GsdA11yKeyboardManager *manager)
 {
-        if (ax_response_callback (manager, response_id, XkbStickyKeysMask, manager->priv->stickykeys_shortcut_val)) {
+        if (ax_response_callback (manager, GTK_WINDOW (dialog),
+                                  response_id, XkbStickyKeysMask,
+                                  manager->priv->stickykeys_shortcut_val)) {
                 gtk_widget_destroy (GTK_WIDGET (dialog));
         }
 }
@@ -426,7 +431,9 @@
                       gint                    response_id,
                       GsdA11yKeyboardManager *manager)
 {
-        if (ax_response_callback (manager, response_id, XkbSlowKeysMask, manager->priv->slowkeys_shortcut_val)) {
+        if (ax_response_callback (manager, GTK_WINDOW (dialog),
+                                  response_id, XkbSlowKeysMask,
+                                  manager->priv->slowkeys_shortcut_val)) {
                 gtk_widget_destroy (GTK_WIDGET (dialog));
         }
 }
@@ -473,7 +480,9 @@
                 return;
         }
 
-        res = ax_response_callback (manager, response_id, XkbSlowKeysMask, manager->priv->slowkeys_shortcut_val);
+        res = ax_response_callback (manager, NULL,
+                                    response_id, XkbSlowKeysMask,
+                                    manager->priv->slowkeys_shortcut_val);
         if (res) {
                 g_signal_handlers_disconnect_by_func (manager->priv->notification, on_notification_closed, manager);
                 notify_notification_close (manager->priv->notification, NULL);
@@ -500,7 +509,9 @@
                 return;
         }
 
-        res = ax_response_callback (manager, response_id, XkbStickyKeysMask, manager->priv->stickykeys_shortcut_val);
+        res = ax_response_callback (manager, NULL,
+                                    response_id, XkbStickyKeysMask,
+                                    manager->priv->stickykeys_shortcut_val);
         if (res) {
                 g_signal_handlers_disconnect_by_func (manager->priv->notification, on_notification_closed, manager);
                 notify_notification_close (manager->priv->notification, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]