Commit Graph

12 Commits

Author SHA1 Message Date
Jonh Wendell
9125ccb1cb [GtkApplication] Add gtk_application_get_windows()
Closes #623598.
2010-07-05 17:12:53 -03:00
Emmanuele Bassi
b98667d41e application: Remove a variable and silence a compiler warning 2010-06-18 14:26:57 +01:00
Emmanuele Bassi
2755b93913 application: Revert the leak plug
The &s in the signature of a GVariant means "pass me a pointer". To
avoid repeating the same mistake, use a const gchar* to declare the
key.
2010-06-18 14:26:05 +01:00
Emmanuele Bassi
3e1b82336c application: Plug a leak
The key returned by g_variant_iter_next() should be freed as well.

Also, clean up the coding style a bit.
2010-06-18 12:06:39 +01:00
Christian Persch
9d0b941da6 application: Fix marshaler for GVariant gtype change
Use VARIANT instead of BOXED.
2010-06-18 00:25:06 +02:00
Emmanuele Bassi
4f357dbf95 application: Allow sub-classes to override the Window creation
Sub-classes of GtkApplication might want to override the way an
application window is created - for instance, to hook into GtkBuilder
or to set up some basic UI or state.

A new GtkApplication::create_window() virtual function is added to the
GtkApplicationClass vtable, which returns the newly created GtkWindow.
The gtk_application_create_window() function calls the vfunc and adds
the returned window to the list of windows managed by the application
instance.

Calling gtk_application_add_window() will also set the default window,
if one is not already set.

This commit also removes a spurious g_object_ref_sink() on the newly
created GtkWindow.
2010-06-17 15:41:12 +01:00
Colin Walters
bdaefd7efe [GtkApplication] Update for GApplication API changes
Move appid parameter first to match GApplication.
2010-06-16 11:02:39 -04:00
Colin Walters
6c71da01cc [GtkApplication] Update for GApplication API changes
We now implement "quit" and "action" signals here.

https://bugzilla.gnome.org/show_bug.cgi?id=621003
2010-06-14 18:30:51 -04:00
Matthias Clasen
79b161f709 Use gtk_action_group_get_action when looking up actions
...instead of open-coding it. Pointed out by Christian Persch
in bug 620960
2010-06-08 09:03:07 -04:00
Matthias Clasen
cca298ad7d Remove debug spew 2010-06-08 08:58:16 -04:00
Matthias Clasen
b366ae9c22 Update to GApplication api changes 2010-06-08 08:29:01 -04:00
Matthias Clasen
1ae257d00a Add GtkApplication
This is a work in progress to stub out an application class. The
primary goal is to provide a mechanism for applications to export
GtkActions, and there is a standard "Quit" action.

This is based on GApplication.

Future work:
 * Add a way to say "This is my application menubar", which gets
   put into all toplevel windows on non-OS-X, and into the top
   on OS X.
 * Support session management.
 * Support application settings.

https://bugzilla.gnome.org/show_bug.cgi?id=127958
2010-06-07 16:46:30 -04:00