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
Matthias Clasen
d1a9d764a8
Remove gtk_widget_hide_all()
...
it's useless and a trap for programmers
https://bugzilla.gnome.org/show_bug.cgi?id=438318
2010-10-19 19:31:38 +02:00
John Ralls
27ad64dccf
Bug 631719 - Restore second, more important, call to set label from the menu item.
2010-10-15 13:14:19 -07:00
Javier Jardón
eac1959d2c
Move destroy signal to GtkWidget
...
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Benjamin Otte
d9c9259861
Move GtkSizeRequest into GtkWidget
...
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.
Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.
So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.
The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
1d3f6b30b0
API: Rename gtk_cairo_paint_*() to gtk_paint_*()
...
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
6f6c81e527
menuitem: Remove is_drawable() check
2010-09-26 15:11:38 +02:00
Benjamin Otte
475f96216d
menuitem: Port to draw vfunc
2010-09-26 15:11:38 +02:00