Commit Graph

245 Commits

Author SHA1 Message Date
Matthias Clasen
8759575c0a Revert "GtkMenuItem: Add since 3.2 tags for 2 signals."
This reverts commit c6e1024a86.
2012-03-26 06:15:26 -04:00
Murray Cumming
c6e1024a86 GtkMenuItem: Add since 3.2 tags for 2 signals.
These signals were added in this commit in 2010-09:
http://git.gnome.org/browse/gtk+/commit/gtk/gtkmenuitem.c?id=3bd93e5bfd968d21cbcba15b952b254c41f204f9
2012-03-26 10:51:46 +02:00
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Carlos Garnacho
535b4150fd menus: Don't popdown submenus on button release for touch devices
This is so submenus stay open as the parent menu item is
pressed/released, since the user would typically lift the
finger in order to select a submenu item.
2012-03-01 16:25:24 -05:00
Carlos Garnacho
5139617b91 menus: Handle item selection for touch devices dynamically
Instead of using gtk-touchscreen-mode, the behavior changes depending
on the source device in use.
2012-03-01 16:25:22 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Colin Walters
a9614a39a4 gtkmenuitem: Silence a compiler warning 2012-01-21 10:29:07 -05:00
Rui Matos
9a4edf7a5a menuitem: Stop setting state flags on the style context for drawing 2011-12-19 19:21:16 +00:00
Matthias Clasen
020c1846b7 Use the workarea when placing popups
This uses the new workarea API to avoid placing popups underneath
panels, docks, etc.
2011-12-18 14:29:16 -05:00
Cosimo Cecchi
69a5b3af94 menuitem: cleanup arrow-spacing fetch code
Refactor get_arrow_size() to return the spacing as well, since basically
we always need both.
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
05e62e0251 menuitem: share code between HFW and non-HFW height requests
The code is very similar; having two slightly different code paths is
bad and can lead to bugs. Refactor the code to use the same height
request function.
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
4d76b10ce5 menuitem: properly respect padding when drawing the separators
Use the padding when calculating the draw coordinates of the separator.

https://bugzilla.gnome.org/show_bug.cgi?id=666242
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
713df0c72b menuitem: force odd height if we're not using wide separators
So that the 1px line can receive the same amount of space above and
below.

https://bugzilla.gnome.org/show_bug.cgi?id=666242
2011-12-15 18:52:30 +01:00
Cosimo Cecchi
20e94c1275 menuitem: don't request twice the padding for separator menu items
Padding was requested twice for separator menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=666242
2011-12-15 18:52:30 +01:00
Benjamin Otte
68bc011507 menuitem: WOrk around deprecation warnings 2011-11-08 21:14:06 +01:00
Florian Müllner
79803d0edc menuitem: Always treat submenus as popup
Submenus are not actually attached to a menubar, but styling them
as if they were imposes some problems (at least with Adwaita).
Just using GDK_WINDOW_TYPE_HINT_POPUP_MENU for submenus instead
fixes the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=662691
2011-11-05 01:49:50 -04:00
Matthias Clasen
8370052180 Don't use *DISABLE_DEPRECATED guards
Instead define GDK_DISABLE_DEPRECATION_WARNINGS where appropriate.
2011-11-01 22:35:57 -04:00
Benjamin Otte
b0e836e231 a11y: Merge gtksubmenuitem into gtkmenuitem
The reason why they were separate is historic, it's not useful to keep
the distinction.
2011-07-18 19:41:07 +02:00
Benjamin Otte
552113131c menuitems: Use submenuitem accessible exclusively
Submenus can come and go, so we cannot use an accessible that doesn't
allow for that.

Also, this fixes a rather large refleak.
2011-07-06 18:47:00 +02:00
Matthias Clasen
3459dc480a Convert Gail(Sub)MenuItem to GtkAccessible classes
This is along the same lines as the previous commit,
with the same caveat.
2011-07-05 16:08:57 -04:00
Javier Jardon
445ac0e650 gtk/gtkmenuitem: Remove reference to deprecated and removed GtkItem 2011-06-29 15:01:19 +01:00
Matthias Clasen
36f6c6167b Revert "gtk/gtkmenuitem: gtk_misc_set_alignment replacing"
This reverts commit 49e62d2a5f.
It turns out that GtkAccelLabel is not quite ready for
widget align properties.
2011-06-12 21:36:37 -04:00
Diego Celix
49e62d2a5f gtk/gtkmenuitem: gtk_misc_set_alignment replacing
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkmenuitem.c

https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:45 -04:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Javier Jardón
fdf979dce2 gtkwidget: Move private functions to private header
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-04 14:00:55 +02:00
Benjamin Otte
f6ffd6df8a menuitem: Remove unused variable
Seriously, can't people compile with -Werror? Broke with
5f2ef59d69
2011-05-27 16:11:09 +02:00
Benjamin Otte
f4e730e718 menuitem: Fix copy/paste error
Thanks to Kalev Lember for noticing this one.
2011-05-27 16:11:09 +02:00
Benjamin Otte
5f2ef59d69 menuitem: Position submenus properly
Now that we can actually query the menu's size, don't query the
preferred minimum size and hope it's correct, but use its actual size.
2011-05-25 04:49:12 +02:00
Cosimo Cecchi
091a4d7f22 menu: don't use the border as a padding value
Borders should be rendered inside the allocation, not act as a second
padding.

https://bugzilla.gnome.org/show_bug.cgi?id=650418
2011-05-18 10:45:50 -04:00
Benjamin Otte
87ecd9ad59 menuitem: Deprecate gtk_menu_item_set_right_justified()
And the getter, too: gtk_menu_item_get_right_justified() and the
corresponding property. Also make the only caller use the private
structure (as it did before the recent patches).
2011-05-02 16:57:12 +02:00
Matthias Clasen
dd73be389b Fix commit 5f55c42047
Make gtk_menu_shell_activate static and don't use it
outside gtkmenushell.c
2011-04-17 23:15:06 -04:00
Javier Jardón
d2d42f9bfc Move documentation to inline comments: GtkMenuItem 2011-04-18 02:08:37 +01:00
Benjamin Otte
e29cceb391 menushell: Include a function in the private header
Don't copy over the implementation. This avoids a copy of the function.
Reverts 0098344f84.
2011-04-16 22:28:40 +02:00
Chun-wei Fan
0098344f84 Update gtk/gtkmenuitem.c...
Copy over the implementation of _gtk_menu_shell_activate
so that C4013 warning/error (aka gcc's "implicit
declaration of ...") can be avoided when compiling with MSVC

This is in response of the changes for bug 554057 in commit
5f55c42047
2011-04-16 00:42:08 +08:00
Cosimo Cecchi
fe3f9ca9cd menuitem: set the menubar style class for menu items on a bar
So that themes can distinguish them from the other menu items.
2011-03-03 17:48:26 -05:00
Cosimo Cecchi
ee43f55b5f menuitem: mark with the GTK_STYLE_CLASS_MENUITEM style class 2011-03-03 17:48:25 -05:00
Matthias Clasen
394ae46ec0 Add some missing symbols to the docs 2011-02-08 23:21:39 -05:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Carlos Garnacho
c42f20efe3 Make GtkMenuItem use GtkStyleContext 2011-01-12 20:54:34 +01:00
Matthias Clasen
98440ad031 Remove gtktypeutils altogether
Based on patches by Javier Jardón.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Javier Jardón
72161a071f gtkmenuitem: Use private pointer instead G_TYPE_INSTANCE_GET_PRIVATE 2011-01-04 19:00:11 +01:00
Tristan Van Berkom
4ff893979b Fixed conflicts after rebasing master into combo-refactor branch. 2011-01-04 23:37:14 +09:00
Tristan Van Berkom
1cacae9cc4 Fixed trailing ';' on if statement in gtkmenuitem.c 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
c690402446 Fixed GtkMenuItem to reserve the actual arrow size and spacing
GtkMenuItem was reserving arrow size based on it's requested height,
now base the submenu arrow size on the actual arrow size and spacing.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
f15a589651 Added gtk_menu_item_set/get_reserve_indicator.
This is needed by GtkTreeMenu to ensure that child menu items
reserve space for the submenu indicator even if they dont have
submenus... in this way we ensure the same size of all cell
areas in the menu items at allocation/request time.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
58cdd6d38e Removed GtkMenuItem->show_submenu_indicator flag
The show_submenu_indicator flag was explicitly set in various
places from GtkMenu/GtkMenuBar at request times, since the
GtkMenuItem already checks the parent type for GTK_IS_MENU_BAR()
in various places, removed this flag in favor of just checking
the parent type (only in the interest of better readable code).
2011-01-04 23:37:05 +09:00
Matthias Clasen
9dee9a84d0 Removed sealed members from GtkMenuItem 2010-12-26 22:58:57 -05:00
Matthias Clasen
2ed81aa57c Remove sealed members from GtkMenuShell 2010-12-23 18:21:53 -05:00
Matthias Clasen
c5b020e628 Remove sealed members from GtkMenu 2010-12-23 15:51:20 -05:00
Carlos Garnacho
5f0f21aad3 GtkMenuItem: Set widget state as state flags. 2010-12-04 15:38:31 +01:00