Commit Graph

12 Commits

Author SHA1 Message Date
Ryan Lortie
0e671286fc GApplication: parse command line options
Add support for parsing command line options with GApplication.

You can add GOptionGroup and GOptionEntry using two new APIs:
g_application_add_option_group() and
g_application_add_main_option_entries().

Also add a "handle-local-options" signal that allows handling of
commandline arguments in the local process without having to override
local_command_line.

As a special feature, you can have a %NULL @arg_data in a GOptionEntry
which will cause the argument to be stored in a GVariantDict.  This
dictionary is available for inspection and modification by the
"handle-local-options" signal and can be forwarded to the primary
instance in cases of command line invocation (where it can be fetched
using g_application_command_line_get_options()).

https://bugzilla.gnome.org/show_bug.cgi?id=721977
2014-02-06 12:02:53 +00:00
Cosimo Cecchi
db325cd6a3 application: introduce methods to mark the application as busy
This feature is intended for clients that want to signal a desktop shell
their busy state, for instance because a long-running operation is
pending.
The API works in a similar way to g_application_hold and
g_application_release: applications can call g_application_mark_busy()
to increase a counter that will keep the application marked as busy
until the counter reaches zero again.

The busy state is exported read-only on the org.gtk.Application interface
for clients to use.

https://bugzilla.gnome.org/show_bug.cgi?id=672018
2013-04-04 13:13:53 -04:00
Colin Walters
6f8f1f7097 Remove most use of G_GNUC_INTERNAL
Now that we use an explicit list of symbols to export, the
G_GNUC_INTERNAL is redundant.

https://bugzilla.gnome.org/show_bug.cgi?id=688681
2013-01-18 13:03:28 -05:00
Ryan Lortie
eb5381b862 GApplication: add accessor for DBus information
Provide public access to the GDBusConnect and object path that
GApplication is using.  Prevents others from having to guess these
things for themselves based on the application ID.

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:43:06 -04:00
Ryan Lortie
0971d36e4b GApplication: receiving end of GRemoteActionGroup
Use the fact that the action group exporter now speaks to
GRemoteActionGroup to get the platform data into GApplicion without
hacks.

https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-17 12:54:02 -05:00
Ryan Lortie
eefd08996f introduce GRemoteActionGroup
This interfaceifies the extra functions that were on GDBusActionGroup
for dealing with platform data.

The two main benefits of doing this:

  - no longer have to do a silly song and dance in GApplication to avoid
    calling GDBusActionGroup API from non-dbus-aware code

  - the interface can be reused by the action group exporter to avoid
    ugly and unbindable hook callbacks

https://bugzilla.gnome.org/show_bug.cgi?id=665737
2011-12-17 12:54:02 -05:00
Ryan Lortie
ee9f104432 GApplication: send platform data for actions again
Use the _full variants of the GDBusActionGroup API to send platform data
for action invocations once again.
2011-12-16 22:24:03 -05:00
Matthias Clasen
df4cd241e5 GApplication: use GDBusActionGroup
instead of the internal version of the same
2011-12-08 18:05:12 -05:00
Ryan Lortie
d8d2513710 Implement (untested) GApplication actions support 2010-10-25 14:32:07 -04:00
Ryan Lortie
e33deea16c GApplication: reduce GVariant abuse
Don't use GVariant* as the representation for the argument array.
2010-10-19 19:38:00 +02:00
Ryan Lortie
3e6eee806c GApplication: add remote commandline support 2010-10-19 01:16:46 +02:00
Ryan Lortie
a7923a4aa3 new GApplication implementation 2010-10-19 01:16:46 +02:00