]> Pileus Git - ~andy/gtk/log
~andy/gtk
12 years agoPlugman: Find the plugins menu in a better way
Matthias Clasen [Wed, 14 Dec 2011 11:32:13 +0000 (06:32 -0500)]
Plugman: Find the plugins menu in a better way

Now that GtkBuilder finds named submenus, there's no need for
the clumsy menumodel navigation anymore.

12 years agoGtkBuilder: pick up named submenus
Matthias Clasen [Wed, 14 Dec 2011 05:13:32 +0000 (00:13 -0500)]
GtkBuilder: pick up named submenus

When parsing GMenu xml, use the facility for pick up named submenus.
Note that <section id='foo'>...</section> is _not_ a named submenu.
It is a named item with an unnamed submenu :-(

12 years agoHandle menu changes.
William Hua [Mon, 12 Dec 2011 03:33:45 +0000 (22:33 -0500)]
Handle menu changes.

12 years agoAdd accelerators to bloatpad.
William Hua [Mon, 12 Dec 2011 03:17:51 +0000 (22:17 -0500)]
Add accelerators to bloatpad.

12 years agoRefactor GMenuModel rendering for Mac OS.
William Hua [Mon, 12 Dec 2011 02:49:21 +0000 (21:49 -0500)]
Refactor GMenuModel rendering for Mac OS.

12 years agogtkquartz-menu: fix some leaks
William Hua [Sun, 11 Dec 2011 23:46:55 +0000 (18:46 -0500)]
gtkquartz-menu: fix some leaks

12 years agobegin adding menu accelerators
William Hua [Sun, 11 Dec 2011 22:39:30 +0000 (17:39 -0500)]
begin adding menu accelerators

Show accelerators in menus.

12 years agoTwo small fixes
Matthias Clasen [Mon, 12 Dec 2011 02:16:24 +0000 (21:16 -0500)]
Two small fixes

Don't leak a session bus reference, and don't assume a display
is X11 just because we've built the X11 backend.

12 years agoFix up includes
Matthias Clasen [Sun, 11 Dec 2011 16:25:41 +0000 (11:25 -0500)]
Fix up includes

12 years agobloatpad: add 'New Window' menu item
Ryan Lortie [Sun, 11 Dec 2011 05:06:50 +0000 (00:06 -0500)]
bloatpad: add 'New Window' menu item

12 years agobegin GtkApplication menu support for Mac OS
William Hua [Sat, 10 Dec 2011 23:51:30 +0000 (18:51 -0500)]
begin GtkApplication menu support for Mac OS

12 years agoAnother plugin, for good measure
Matthias Clasen [Fri, 9 Dec 2011 18:51:39 +0000 (13:51 -0500)]
Another plugin, for good measure

12 years agoSomething for the eye
Matthias Clasen [Fri, 9 Dec 2011 18:27:10 +0000 (13:27 -0500)]
Something for the eye

12 years agoAdd an action too
Matthias Clasen [Fri, 9 Dec 2011 18:17:35 +0000 (13:17 -0500)]
Add an action too

12 years agowip example for plugin/gmenu interaction
Matthias Clasen [Fri, 9 Dec 2011 18:09:38 +0000 (13:09 -0500)]
wip example for plugin/gmenu interaction

12 years agoUpdate testgmenu to latest api changes
Matthias Clasen [Fri, 9 Dec 2011 16:34:39 +0000 (11:34 -0500)]
Update testgmenu to latest api changes

12 years agoGtkApplicationWindow: share one GActionMuxer
Ryan Lortie [Thu, 8 Dec 2011 05:15:45 +0000 (00:15 -0500)]
GtkApplicationWindow: share one GActionMuxer

Use the same GActionMuxer for menubars and accels instead of recreating
a new one each time.

12 years agoDocumentation additions
Matthias Clasen [Thu, 8 Dec 2011 04:55:33 +0000 (23:55 -0500)]
Documentation additions

12 years agoGtkApplicationWindow: Always install accelerators
Matthias Clasen [Mon, 5 Dec 2011 22:50:17 +0000 (17:50 -0500)]
GtkApplicationWindow: Always install accelerators

We want accelerators to work, even if the menus are not shown
locally, so we can't rely on the GtkMenu code to set them up
for us. Currently, this code only installs accelerators when the
window is realized.

12 years agoBloatpad: Add an accelerator in the menu
Matthias Clasen [Mon, 5 Dec 2011 22:44:03 +0000 (17:44 -0500)]
Bloatpad: Add an accelerator in the menu

12 years agoGtkApplication: Extract accelerators from menus
Matthias Clasen [Mon, 5 Dec 2011 22:41:56 +0000 (17:41 -0500)]
GtkApplication: Extract accelerators from menus

This allows to specify accelerators in a convenient way, by
adding accel="..." attributes to the menu items in the
XML for the menu.

Currently, the accelerators are extracted only once, when the
menu property is changed on the application.

12 years agoIntroduce gtkaccelmapprivate.h
Matthias Clasen [Mon, 5 Dec 2011 22:37:04 +0000 (17:37 -0500)]
Introduce gtkaccelmapprivate.h

Move internal accel map API there and update all users.
Also, add an internal function to create an accel path for
an action and parameter, and use it in gtkapplication.c and
gtkmodelmenuitem.c instead of duplicating that code.

12 years agoBloatpad: Add an accelerator
Matthias Clasen [Mon, 5 Dec 2011 22:29:32 +0000 (17:29 -0500)]
Bloatpad: Add an accelerator

12 years agoGtkApplication: Add API to install accelerators for actions
Matthias Clasen [Mon, 5 Dec 2011 22:28:19 +0000 (17:28 -0500)]
GtkApplication: Add API to install accelerators for actions

12 years agoGtkApplicationWindow: Set the accel group on constructed windows
Matthias Clasen [Mon, 5 Dec 2011 22:14:57 +0000 (17:14 -0500)]
GtkApplicationWindow: Set the accel group on constructed windows

This will make the menuitems pick up matching accel map entries
automatically. Currently, nothing creates such accel map entries,
though.

12 years agoGtkApplicationWindow: Add a GtkAccelGroup
Matthias Clasen [Mon, 5 Dec 2011 22:10:17 +0000 (17:10 -0500)]
GtkApplicationWindow: Add a GtkAccelGroup

This will be used in the following patches.

12 years agoFix a gtk-doc warning
Matthias Clasen [Mon, 5 Dec 2011 22:41:44 +0000 (17:41 -0500)]
Fix a gtk-doc warning

12 years agoGtkApplication: export windows on the bus
Ryan Lortie [Mon, 5 Dec 2011 05:27:11 +0000 (00:27 -0500)]
GtkApplication: export windows on the bus

And advertise their location on the bus using X11 properties.

12 years ago(trivially) implement 'shutdown' in GtkApplication
Ryan Lortie [Mon, 5 Dec 2011 05:25:28 +0000 (00:25 -0500)]
(trivially) implement 'shutdown' in GtkApplication

12 years agoAdd an example
Matthias Clasen [Mon, 5 Dec 2011 00:16:08 +0000 (19:16 -0500)]
Add an example

12 years agoUpdate GtkApplicationWindow docs
Matthias Clasen [Sun, 4 Dec 2011 23:40:19 +0000 (18:40 -0500)]
Update GtkApplicationWindow  docs

12 years agoWhitespace fix
Matthias Clasen [Sun, 4 Dec 2011 23:33:01 +0000 (18:33 -0500)]
Whitespace fix

12 years agoMake accelmap initialization more forgiving
Matthias Clasen [Sun, 4 Dec 2011 00:35:27 +0000 (19:35 -0500)]
Make accelmap initialization more forgiving

12 years agoClean up includes
Matthias Clasen [Sun, 4 Dec 2011 00:34:32 +0000 (19:34 -0500)]
Clean up includes

12 years agobloatpad: add proper sections to the menus
Ryan Lortie [Sat, 3 Dec 2011 23:52:35 +0000 (18:52 -0500)]
bloatpad: add proper sections to the menus

12 years agoSplit off GMenuModel -> GtkMenuBar code
Ryan Lortie [Sat, 3 Dec 2011 23:45:32 +0000 (18:45 -0500)]
Split off GMenuModel -> GtkMenuBar code

Put this in a separate file and substantially refactor it.

Move handling of submenu creation into gtkmodelmenuitem where it
belongs.

Improve our handling of when to show separators or not.

12 years agoWatch "shell shows menu" settings for changes
Ryan Lortie [Sat, 3 Dec 2011 19:55:03 +0000 (14:55 -0500)]
Watch "shell shows menu" settings for changes

Correctly monitor the GtkSettings for changes to the
"gtk-shell-shows-app-menu" and "gtk-shell-shows-menubar" properties.

12 years agoGtkSettings: quartz: shell always shows menus
Ryan Lortie [Sat, 3 Dec 2011 18:35:26 +0000 (13:35 -0500)]
GtkSettings: quartz: shell always shows menus

12 years agoWhitespace fixes
Matthias Clasen [Fri, 2 Dec 2011 23:21:10 +0000 (18:21 -0500)]
Whitespace fixes

12 years agoNever add separators to menubars
Matthias Clasen [Fri, 2 Dec 2011 23:18:58 +0000 (18:18 -0500)]
Never add separators to menubars

12 years agogmenu testcase: update to glib API changes
Ryan Lortie [Fri, 2 Dec 2011 21:10:31 +0000 (16:10 -0500)]
gmenu testcase: update to glib API changes

12 years agobloatpad: move action/menu setup to ::startup
Ryan Lortie [Fri, 2 Dec 2011 15:36:49 +0000 (10:36 -0500)]
bloatpad: move action/menu setup to ::startup

No need to waste time doing this in init() if we are not going to become
the primary instance.

12 years agobloatpad: port to GActionMap for application
Ryan Lortie [Fri, 2 Dec 2011 15:32:10 +0000 (10:32 -0500)]
bloatpad: port to GActionMap for application

g_application_set_action_group() is now deprecated.

12 years agoGtkModelMenuItem: don't leak a GVariant
Ryan Lortie [Fri, 2 Dec 2011 03:59:27 +0000 (22:59 -0500)]
GtkModelMenuItem: don't leak a GVariant

12 years agobloatpad: use GtkBuilder for constructing menus
Ryan Lortie [Fri, 2 Dec 2011 03:43:54 +0000 (22:43 -0500)]
bloatpad: use GtkBuilder for constructing menus

This is closer to what a real application would want to do.

12 years agoGtkModelMenuItem: omit indicator if not required
Ryan Lortie [Fri, 2 Dec 2011 03:33:30 +0000 (22:33 -0500)]
GtkModelMenuItem: omit indicator if not required

GtkModelMenuItem, being based on GtkCheckMenuItem, was always reserving
space for a check/radio indicator.  This ends up looking pretty strange
in a GtkMenuBar.

Don't reserve space for the indicator unless it's appropriate.

12 years agoGtkApplicationWindow: nuke some g_print spew
Ryan Lortie [Fri, 2 Dec 2011 03:16:34 +0000 (22:16 -0500)]
GtkApplicationWindow: nuke some g_print spew

12 years agoGtkApplcationWindow: plug two obvious leaks
Ryan Lortie [Fri, 2 Dec 2011 03:14:57 +0000 (22:14 -0500)]
GtkApplcationWindow: plug two obvious leaks

12 years agoGtkApplicationWindow: Consistently unparent menubar
Colin Walters [Fri, 2 Dec 2011 03:13:56 +0000 (22:13 -0500)]
GtkApplicationWindow: Consistently unparent menubar

We create it floating, and don't hold an extra ref, so we should
just unparent it.

12 years agoGtkApplicationWindow: clean up menubar logic
Ryan Lortie [Fri, 2 Dec 2011 03:01:07 +0000 (22:01 -0500)]
GtkApplicationWindow: clean up menubar logic

12 years agoOnly add a separator when a section ends
Matthias Clasen [Fri, 2 Dec 2011 01:49:05 +0000 (20:49 -0500)]
Only add a separator when a section ends

12 years agointroduce GtkModelMenuItem
Ryan Lortie [Fri, 2 Dec 2011 01:39:11 +0000 (20:39 -0500)]
introduce GtkModelMenuItem

This GtkMenuItem subclass (and GActionObserver implementation) contains
all the knowledge necessary for converting a GMenuModel item description
into a GtkMenuItem.

Remove much of the code that used to do this from
gtkapplicationwindow.c.

12 years agoGtkSettings: add shell-shows-menubar property
Ryan Lortie [Fri, 2 Dec 2011 00:57:32 +0000 (19:57 -0500)]
GtkSettings: add shell-shows-menubar property

Unity will set this to tell us that it is going to handle displaying the
menubar.

12 years agoOnly add separators when a section actually ends
Matthias Clasen [Thu, 1 Dec 2011 23:13:15 +0000 (18:13 -0500)]
Only add separators when a section actually ends

12 years agoBloatpad: Add a View menu for fullscreen
Matthias Clasen [Thu, 1 Dec 2011 22:46:28 +0000 (17:46 -0500)]
Bloatpad: Add a View menu for fullscreen

12 years agoBloatpad: Don't leak a menu model
Matthias Clasen [Thu, 1 Dec 2011 22:41:46 +0000 (17:41 -0500)]
Bloatpad: Don't leak a menu model

12 years agobloatpad: Be 640x480 by default
Colin Walters [Thu, 1 Dec 2011 22:53:28 +0000 (17:53 -0500)]
bloatpad: Be 640x480 by default

Because otherwise we're just a few pixels, and this is the least lame
solution I know of in GTK+.

12 years agoGtkApplicationWindow: Further sanitize handling of merging app menu and menubar
Colin Walters [Thu, 1 Dec 2011 22:47:34 +0000 (17:47 -0500)]
GtkApplicationWindow: Further sanitize handling of merging app menu and menubar

The _set_show_app_menu should really be _set_show_menubar().

Also, correctly display just the window menu in the window when run
under GNOME 3.

12 years agobloatpad: Fix Edit to be a submenu
Colin Walters [Thu, 1 Dec 2011 22:12:20 +0000 (17:12 -0500)]
bloatpad: Fix Edit to be a submenu

12 years agoGtkApplication: Merge app menu and menubar
Colin Walters [Thu, 1 Dec 2011 21:46:36 +0000 (16:46 -0500)]
GtkApplication: Merge app menu and menubar

Change bloatpad to have both an app menu and a menubar.

12 years agoGtkApplicationWindow: Make mnemonics work for stateful actions
Matthias Clasen [Thu, 1 Dec 2011 20:25:46 +0000 (15:25 -0500)]
GtkApplicationWindow: Make mnemonics work for stateful actions

12 years agoBloatpad: Add mnemonics to the menu
Matthias Clasen [Thu, 1 Dec 2011 20:25:24 +0000 (15:25 -0500)]
Bloatpad: Add mnemonics to the menu

12 years agoGtkApplicationWindow: Don't unref a NULL object
Colin Walters [Thu, 1 Dec 2011 18:29:41 +0000 (13:29 -0500)]
GtkApplicationWindow: Don't unref a NULL object

12 years agoAdapt to changes in GLib API
Ryan Lortie [Thu, 1 Dec 2011 17:18:22 +0000 (12:18 -0500)]
Adapt to changes in GLib API

g_application_get_menu() -> get_app_menu().

12 years agoDrop GtkApplicationMenuButton for now
Matthias Clasen [Thu, 1 Dec 2011 17:17:53 +0000 (12:17 -0500)]
Drop GtkApplicationMenuButton for now

This feels premature; we do have the fallback situation covered
adaequately with the menubar, and people can do their own creative
solutions with gtk_application_window_get_menu(), so we don't have
to offer a widget for this right now.

12 years agoRemove a redundant test
Matthias Clasen [Thu, 1 Dec 2011 13:51:22 +0000 (08:51 -0500)]
Remove a redundant test

12 years agoGtkApplicationMenuButton: add docs
Matthias Clasen [Thu, 1 Dec 2011 13:33:08 +0000 (08:33 -0500)]
GtkApplicationMenuButton: add docs

12 years agoUndoccommentify action muxer files
Matthias Clasen [Thu, 1 Dec 2011 11:30:10 +0000 (06:30 -0500)]
Undoccommentify action muxer files

12 years agoWhitespace fixes
Matthias Clasen [Thu, 1 Dec 2011 05:21:11 +0000 (00:21 -0500)]
Whitespace fixes

12 years agoHook up docs
Matthias Clasen [Thu, 1 Dec 2011 05:09:45 +0000 (00:09 -0500)]
Hook up docs

12 years agoRemove no-longer existing function
Matthias Clasen [Thu, 1 Dec 2011 05:02:08 +0000 (00:02 -0500)]
Remove no-longer existing function

12 years agoGtkApplicationWindow: more docs
Matthias Clasen [Thu, 1 Dec 2011 04:59:32 +0000 (23:59 -0500)]
GtkApplicationWindow: more docs

12 years agoInclude gtkapplicationmenubutton.h in gtk.h
Matthias Clasen [Thu, 1 Dec 2011 04:55:05 +0000 (23:55 -0500)]
Include gtkapplicationmenubutton.h in gtk.h

12 years agoGtkApplicationWindow: mark a string for translation
Matthias Clasen [Thu, 1 Dec 2011 04:53:39 +0000 (23:53 -0500)]
GtkApplicationWindow: mark a string for translation

12 years agoSome coding style fixes
Matthias Clasen [Thu, 1 Dec 2011 04:49:23 +0000 (23:49 -0500)]
Some coding style fixes

12 years agoGtkApplication: doc improvement
Matthias Clasen [Thu, 1 Dec 2011 04:48:59 +0000 (23:48 -0500)]
GtkApplication: doc improvement

12 years agoSome initial docs
Matthias Clasen [Thu, 1 Dec 2011 00:14:48 +0000 (19:14 -0500)]
Some initial docs

12 years agoDrop an unused variable
Matthias Clasen [Wed, 30 Nov 2011 21:50:17 +0000 (16:50 -0500)]
Drop an unused variable

12 years agoDon't call g_object_unref on a variant
Matthias Clasen [Wed, 30 Nov 2011 21:33:32 +0000 (16:33 -0500)]
Don't call g_object_unref on a variant

Tsk, tsk...

12 years agoGtkApplicationWindow: Use dispose for GObjects
Colin Walters [Wed, 30 Nov 2011 20:55:31 +0000 (15:55 -0500)]
GtkApplicationWindow: Use dispose for GObjects

This ensures we break cyclic references.

12 years agogtkapplicationwindow: Pick up gtk-shell-shows-app-menu XSetting
Colin Walters [Wed, 30 Nov 2011 20:41:43 +0000 (15:41 -0500)]
gtkapplicationwindow: Pick up gtk-shell-shows-app-menu XSetting

Calling gtk_application_window_set_show_app_menu() is now an override
for that setting.  If you don't call it, we pick up the default.

12 years agogdk: Fix prototype for gdk_x11_window_set_utf8_property
Colin Walters [Wed, 30 Nov 2011 20:41:02 +0000 (15:41 -0500)]
gdk: Fix prototype for gdk_x11_window_set_utf8_property

12 years agobloatpad: use GtkApplicationMenuButton
Ryan Lortie [Wed, 30 Nov 2011 20:25:12 +0000 (15:25 -0500)]
bloatpad: use GtkApplicationMenuButton

12 years agoadd GtkApplicationMenuButton
Ryan Lortie [Wed, 30 Nov 2011 20:24:22 +0000 (15:24 -0500)]
add GtkApplicationMenuButton

12 years agobloatpad: add 'win.fullscreen' action
Ryan Lortie [Wed, 30 Nov 2011 18:39:38 +0000 (13:39 -0500)]
bloatpad: add 'win.fullscreen' action

12 years agobloatpad: make "about" a window action
Ryan Lortie [Wed, 30 Nov 2011 17:07:25 +0000 (12:07 -0500)]
bloatpad: make "about" a window action

By making "about" a per-window action, we can pop the about dialog up on
top of the correct window instead of trying to guess from the
application list of windows.

12 years agoGtkApplicationWindow: wire up action activations
Ryan Lortie [Wed, 30 Nov 2011 17:06:40 +0000 (12:06 -0500)]
GtkApplicationWindow: wire up action activations

Wire the 'activate_action' and 'change_action_state' vfuncs through to
the GSimpleActionGroup.

12 years agogtk.symbols fixes
Ryan Lortie [Wed, 30 Nov 2011 16:58:38 +0000 (11:58 -0500)]
gtk.symbols fixes

12 years agoGtkApplicationWindow: implement GActionMap
Ryan Lortie [Wed, 30 Nov 2011 16:51:41 +0000 (11:51 -0500)]
GtkApplicationWindow: implement GActionMap

12 years agoport bloatpad to the new APIs
Ryan Lortie [Wed, 30 Nov 2011 14:41:00 +0000 (09:41 -0500)]
port bloatpad to the new APIs

12 years agoadd GtkApplicationWindow
Ryan Lortie [Wed, 30 Nov 2011 14:34:29 +0000 (09:34 -0500)]
add GtkApplicationWindow

This is a GtkWindow subclass that "application windows" will use.  Each
is associated with a GtkApplication, has the ability to show menus and
will have its own associated set of actions.

12 years agoadd GActionMuxer and observer interfaces
Ryan Lortie [Wed, 30 Nov 2011 14:33:03 +0000 (09:33 -0500)]
add GActionMuxer and observer interfaces

These were destined for GLib, but they don't really make sense as a
public API.  Instead, we'll copy/paste them around between the various
codebases that need to render menus.

12 years agoGtkSettings: add shell-shows-app-menu property
Ryan Lortie [Wed, 30 Nov 2011 03:28:11 +0000 (22:28 -0500)]
GtkSettings: add shell-shows-app-menu property

This is a boolean property that will be set to TRUE if the current
desktop environment is capable of displaying the application menu as
part of the desktop shell.

If it is FALSE then the application will need to display the menu for
itself.

12 years agoMake it build against the current wip/menus-rebase3 branch
Matthias Clasen [Tue, 29 Nov 2011 22:44:11 +0000 (17:44 -0500)]
Make it build against the current wip/menus-rebase3 branch

12 years agotestgmenu: #ifdef out non-compiling code for now
Colin Walters [Tue, 29 Nov 2011 20:59:20 +0000 (15:59 -0500)]
testgmenu: #ifdef out non-compiling code for now

12 years agoAdd a very bad fallback check
Matthias Clasen [Tue, 29 Nov 2011 04:40:18 +0000 (23:40 -0500)]
Add a very bad fallback check

...maybe committing this inspires some better solution.

12 years agowindow: Set a _DBUS_APPLICATION_ID X11 window property
Colin Walters [Fri, 25 Nov 2011 22:22:16 +0000 (17:22 -0500)]
window: Set a _DBUS_APPLICATION_ID X11 window property

This will allow gnome-shell to reference it.

12 years agox11: Add gdk_x11_window_set_utf8_property
Colin Walters [Fri, 25 Nov 2011 22:21:05 +0000 (17:21 -0500)]
x11: Add gdk_x11_window_set_utf8_property

A convenience function to manipulate UTF-8 X11 properties; no point
in wrapping each one in individual setters.

12 years agoGtkApplication: Insert separators after sections
Matthias Clasen [Sun, 27 Nov 2011 04:44:37 +0000 (23:44 -0500)]
GtkApplication: Insert separators after sections

The previous code was only inserting a separator when a new
section was starting right away, which may not always be the
case.

12 years agotestgmenu: Insert separators after sections
Matthias Clasen [Sun, 27 Nov 2011 04:42:33 +0000 (23:42 -0500)]
testgmenu: Insert separators after sections

The previous code was only inserting a separator when a new
section was starting right away.