Add a way for panels to receive additional arguments.
This patch introduces the "argv" property to CcPanel. Panels that wish to handle extra arguments shall override it and act appropriately in the constructor. https://bugzilla.gnome.org/show_bug.cgi?id=657093
This commit is contained in:
parent
67a28bb629
commit
1f9ae38c2f
7 changed files with 35 additions and 10 deletions
|
@ -127,7 +127,12 @@ application_command_line_cb (GApplication *application,
|
|||
|
||||
start_id = start_panels[0];
|
||||
|
||||
if (!cc_shell_set_active_panel_from_id (CC_SHELL (shell), start_id, &err))
|
||||
if (start_panels[1])
|
||||
g_debug ("Extra argument: %s", start_panels[1]);
|
||||
else
|
||||
g_debug ("No extra argument");
|
||||
|
||||
if (!cc_shell_set_active_panel_from_id (CC_SHELL (shell), start_id, (const gchar**)start_panels+1, &err))
|
||||
{
|
||||
g_warning ("Could not load setting panel \"%s\": %s", start_id,
|
||||
(err) ? err->message : "Unknown error");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue