Rediffing desktop-number.patch with common diff options.
authorDaniel Baumann <daniel@debian.org>
Fri, 20 Apr 2012 12:45:50 +0000 (14:45 +0200)
committerDaniel Baumann <daniel@debian.org>
Fri, 20 Apr 2012 14:34:17 +0000 (16:34 +0200)
debian/patches/02-desktop-number.patch [new file with mode: 0644]
debian/patches/configure_desktop_number.patch [deleted file]
debian/patches/series

diff --git a/debian/patches/02-desktop-number.patch b/debian/patches/02-desktop-number.patch
new file mode 100644 (file)
index 0000000..c004aa1
--- /dev/null
@@ -0,0 +1,96 @@
+Author: Julien Lavergne <gilir@ubuntu.com>
+Description: Add configuration for desktop number for the pager plugin.
+
+diff -Naurp lxpanel.orig/src/plugins/pager.c lxpanel/src/plugins/pager.c
+--- lxpanel.orig/src/plugins/pager.c   2011-07-29 14:37:01.000000000 +0200
++++ lxpanel/src/plugins/pager.c        2012-04-20 14:38:05.935515180 +0200
+@@ -811,6 +811,80 @@ static void pager_destructor(Plugin * p)
+     g_free(pg);
+ }
++/* Callback when the configuration dialog is to be shown. */
++static void deskno_configure(Plugin * p, GtkWindow * parent)
++{
++
++    GdkScreen *screen = gdk_screen_get_default();
++    const char *wm_name = gdk_x11_screen_get_window_manager_name(screen);
++    GError *error = NULL;
++    const gchar *command_line = NULL;
++
++    if(g_strcmp0(wm_name, "Openbox") == 0)
++    {
++        if (g_find_program_in_path("obconf"))
++        {
++            command_line = "obconf --tab 6";
++        }
++    }
++    else if (g_strcmp0(wm_name, "compiz") == 0)
++    {
++         if (g_find_program_in_path("ccsm"))
++         {
++              command_line = "ccsm";
++
++         }
++         else if (g_find_program_in_path("simple-ccsm"))
++         {
++              command_line = "simple-ccsm";
++         }
++    }
++    else
++    {
++
++        GtkWidget* msg;
++
++        msg = gtk_message_dialog_new( NULL,
++                                      0,
++                                      GTK_MESSAGE_ERROR,
++                                      GTK_BUTTONS_OK,
++                                      _("Error, only openbox and compiz are supported") );
++        gtk_dialog_run( GTK_DIALOG(msg) );
++        gtk_widget_destroy( msg );
++
++    }
++
++    if (command_line)
++    {
++        gdk_spawn_command_line_on_screen(screen,
++                                         command_line,
++                                         &error);
++    }
++
++    else
++    {
++
++        GtkWidget* msg;
++
++        msg = gtk_message_dialog_new( NULL,
++                                      0,
++                                      GTK_MESSAGE_ERROR,
++                                      GTK_BUTTONS_OK,
++                                      _("Error, you need to install obconf, ccsm of simple-ccsm") );
++        gtk_dialog_run( GTK_DIALOG(msg) );
++        gtk_widget_destroy( msg );
++
++    }
++
++       if (error)
++       {
++           g_print("%s\n", error->message);
++
++               g_free (error);
++    }
++
++}
++
+ /* Callback when panel configuration changes. */
+ static void pager_panel_configuration_changed(Plugin * p)
+ {
+@@ -836,7 +910,7 @@ PluginClass pager_plugin_class = {
+     constructor : pager_constructor,
+     destructor  : pager_destructor,
+-    config : NULL,
++    config : deskno_configure,
+     save : NULL,
+     panel_configuration_changed : pager_panel_configuration_changed
+ };
diff --git a/debian/patches/configure_desktop_number.patch b/debian/patches/configure_desktop_number.patch
deleted file mode 100644 (file)
index 10ab7b7..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-Description: Add configuration for desktop number for the pager plugin.
-Author: Julien Lavergne <gilir@ubuntu.com>
-
---- a/src/plugins/pager.c
-+++ b/src/plugins/pager.c
-@@ -811,6 +811,80 @@
-     g_free(pg);
- }
-+/* Callback when the configuration dialog is to be shown. */
-+static void deskno_configure(Plugin * p, GtkWindow * parent)
-+{
-+
-+    GdkScreen *screen = gdk_screen_get_default();
-+    const char *wm_name = gdk_x11_screen_get_window_manager_name(screen);
-+    GError *error = NULL;
-+    const gchar *command_line = NULL;
-+
-+    if(g_strcmp0(wm_name, "Openbox") == 0)
-+    {
-+        if (g_find_program_in_path("obconf"))
-+        {
-+            command_line = "obconf --tab 6";
-+        }
-+    }
-+    else if (g_strcmp0(wm_name, "compiz") == 0)
-+    {
-+         if (g_find_program_in_path("ccsm"))
-+         {
-+              command_line = "ccsm";
-+
-+         }
-+         else if (g_find_program_in_path("simple-ccsm"))
-+         {
-+              command_line = "simple-ccsm";
-+         }
-+    }
-+    else
-+    {
-+    
-+        GtkWidget* msg;
-+
-+        msg = gtk_message_dialog_new( NULL, 
-+                                      0, 
-+                                      GTK_MESSAGE_ERROR, 
-+                                      GTK_BUTTONS_OK, 
-+                                      _("Error, only openbox and compiz are supported") );
-+        gtk_dialog_run( GTK_DIALOG(msg) );
-+        gtk_widget_destroy( msg );
-+    
-+    }
-+
-+    if (command_line)
-+    {
-+        gdk_spawn_command_line_on_screen(screen,
-+                                         command_line,
-+                                         &error);
-+    }
-+
-+    else
-+    {
-+    
-+        GtkWidget* msg;
-+
-+        msg = gtk_message_dialog_new( NULL, 
-+                                      0, 
-+                                      GTK_MESSAGE_ERROR, 
-+                                      GTK_BUTTONS_OK, 
-+                                      _("Error, you need to install obconf, ccsm of simple-ccsm") );
-+        gtk_dialog_run( GTK_DIALOG(msg) );
-+        gtk_widget_destroy( msg );
-+    
-+    }
-+
-+      if (error)
-+      {
-+          g_print("%s\n", error->message);
-+              
-+              g_free (error);
-+    }
-+
-+}
-+
- /* Callback when panel configuration changes. */
- static void pager_panel_configuration_changed(Plugin * p)
- {
-@@ -836,7 +910,7 @@
-     constructor : pager_constructor,
-     destructor  : pager_destructor,
--    config : NULL,
-+    config : deskno_configure,
-     save : NULL,
-     panel_configuration_changed : pager_panel_configuration_changed
- };
index 39a3668..4fc8408 100644 (file)
@@ -1,4 +1,4 @@
 01-default-config.patch
-configure_desktop_number.patch
+02-desktop-number.patch
 potfiles-in.patch
 run-in-background.patch