diff options
Diffstat (limited to 'community/cinnamon-screensaver/fix-dbus-compatibility.patch')
-rw-r--r-- | community/cinnamon-screensaver/fix-dbus-compatibility.patch | 170 |
1 files changed, 0 insertions, 170 deletions
diff --git a/community/cinnamon-screensaver/fix-dbus-compatibility.patch b/community/cinnamon-screensaver/fix-dbus-compatibility.patch index d4c27a0b1..3d70a79d0 100644 --- a/community/cinnamon-screensaver/fix-dbus-compatibility.patch +++ b/community/cinnamon-screensaver/fix-dbus-compatibility.patch @@ -147,173 +147,3 @@ index faff26c..c9f95ba 100644 -- 1.8.1.6 - -From 7141e8ce04921ab6d46648cba20c691b8d8f8e0b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com> -Date: Sat, 2 Mar 2013 08:11:45 +0100 -Subject: [PATCH 3/4] Revert "Fixed away_message shown as "(null)" (using a - prefix to explicitly mark custom away messages)" - -This reverts commit bf1f42b9f9a673091b0f7bf1118781b2d95c88fd. ---- - src/cinnamon-screensaver-command.c | 9 +------- - src/gs-window-x11.c | 43 ++++++++++++-------------------------- - 2 files changed, 14 insertions(+), 38 deletions(-) - -diff --git a/src/cinnamon-screensaver-command.c b/src/cinnamon-screensaver-command.c -index 5c90916..dbcac8a 100644 ---- a/src/cinnamon-screensaver-command.c -+++ b/src/cinnamon-screensaver-command.c -@@ -310,14 +310,7 @@ - } - - if (do_lock) { -- if (g_strcmp0 (away_message, "DEFAULT") == 0) { -- reply = screensaver_send_message_string (connection, "LockMessage", away_message); -- } -- else { -- gchar * custom_message = g_strdup_printf("CUSTOM###%s", away_message); -- reply = screensaver_send_message_string (connection, "LockMessage", custom_message); -- g_free (custom_message); -- } -+ reply = screensaver_send_message_string (connection, "LockMessage", away_message); - if (reply == NULL) { - g_message ("Did not receive a reply from the screensaver."); - goto done; -diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c -index 6858509..0e3bb6f 100644 ---- a/src/gs-window-x11.c -+++ b/src/gs-window-x11.c -@@ -2132,38 +2132,21 @@ enum { - return utf8_name; - } - --static gchar * --str_replace(const char *string, const char *delimiter, const char *replacement) --{ -- gchar **split; -- gchar *ret; -- g_return_val_if_fail(string != NULL, NULL); -- g_return_val_if_fail(delimiter != NULL, NULL); -- g_return_val_if_fail(replacement != NULL, NULL); -- split = g_strsplit(string, delimiter, 0); -- ret = g_strjoinv(replacement, split); -- g_strfreev(split); -- return ret; --} -- - static void - update_clock (GSWindow *window) --{ -- char *markup; -- char *away_message; -- -- if (window->priv->away_message != NULL && g_str_has_prefix (window->priv->away_message, "CUSTOM###") && g_strcmp0(window->priv->away_message, "") != 0) { -- away_message = str_replace(window->priv->away_message, "CUSTOM###", ""); -- away_message = g_strdup_printf (_("%s: \"%s\""), get_user_display_name(), away_message); -- } -- else { -- away_message = g_strdup_printf (_("%s"), window->priv->default_message); -- } -- -- markup = g_strdup_printf ("%s\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#FFFFFF\">%s</span></b>", gnome_wall_clock_get_clock (window->priv->clock_tracker), away_message); -- gtk_label_set_markup (GTK_LABEL (window->priv->clock), markup); -- g_free (markup); -- g_free (away_message); -+{ -+ char *markup; -+ char *away_message; -+ if (g_strcmp0(window->priv->away_message, "DEFAULT") == 0 || g_strcmp0(window->priv->away_message, "") == 0) { -+ away_message = g_strdup_printf (_("%s"), window->priv->default_message); -+ } -+ else { -+ away_message = g_strdup_printf (_("%s: \"%s\""), get_user_display_name(), window->priv->away_message); -+ } -+ markup = g_strdup_printf ("%s\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#FFFFFF\">%s</span></b>", gnome_wall_clock_get_clock (window->priv->clock_tracker), away_message); -+ gtk_label_set_markup (GTK_LABEL (window->priv->clock), markup); -+ g_free (markup); -+ g_free (away_message); - } - - static void --- -1.8.1.6 - - -From 1ed6a959746e115a7f33de2134921c6572185ebd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com> -Date: Sat, 2 Mar 2013 08:13:04 +0100 -Subject: [PATCH 4/4] Simplify away message handling - ---- - src/cinnamon-screensaver-command.c | 19 ++++++++++++------- - src/gs-window-x11.c | 7 +++---- - 2 files changed, 15 insertions(+), 11 deletions(-) - -diff --git a/src/cinnamon-screensaver-command.c b/src/cinnamon-screensaver-command.c -index dbcac8a..4836f81 100644 ---- a/src/cinnamon-screensaver-command.c -+++ b/src/cinnamon-screensaver-command.c -@@ -41,7 +41,7 @@ - static gboolean do_query = FALSE; - static gboolean do_time = FALSE; - --static gchar *away_message = "DEFAULT"; -+static gchar *away_message; - - static GOptionEntry entries [] = { - { "exit", 0, 0, G_OPTION_ARG_NONE, &do_quit, -@@ -114,7 +114,7 @@ - static GDBusMessage * - screensaver_send_message_string (GDBusConnection *connection, - const char *name, -- gboolean value) -+ gchar *value) - { - GDBusMessage *message, *reply; - GError *error; -@@ -310,12 +310,17 @@ - } - - if (do_lock) { -- reply = screensaver_send_message_string (connection, "LockMessage", away_message); -- if (reply == NULL) { -- g_message ("Did not receive a reply from the screensaver."); -- goto done; -+ if (away_message) { -+ reply = screensaver_send_message_string (connection, "LockMessage", away_message); -+ if (reply == NULL) { -+ g_message ("Did not receive a reply from the screensaver."); -+ goto done; -+ } -+ g_object_unref (reply); -+ } else { -+ reply = screensaver_send_message_void (connection, "Lock", FALSE); -+ g_assert (reply == NULL); - } -- g_object_unref (reply); - } - - if (do_activate) { -diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c -index 0e3bb6f..22f5471 100644 ---- a/src/gs-window-x11.c -+++ b/src/gs-window-x11.c -@@ -2137,11 +2137,10 @@ enum { - { - char *markup; - char *away_message; -- if (g_strcmp0(window->priv->away_message, "DEFAULT") == 0 || g_strcmp0(window->priv->away_message, "") == 0) { -- away_message = g_strdup_printf (_("%s"), window->priv->default_message); -- } -- else { -+ if (window->priv->away_message && g_strcmp0(window->priv->away_message, "") != 0) { - away_message = g_strdup_printf (_("%s: \"%s\""), get_user_display_name(), window->priv->away_message); -+ } else { -+ away_message = g_strdup_printf (_("%s"), window->priv->default_message); - } - markup = g_strdup_printf ("%s\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#FFFFFF\">%s</span></b>", gnome_wall_clock_get_clock (window->priv->clock_tracker), away_message); - gtk_label_set_markup (GTK_LABEL (window->priv->clock), markup); --- -1.8.1.6 - |