1
Description: Add configuration for desktop number for the pager plugin.
2
Author: Julien Lavergne <gilir@ubuntu.com>
4
Index: lxpanel-0.5.8+git20120112/src/plugins/pager.c
5
===================================================================
6
--- lxpanel-0.5.8+git20120112.orig/src/plugins/pager.c 2012-02-13 22:49:56.000000000 +0100
7
+++ lxpanel-0.5.8+git20120112/src/plugins/pager.c 2012-02-13 22:50:07.000000000 +0100
12
+/* Callback when the configuration dialog is to be shown. */
13
+static void deskno_configure(Plugin * p, GtkWindow * parent)
16
+ GdkScreen *screen = gdk_screen_get_default();
17
+ const char *wm_name = gdk_x11_screen_get_window_manager_name(screen);
18
+ GError *error = NULL;
19
+ const gchar *command_line = NULL;
21
+ if(g_strcmp0(wm_name, "Openbox") == 0)
23
+ if (g_find_program_in_path("obconf"))
25
+ command_line = "obconf --tab 6";
28
+ else if (g_strcmp0(wm_name, "compiz") == 0)
30
+ if (g_find_program_in_path("ccsm"))
32
+ command_line = "ccsm";
35
+ else if (g_find_program_in_path("simple-ccsm"))
37
+ command_line = "simple-ccsm";
45
+ msg = gtk_message_dialog_new( NULL,
49
+ _("Error, only openbox and compiz are supported") );
50
+ gtk_dialog_run( GTK_DIALOG(msg) );
51
+ gtk_widget_destroy( msg );
57
+ gdk_spawn_command_line_on_screen(screen,
67
+ msg = gtk_message_dialog_new( NULL,
71
+ _("Error, you need to install obconf, ccsm of simple-ccsm") );
72
+ gtk_dialog_run( GTK_DIALOG(msg) );
73
+ gtk_widget_destroy( msg );
79
+ g_print("%s\n", error->message);
86
/* Callback when panel configuration changes. */
87
static void pager_panel_configuration_changed(Plugin * p)
91
constructor : pager_constructor,
92
destructor : pager_destructor,
94
+ config : deskno_configure,
96
panel_configuration_changed : pager_panel_configuration_changed