From 0c5f948f4f55ea63c95cc65d0a6d34e1a3424fc6 Mon Sep 17 00:00:00 2001
From: Marty Jack <martyj@linux.local>
Date: Mon, 22 Feb 2010 08:09:29 -0500
Subject: [PATCH 7/9] Implement lxpanelctl config command (FR1992552).
---
man/lxpanelctl.xml | 19 +++++++++++++++----
src/lxpanelctl.c | 6 +++---
src/panel.c | 6 +++++-
3 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/man/lxpanelctl.xml b/man/lxpanelctl.xml
index a5c439d..ddc0bf0 100644
--- a/man/lxpanelctl.xml
+++ b/man/lxpanelctl.xml
@@ -69,7 +69,7 @@ choice="req"
</term>
<listitem
> <para
->show system menu</para>
+>Show the system menu.</para>
</listitem>
</varlistentry>
<varlistentry
@@ -79,7 +79,18 @@ choice="req"
</term>
<listitem
> <para
->show run dialog</para>
+>Show the run dialog.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry
+> <term
+><command
+>config</command>
+ </term>
+ <listitem
+> <para
+>Show the panel configuration dialog. If more than one panel is configured,
+it is undefined which panel configuration dialog will be shown.</para>
</listitem>
</varlistentry>
<varlistentry
@@ -89,7 +100,7 @@ choice="req"
</term>
<listitem
> <para
->restart lxpanel</para>
+>Restart lxpanel.</para>
</listitem>
</varlistentry>
<varlistentry
@@ -99,7 +110,7 @@ choice="req"
</term>
<listitem
> <para
->exit lxpanel</para>
+>Exit lxpanel.</para>
</listitem>
</varlistentry>
</variablelist>
diff --git a/src/lxpanelctl.c b/src/lxpanelctl.c
index d8f5ad9..7474a5d 100644
--- a/src/lxpanelctl.c
+++ b/src/lxpanelctl.c
@@ -34,7 +34,7 @@ static const char usage[] =
"Available commands:\n"
"menu\tshow system menu\n"
"run\tshow run dialog\n"
-// "config\tshow config dialog\n"
+ "config\tshow configuration dialog\n"
"restart\trestart lxpanel\n"
"exit\texit lxpanel\n\n";
@@ -44,8 +44,8 @@ static int get_cmd( const char* cmd )
return LXPANEL_CMD_SYS_MENU;
else if( ! strcmp( cmd, "run") )
return LXPANEL_CMD_RUN;
-// else if( ! strcmp( cmd, "config") )
-// return LXPANEL_CMD_CONFIG;
+ else if( ! strcmp( cmd, "config") )
+ return LXPANEL_CMD_CONFIG;
else if( ! strcmp( cmd, "restart") )
return LXPANEL_CMD_RESTART;
else if( ! strcmp( cmd, "exit") )
diff --git a/src/panel.c b/src/panel.c
index 5859671..db888e6 100644
--- a/src/panel.c
+++ b/src/panel.c
@@ -261,7 +261,11 @@ static void process_client_msg ( XClientMessageEvent* ev )
break;
#endif
case LXPANEL_CMD_CONFIG:
- //FIXME: configure();
+ {
+ Panel * p = ((all_panels != NULL) ? all_panels->data : NULL);
+ if (p != NULL)
+ panel_configure(p, 0);
+ }
break;
case LXPANEL_CMD_RESTART:
restart();
--
1.6.6.1