Commit graph

10 commits

Author SHA1 Message Date
Matthias Clasen
beea258891 Handle repeated commandline parsing properly
The control-center may call g_option_context_parse repeatedly,
so we need to reset the static variables used to hold the parsing
results, otherwise things like the search string may leak from
a previous parsing run.
https://bugzilla.gnome.org/show_bug.cgi?id=700362
2013-05-18 18:07:21 -04:00
Joaquim Rocha
d78bc9772a wacom: Re-write gui_gtk in Clutter to introduce animations
The name of the file was also changed to calibratorgui.c/h to avoid
it being inconsistent, this way it is no longer dependent on the
the technology.

https://bugzilla.gnome.org/show_bug.cgi?id=667797
2013-05-17 16:36:59 +02:00
Bastien Nocera
015cd17f96 shell: Remove obsolete libnotify dependency
The notification code to open the firewall ports was removed
in commit 45ba8e89e8, but libnotify
was still initialised.

https://bugzilla.gnome.org/show_bug.cgi?id=697035
2013-04-12 11:39:36 +02:00
Emanuele Aina
ab0576f1f0 shell: Expose panel launching with DBus-activation
Turn Control Center in a DBus-activable service and export a
'launch-panel' GAction which accepts a tuple containing the id of the
desired panel and its parameters as a GVariant array.

The snippet below show how the custom shortcuts section of the keyboard
panel can be invoked by a external programs through DBus:

GVariantBuilder *flags = g_variant_builder_new (G_VARIANT_TYPE_VARDICT);
GVariantBuilder *params = g_variant_builder_new (G_VARIANT_TYPE ("av"));
g_variant_builder_add (params, "v", g_variant_builder_end (flags));
g_variant_builder_add (params, "v", g_variant_new_string ("shortcuts"));
g_variant_builder_add (params, "v", g_variant_new_string ("custom"));
GVariant *v = g_variant_new ("(s@av)", "keyboard", g_variant_builder_end (params));

GApplication *gnomecc = g_application_new (id, G_APPLICATION_IS_LAUNCHER);
if (!g_application_register (gnomecc, NULL, &error))
  g_error ("Failed to register launcher for %s: %s", id, error->message);
g_action_group_activate_action (G_ACTION_GROUP (gnomecc), "launch-panel", v);

https://bugzilla.gnome.org/show_bug.cgi?id=696054
2013-04-03 18:09:15 +02:00
Emanuele Aina
31a8a99440 shell: Let panels have their own commandline flags
Add a class method to CcPanel to get a GOptionGroup which will be added
to the main commandline parser. This gives panels the chance to have
commandline "--flags" in addition to the already available parameters.

This changes changes the way parameters are passed to panels: the first
entry in the GVariant array is always the a{sv} dictionary of
commandline flags, followed by the remaining free-form arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=696054
2013-04-03 18:09:11 +02:00
Emanuele Aina
9977bb200e shell: Use GVariant to convey panel arguments instead of a string array
By using a GVariant of type "av" we can potentially pass more structured
data to panels, which will become relevant with the ability to invoke
them by GAction-based DBus-activation introduced in the following patch.

https://bugzilla.gnome.org/show_bug.cgi?id=696054
2013-04-03 18:02:10 +02:00
Jeremy Bicha
dd73671c24 shell: build fix (clutter-gtk includes)
Building without cheese broke with commit 64467d7

https://bugzilla.gnome.org/show_bug.cgi?id=694118
2013-02-18 15:20:44 -05:00
William Jon McCann
42974a3c8d shell: Rename shell window to CcWindow
This avoids the confusion of the name gnome-control-center.c and
is consistent with all the other classes/files in the project.

https://bugzilla.gnome.org/show_bug.cgi?id=692174
2013-02-18 16:40:44 +01:00
William Jon McCann
408ae4a87c shell: Make the main app window a subclass of GtkApplicationWindow
This allows for better encapsulation of window logic. In order to
do this CcShell was made an interface instead of an abstract base
class.

https://bugzilla.gnome.org/show_bug.cgi?id=692174
2013-02-18 16:40:44 +01:00
William Jon McCann
64467d7f0a shell: Make the application a GtkApplication subclass
This promotes better encapsulation and allows us to move
application logic out of main() and rename the confusingly
named control-center.c to main.c

https://bugzilla.gnome.org/show_bug.cgi?id=692174
2013-02-18 16:40:44 +01:00
Renamed from shell/control-center.c (Browse further)