Implement lxpanelctl config command (FR1992552).
authorMarty Jack <martyj@linux.local>
Mon, 22 Feb 2010 13:09:29 +0000 (08:09 -0500)
committerMarty Jack <martyj@linux.local>
Mon, 22 Feb 2010 13:09:29 +0000 (08:09 -0500)
man/lxpanelctl.xml
src/lxpanelctl.c
src/panel.c

index a5c439d..ddc0bf0 100644 (file)
@@ -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>
index d8f5ad9..7474a5d 100644 (file)
@@ -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") )
index 5859671..db888e6 100644 (file)
@@ -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();