Commit Graph

112 Commits

Author SHA1 Message Date
Ryan Lortie
fd9b7bbfac Remove #include for muxer from gtkapplication.c 2012-08-20 13:13:49 -04:00
William Hua
fe48e077bd Action helper support in Mac OS menus. 2012-08-20 13:13:49 -04:00
Ryan Lortie
2e57819477 GtkApplication: add 'active-window' property 2012-08-20 13:08:17 -04:00
Matthias Clasen
f7683b05b1 GtkApplication: Fix unsetting menu models
Pointed out by Zachary Dovel in
http://bugzilla.gnome.org/show_bug.cgi?id=679705
2012-07-10 21:25:58 -04:00
Cosimo Cecchi
f22226b3c9 application: fix double free of app_id
This is fallout from commit 257b42e2f9 -
those fields were already getting freed in
gtk_application_shutdown_x11() and my commit caused crashes on quit
instead.

Thanks to Rico Tzschichholz for reporting the bug and testing this fix.
2012-07-05 16:40:23 -04:00
Cosimo Cecchi
257b42e2f9 application: plug some memory leaks 2012-07-02 10:41:29 -04:00
Cosimo Cecchi
f70fc49ebc docs: fix a number of typos and obsolete references 2012-07-02 10:41:11 -04:00
Cosimo Cecchi
9992026ca6 application: fix a typo in introspection annotation
https://bugzilla.gnome.org/show_bug.cgi?id=677127
2012-06-25 14:49:11 -04:00
Christian Persch
75331c0ac2 application: Really allow NULL application-id
While the docs were adjusted to claim that NULL application-id is allowed,
the code actually segfaulted on it.
2012-06-12 16:15:12 +02:00
Murray Cumming
b3f2583a46 gtk_application_new(): Docs: application_id may now be null.
https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-05-28 16:16:56 +02:00
John Ralls
b5bcdbc10f Rename gtkquartz-menu to gtkmodelmenu-quartz
Makes name consistent with other quartz-only modules and makes it clear that this works with the GMenuModel system rather than the older GtkMenu system.
2012-05-07 14:59:06 -07:00
Christian Persch
4b4ec4472c application: Fix build without x11 2012-05-03 18:47:58 +02:00
Christian Persch
ff66d0d8e5 application: Add unique IDs for GtkApplicationWindow
This will allow to refer to specific GtkApplicationWindows remotely by ID.

https://bugzilla.gnome.org/show_bug.cgi?id=674409
2012-05-03 17:45:46 +02:00
Ryan Lortie
af71917015 GtkApplication: adjust to GApplication changes
GApplication now makes the session bus and object path available as a
public API on the application instance.  Use that instead of trying to
guess values for ourselves.

This causes this version of Gtk+ to depend on GLib 2.32.2, so bumping
version dependency accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:50:45 -04:00
Ryan Lortie
babd137e32 GtkApplication: fixes for NULL session bus
We currently have a couple of cases where GtkApplication assumes that
the session bus will be non-NULL causing critical error output or (in
the case of trying to publish menus) an infinite loop.

Three fixes:

 - if the session bus is NULL due to not having registered the
   GtkApplication yet then give a g_critical on the entry point to the
   menu setters instead of going into an infinite loop.  Document this.

 - check for NULL session bus even when calling the menu setters at the
   right time in order to prevent the infinite loop for
   non-programer-error cases (ie: because we had trouble connecting to
   the session bus)

 - check for NULL session bus when publishing the X11 properties on the
   GtkApplicationWindow and skip publishing them if we're not on the bus

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:50:45 -04:00
Murray Cumming
d4c1b46a9e GtkAppplication docs: Fix small typo. 2012-04-19 09:26:00 +02:00
Murray Cumming
c00cfda370 GtkApplication Docs: Add a hint.
gtk_application_set_app_menu(), gtk_application_set_menubar():
Mention that you probably want to call this in the startup signal
handler. If you do it earlier you will likely get a warning about
a missing D-Bus connection, because doing it earlier does not
make sense anyway.
2012-03-28 11:26:22 +02:00
Murray Cumming
79758e3d98 Docs: GtkApplication: Hint about GtkActionMap 2012-03-26 10:51:46 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Javier Jardón
df1ff836a8 gtk/gtkapplication.c: Do not use gtk_dialog_run() 2012-02-27 17:06:11 +00:00
Javier Jardón
80674d9dc0 docs: GtkApplication "quit" signal is gone now 2012-02-23 11:58:18 +00:00
Ryan Lortie
ef2df583f2 GtkApplication: simplify session quit handling
Instead of firing a 'quit' signal and expecting the application to do
something that will cause it to quit, just call the new
g_application_quit() API for ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=670485
2012-02-21 01:23:01 +01:00
Ryan Lortie
659c7130f0 GtkApplication: remove end session API
This seems a bit "too powerful" and unlikely to be used by most
applications.  Remove it from now, until someone comes up with a strong
desire for it.

https://bugzilla.gnome.org/show_bug.cgi?id=670485
2012-02-21 01:23:01 +01:00
Matthias Clasen
585a6652d5 Use G_SOURCE_CONTINUE/REMOVE
Now that GLib provides these macros, we should use them
to make the code more readable.
2012-01-30 19:12:27 -05:00
Cosimo Cecchi
c76cccd437 application: sync clipboard and recent manager on shutdown
This mimics the code for gtk_main(), since GApplication iterates the
main context directly.
2012-01-25 18:31:25 -05:00
Matthias Clasen
7d56c052d4 Fix a doc typo 2012-01-24 22:28:34 -05:00
Matthias Clasen
e7d6400149 GtkApplication: documentation additions
Document that startup() needs to chain up first.
2012-01-24 22:22:08 -05:00
Matthias Clasen
284ff06ef6 GtkApplication: fix !x11 build
Since we moved the menu models to GTK+, we need to deal with
them on all platforms, even if we don't do anything special
with them on win32.
2012-01-20 08:16:35 -05:00
Ryan Lortie
60317cbf1a move menus over from GLib
App menu and menubar are now properties of GtkApplication and their bus
location is exported using X window properties.

https://bugzilla.gnome.org/show_bug.cgi?id=668118
2012-01-18 13:40:05 -05:00
Javier Jardón
c958667a92 gtkapplication.c: Add missing "Since" tag 2012-01-12 12:58:56 +00:00
Dan Winship
05c484dcb0 GtkApplication: add inhibitor dialog under OS X
Since OS X doesn't have an inhibitors API, we need to display the
inhibit reason ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=667705
2012-01-11 12:00:06 -05:00
Dan Winship
7afc7081c1 GtkApplication: fix/simplify OS X implementation
Make the OS X implementation compile, and remove the code that was
only needed to support user interaction during the quit request.

https://bugzilla.gnome.org/show_bug.cgi?id=667705
2012-01-11 12:00:06 -05:00
Rico Tzschichholz
f24dd8f067 Fix some missing renames of GtkApplicationEndStyle 2012-01-11 08:49:34 +01:00
Matthias Clasen
7c0c65ec8d Rename GtkApplicationEndStyle
Call it EndSession to make it clearer what this is about.
2012-01-10 22:16:01 -05:00
Matthias Clasen
1c486fb8b8 Simplify logout notification api
We don't expose ::quit-requested as API anymore. Instead, we expect
users to register inhibitors when needed. Without quit-requested,
there is no need for ::quit-cancelled and gtk_application_quit_response
anymore.

We still emit ::quit when the application is about to quit.
2012-01-10 21:45:30 -05:00
Matthias Clasen
9cb4518a24 Fix wrong refencences in the docs
Replace all references to g_application_set_app_menu and
g_application_set_menubar by their gtk variants, which
actually exist. Pointed out in bug 667546
2012-01-09 17:30:09 -05:00
Rob Bradford
4007449a58 application: Correct the fallback definition for gtk_application_end_session
The function definition used a pointer to the enum value rather than the enum
itself.

This broke the build on platforms that don't have an implmentation of these
functions.
2012-01-09 15:09:27 +00:00
Matthias Clasen
f3533e4fc2 Fix the gtk_application_end_session implementation
We were passing the wrong flags, causing the meaning of
the request_confirmation parameter to be inverted.
2012-01-08 02:16:26 -05:00
Matthias Clasen
f78696f3d0 GtkApplication: only allow quit_response when it make sense
This check was present in the OS X implementation, but it
makes sense in the D-Bus implementation as well.
2012-01-07 20:01:23 -05:00
Matthias Clasen
00d5214695 Remove some debug spew 2012-01-07 19:55:20 -05:00
Matthias Clasen
bb957e5389 GtkApplication: Add OS X implementation from EggSMClient 2012-01-07 19:52:14 -05:00
Benjamin Otte
f6d2f4fa8d application: return a value 2012-01-07 15:56:26 +01:00
Martin Pitt
700a334d87 gtkapplication.c: Fix syntax error
Previous commit accidentally removed the closing } from
gtk_application_end_session(). Add it back to unbreak the build.
2012-01-07 10:04:18 +01:00
Matthias Clasen
916009b5d6 Add a trivial implementation of the new apis
For non-X11, this is just a placeholder until we get around
to moving the EggSMClient implementations over.
2012-01-07 03:20:56 -05:00
Matthias Clasen
48872705f0 Document the new apis 2012-01-07 03:20:56 -05:00
Matthias Clasen
3142d13972 Add gtk_application_end_session
This function allows applications to request that
the user session be ended by logout/shutdown/reboot.
2012-01-07 03:20:56 -05:00
Matthias Clasen
bdd7e15c84 GtkApplication: Add an inhibit api
This lets applications block logout and similar actions ahead
of time. Currently only implemented for D-Bus, but Windows has
very similar API since Vista.
2012-01-07 03:20:56 -05:00
Matthias Clasen
3133791302 GtkApplication: Add logout notification
This is fairly basic, allowing applications to learn when
the session manager is about to end the session, and possibly
block this. The only implementation at this point is using the
org.gnome.SessionManager D-Bus interface of gnome-session. It should
be straightforward to port the EggSMClient implementations for
Windows and OS X.
2012-01-07 03:20:56 -05:00
Matthias Clasen
7df5cf2a3a GtkApplication: Rename a member for clarity
'session' is a bit ambiguous (and GtkApplication may grow session
management support at some point), so rename the bus connection
to 'session_bus'.
2012-01-05 23:53:40 -05:00
Cosimo Cecchi
157d9271fa application: don't unconditionally unref the GMenuModel in getters
Both the app-menu and menubar models can be NULL, so we shouldn't
blindly unref them, since g_object_unref() doesn't cope with NULL
pointers.
2011-12-21 12:20:15 +01:00