gnome-settings-daemon r433 - in trunk: . plugins/xrandr
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-settings-daemon r433 - in trunk: . plugins/xrandr
- Date: Mon, 11 Aug 2008 21:11:26 +0000 (UTC)
Author: jensg
Date: Mon Aug 11 21:11:26 2008
New Revision: 433
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=433&view=rev
Log:
2008-08-11 Jens Granseuer <jensgr gmx net>
* configure.ac: require gnome-desktop 2.23.90
* plugins/xrandr/gsd-xrandr-manager.c: (gsd_xrandr_manager_start),
(gsd_xrandr_manager_stop), (gsd_xrandr_manager_init): try harder to
clean up in _stop so we can enable/disable the plugin on the fly;
not quite there, yet
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/plugins/xrandr/gsd-xrandr-manager.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Aug 11 21:11:26 2008
@@ -47,7 +47,7 @@
GTK_REQUIRED_VERSION=2.10.0
GCONF_REQUIRED_VERSION=2.6.1
GIO_REQUIRED_VERSION=2.17.3
-GNOME_DESKTOP_REQUIRED_VERSION=2.23.5
+GNOME_DESKTOP_REQUIRED_VERSION=2.23.90
LIBNOTIFY_REQUIRED_VERSION=0.4.3
EXTRA_COMPILE_WARNINGS(yes)
Modified: trunk/plugins/xrandr/gsd-xrandr-manager.c
==============================================================================
--- trunk/plugins/xrandr/gsd-xrandr-manager.c (original)
+++ trunk/plugins/xrandr/gsd-xrandr-manager.c Mon Aug 11 21:11:26 2008
@@ -79,10 +79,6 @@
int notify_id;
};
-enum {
- PROP_0,
-};
-
static void gsd_xrandr_manager_class_init (GsdXrandrManagerClass *klass);
static void gsd_xrandr_manager_init (GsdXrandrManager *xrandr_manager);
static void gsd_xrandr_manager_finalize (GObject *object);
@@ -296,11 +292,13 @@
{
g_debug ("Starting xrandr manager");
+ manager->priv->rw_screen = gnome_rr_screen_new (
+ gdk_screen_get_default (), on_randr_event, manager);
+
if (manager->priv->rw_screen == NULL) {
g_set_error (error, 0, 0, "Failed to initialize XRandR extension");
return FALSE;
}
-
manager->priv->running = TRUE;
manager->priv->client = gconf_client_get_default ();
@@ -335,6 +333,7 @@
(GdkFilterFunc)event_filter,
manager);
+ /* FIXME: need to remove this in _stop */
gdk_add_client_message_filter (gnome_randr_atom(),
on_client_message,
manager->priv->rw_screen);
@@ -359,6 +358,10 @@
gdk_error_trap_pop ();
+ gdk_window_remove_filter (gdk_get_default_root_window (),
+ (GdkFilterFunc) event_filter,
+ manager);
+
if (manager->priv->notify_id != 0) {
gconf_client_remove_dir (manager->priv->client,
CONF_DIR, NULL);
@@ -372,6 +375,11 @@
manager->priv->client = NULL;
}
+ if (manager->priv->rw_screen != NULL) {
+ gnome_rr_screen_destroy (manager->priv->rw_screen);
+ manager->priv->rw_screen = NULL;
+ }
+
status_icon_stop (manager);
}
@@ -460,8 +468,6 @@
manager->priv = GSD_XRANDR_MANAGER_GET_PRIVATE (manager);
manager->priv->keycode = keycode;
- manager->priv->rw_screen = gnome_rr_screen_new (
- gdk_screen_get_default (), on_randr_event, manager);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]