~ubuntu-branches/ubuntu/maverick/gnome-screensaver/maverick

« back to all changes in this revision

Viewing changes to debian/patches/06_unbreak_upgrade_from_jaunty.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-06-28 23:13:11 UTC
  • Revision ID: james.westby@ubuntu.com-20090628231311-w8lxayx6efi52ze6
Tags: 2.27.0-0ubuntu2
* debian/patches/06_unbreak_upgrade_from_jaunty.patch:
  - Make sure gnome-screensaver-dialog doesn't fail when
    spawned from an older gnome-screensaver that calls it with
    the deprecated "--away-message" option. This can happen on
    upgrades where the Jaunty gnome-screensaver might spawn the
    Karmic gnome-screensaver-dialog to unlock the screen.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nur -x '*.orig' -x '*~' gnome-screensaver-2.27.0/src/gnome-screensaver-dialog.c gnome-screensaver-2.27.0.new/src/gnome-screensaver-dialog.c
 
2
--- gnome-screensaver-2.27.0/src/gnome-screensaver-dialog.c     2009-06-15 18:05:06.000000000 +0100
 
3
+++ gnome-screensaver-2.27.0.new/src/gnome-screensaver-dialog.c 2009-06-28 23:11:38.201837644 +0100
 
4
@@ -49,6 +49,7 @@
 
5
 static gboolean enable_switch  = FALSE;
 
6
 static char    *logout_command = NULL;
 
7
 static char    *status_message   = NULL;
 
8
+static char    *away_message     = NULL;
 
9
 
 
10
 static GOptionEntry entries [] = {
 
11
         { "verbose", 0, 0, G_OPTION_ARG_NONE, &verbose,
 
12
@@ -63,6 +64,8 @@
 
13
           N_("Show the switch user button"), NULL },
 
14
         { "status-message", 0, 0, G_OPTION_ARG_STRING, &status_message,
 
15
           N_("Message to show in the dialog"), N_("MESSAGE") },
 
16
+        { "away-message", 0, 0, G_OPTION_ARG_STRING, &away_message,
 
17
+          N_("Message to show in the dialog (deprecated)"), N_("MESSAGE") },
 
18
         { NULL }
 
19
 };
 
20
 
 
21
@@ -382,6 +385,11 @@
 
22
         if (status_message) {
 
23
                 g_object_set (widget, "status-message", status_message, NULL);
 
24
         }
 
25
+        
 
26
+        if (away_message && !status_message) {
 
27
+                g_object_set (widget, "status-message", away_message, NULL);
 
28
+                g_warning ("\"--away-message\" is deprecated. Use \"--status-message\" instead");
 
29
+        }
 
30
 
 
31
         g_signal_connect (GS_LOCK_PLUG (widget), "response", G_CALLBACK (response_cb), NULL);
 
32
         g_signal_connect (widget, "show", G_CALLBACK (show_cb), NULL);