[mate-notification-daemon] 01/01: Added glib >= 2.43.1 compatibility patch.

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Mon Mar 2 12:40:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

flexiondotorg-guest pushed a commit to branch master
in repository mate-notification-daemon.

commit 0b81874ee05dc7cbb1af23f6463f13e3c57ba58a
Author: Martin Wimpress <code at flexion.org>
Date:   Fri Feb 27 11:40:01 2015 +0000

    Added glib >= 2.43.1 compatibility patch.
---
 debian/patches/0001_glib_connect_first.patch | 119 +++++++++++++++++++++++++++
 debian/patches/series                        |   1 +
 2 files changed, 120 insertions(+)

diff --git a/debian/patches/0001_glib_connect_first.patch b/debian/patches/0001_glib_connect_first.patch
new file mode 100644
index 0000000..e985572
--- /dev/null
+++ b/debian/patches/0001_glib_connect_first.patch
@@ -0,0 +1,119 @@
+From 2da0593cad0ef8ab3a05bffa48e5fccd02a2573a Mon Sep 17 00:00:00 2001
+From: Monsta <monsta at inbox.ru>
+Date: Thu, 19 Feb 2015 13:15:15 +0300
+Subject: [PATCH] first connect to settings, then read them.
+
+fixes the issue with GLib >= 2.43,
+https://git.gnome.org/browse/glib/commit/?id=8ff5668a458344da22d30491e3ce726d861b3619
+---
+ src/capplet/mate-notification-properties.c | 12 +++++++-----
+ src/daemon/daemon.c                        |  4 ++--
+ src/daemon/engines.c                       |  2 +-
+ 3 files changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c
+index 89385ed..0b719bc 100644
+--- a/src/capplet/mate-notification-properties.c
++++ b/src/capplet/mate-notification-properties.c
+@@ -167,9 +167,10 @@ static void notification_properties_dialog_setup_positions(NotificationAppletDia
+ 	GtkTreeModel* model;
+ 	GtkTreeIter iter;
+ 
+-	model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->position_combo));
++	g_signal_connect(dialog->gsettings, "changed::" GSETTINGS_KEY_POPUP_LOCATION, G_CALLBACK (notification_properties_position_notify), dialog);
+ 	g_signal_connect(dialog->position_combo, "changed", G_CALLBACK(notification_properties_location_changed), dialog);
+ 
++	model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->position_combo));
+ 	location = g_settings_get_string(dialog->gsettings, GSETTINGS_KEY_POPUP_LOCATION);
+ 
+ 	for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; valid = gtk_tree_model_iter_next(model, &iter))
+@@ -188,7 +189,6 @@ static void notification_properties_dialog_setup_positions(NotificationAppletDia
+ 		g_free(key);
+ 	}
+ 
+-	g_signal_connect (dialog->gsettings, "changed::" GSETTINGS_KEY_POPUP_LOCATION, G_CALLBACK (notification_properties_position_notify), dialog);
+ 	g_free(location);
+ }
+ 
+@@ -227,6 +227,7 @@ static void notification_properties_dialog_setup_monitors(NotificationAppletDial
+ 	
+ 	gtk_combo_box_set_model(GTK_COMBO_BOX (dialog->monitor_combo), GTK_TREE_MODEL (store));
+ 	
++	g_signal_connect(dialog->gsettings, "changed::" GSETTINGS_KEY_MONITOR_NUMBER, G_CALLBACK (notification_properties_monitor_notify), dialog);
+ 	cur_monitor_number = g_settings_get_int(dialog->gsettings, GSETTINGS_KEY_MONITOR_NUMBER);
+ 
+ 	for (valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL (store), &iter); valid; valid = gtk_tree_model_iter_next(GTK_TREE_MODEL (store), &iter))
+@@ -243,7 +244,6 @@ static void notification_properties_dialog_setup_monitors(NotificationAppletDial
+ 	g_object_unref(store);
+ 
+ 	g_signal_connect(dialog->monitor_combo, "changed", G_CALLBACK(notification_properties_monitor_changed), dialog);
+-	g_signal_connect(dialog->gsettings, "changed::" GSETTINGS_KEY_MONITOR_NUMBER, G_CALLBACK (notification_properties_monitor_notify), dialog);
+ }
+ 
+ static void notification_properties_theme_notify(GSettings *settings, gchar *key, NotificationAppletDialog* dialog)
+@@ -311,6 +311,8 @@ static void notification_properties_dialog_setup_themes(NotificationAppletDialog
+ 	store = gtk_list_store_new(N_COLUMNS_THEME, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
+ 
+ 	gtk_combo_box_set_model(GTK_COMBO_BOX(dialog->theme_combo), GTK_TREE_MODEL(store));
++
++	g_signal_connect(dialog->gsettings, "changed::" GSETTINGS_KEY_THEME, G_CALLBACK (notification_properties_theme_notify), dialog);
+ 	g_signal_connect(dialog->theme_combo, "changed", G_CALLBACK(notification_properties_theme_changed), dialog);
+ 
+ 	if ((dir = g_dir_open(ENGINES_DIR, 0, NULL)))
+@@ -375,7 +377,6 @@ static void notification_properties_dialog_setup_themes(NotificationAppletDialog
+ 		g_free(key);
+ 	}
+ 
+-	g_signal_connect (dialog->gsettings, "changed::" GSETTINGS_KEY_THEME, G_CALLBACK (notification_properties_theme_notify), dialog);
+ 	g_free(theme);
+ }
+ 
+@@ -560,8 +561,9 @@ static gboolean notification_properties_dialog_init(NotificationAppletDialog* di
+ 
+ 	g_signal_connect(dialog->dialog, "response", G_CALLBACK(notification_properties_dialog_response), dialog);
+ 	g_signal_connect(dialog->dialog, "destroy", G_CALLBACK(notification_properties_dialog_destroyed), dialog);
++
++	g_signal_connect(dialog->gsettings, "changed::" GSETTINGS_KEY_USE_ACTIVE_MONITOR, G_CALLBACK (notification_properties_checkbox_notify), dialog);
+ 	g_signal_connect(dialog->active_checkbox, "toggled", G_CALLBACK(notification_properties_checkbox_toggled), dialog);
+-	g_signal_connect (dialog->gsettings, "changed::" GSETTINGS_KEY_USE_ACTIVE_MONITOR, G_CALLBACK (notification_properties_checkbox_notify), dialog);
+ 
+ 	notification_properties_dialog_setup_themes(dialog);
+ 	notification_properties_dialog_setup_positions(dialog);
+diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
+index 49368f2..9bc4e22 100644
+--- a/src/daemon/daemon.c
++++ b/src/daemon/daemon.c
+@@ -364,12 +364,12 @@ static void notify_daemon_init(NotifyDaemon* daemon)
+ 
+ 	daemon->gsettings = g_settings_new (GSETTINGS_SCHEMA);
+ 
++	g_signal_connect (daemon->gsettings, "changed::" GSETTINGS_KEY_POPUP_LOCATION, G_CALLBACK (on_popup_location_changed), daemon);
++
+ 	location = g_settings_get_string (daemon->gsettings, GSETTINGS_KEY_POPUP_LOCATION);
+ 	daemon->priv->stack_location = get_stack_location_from_string(location);
+ 	g_free(location);
+ 
+-	g_signal_connect (daemon->gsettings, "changed::" GSETTINGS_KEY_POPUP_LOCATION, G_CALLBACK (on_popup_location_changed), daemon);
+-
+ 	daemon->priv->n_screens = 0;
+ 	daemon->priv->screens = NULL;
+ 
+diff --git a/src/daemon/engines.c b/src/daemon/engines.c
+index 2217f28..6e841c2 100644
+--- a/src/daemon/engines.c
++++ b/src/daemon/engines.c
+@@ -169,13 +169,13 @@ static ThemeEngine* get_theme_engine(void)
+ 	if (active_engine == NULL)
+ 	{
+ 		GSettings* gsettings = g_settings_new (GSETTINGS_SCHEMA);
+-		char* enginename = g_settings_get_string(gsettings, GSETTINGS_KEY_THEME);
+ 
+ 		if (theme_prop_notify_id == 0)
+ 		{
+ 			theme_prop_notify_id = g_signal_connect (gsettings, "changed::" GSETTINGS_KEY_THEME, G_CALLBACK (theme_changed_cb), NULL);
+ 		}
+ 
++		char* enginename = g_settings_get_string(gsettings, GSETTINGS_KEY_THEME);
+ 		if (enginename == NULL)
+ 		{
+ 			active_engine = load_theme_engine("standard");
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2c829f4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001_glib_connect_first.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-notification-daemon.git



More information about the pkg-mate-commits mailing list