Benjamin Otte
b4ee8a9daf
menuitem: Remove unneeded checks
...
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:28 +02:00
William Jon McCann
469d333aa2
docs: use Returns: consistently
...
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
7f6a964c47
Docs: Remove all entities and turn off sgml mode
...
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
7a208fbbf3
docs: use proper apostrophe
...
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
2a45418b67
docs: use proper quotes
2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456
docs: Use "#" for refsect2 instead of ##
2014-02-04 21:00:58 -05:00
Matthias Clasen
09d1b28249
docs: Convert to markdown
...
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
4c8bd8e7cf
docs: Identify examples that are C code
...
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081
docs: use |[ ]| instead of <programlisting></programlisting>
...
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
f3f7c385d9
Remove references to removed gtk_item_select api
2014-01-20 12:31:21 -05:00
Lars Uebernickel
d736e8baf9
GtkMenuItem: only set 'separator' class on the separator line
...
To make the separator line distinguishable from the widget's normal
border from css.
https://bugzilla.gnome.org/show_bug.cgi?id=719861
2013-12-05 12:35:12 +01:00
Bastien Nocera
438cd857c4
all: Add names to timeouts
...
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.
https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Benjamin Otte
7f8497f850
gtkmenuitem: Remove dead assignment
2013-08-13 16:25:26 +02:00
Matthias Clasen
0aa57d26b5
Move wholly deprecated classes to gtk/deprecated/
...
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.
Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Emmanuele Bassi
0899ef7cc9
gtk: Use new macros for defining private data
...
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
William Jon McCann
c96a1c4980
Deprecate GtkAction and GtkUIManager
...
It is recommended to use GAction et al and GtkBuilder.
2013-06-30 11:19:50 -04:00
William Jon McCann
76936193d5
Deprecate and ignore gtk-menu popup and popdown delay settings
...
Just pick good defaults. The a11y team confirmed that they don't
rely on them.
2013-06-26 14:08:37 -04:00
Xavier Claessens
92823b2201
GtkMenuItem: Take padding into account to position submenu arrow
...
Since commit a69619edbc
, it not
possible anymore for the style to add space between the border
and the arrow.
https://bugzilla.gnome.org/show_bug.cgi?id=700779
2013-05-29 14:53:17 +02:00
Luc Pionchon
0e08ff19ba
Add doc to set markup and accelerator on a MenuItem.
...
https://bugzilla.gnome.org/show_bug.cgi?id=699289
2013-05-19 21:24:01 -04:00
Matthias Clasen
f5f5b70355
Ignore deprecations where needed
...
There are a few places where we are still using deprecated
API internally - ignore deprecations around these uses.
2013-05-05 15:38:48 -04:00
David King
402985077b
docs: Add (inout) to requisition of gtk_menu_item_toggle_size_request()
...
https://bugzilla.gnome.org/show_bug.cgi?id=675571
2013-04-29 07:18:54 +01:00
Benjamin Otte
dded6a0673
menuitem: Remove old themeing enhancement
...
CSS doesn't allow themeing parents based on the state of their children,
so this code just causes extra redraws today.
2013-03-28 23:18:59 +01:00
Alexander Larsson
3d4cd4db3e
Add gtk_widget_(un)register_window
...
This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.
We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.
https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Benjamin Otte
7747910b9d
gtk: Use context's font
...
Instead of using gtk_style_context_get_font() in
pango_context_get_metrics(), use pango_context_get_font_description().
The context contains the font description we are about to use after all.
2012-12-06 02:57:18 +01:00
Benjamin Otte
4d0ca91c72
menuitem: Remove unused variables
2012-11-28 21:15:05 +01:00
Cosimo Cecchi
a69619edbc
menuitem: deprecate horizontal-padding style property
...
https://bugzilla.gnome.org/show_bug.cgi?id=689168
2012-11-28 10:09:16 -05:00
Benjamin Otte
73fe9a2acf
menuitem: Draw background unconditionally
2012-10-31 11:09:10 +01:00
Benjamin Otte
101c6a05a9
gtk: Move gtk_menu_is_empty() function to only user
...
The function was private and only used by gtkmenuitem.c.
Part of a bunch of fixes for gcc complaining about
-Wmissing-declarations.
2012-10-02 19:32:51 +02:00
Pavel Vasin
71d2b68da0
GtkMenuItem: fix leaked action_helper
2012-09-20 15:17:20 -04:00
Ryan Lortie
ea5a56dacf
GtkMenuItem: implement GtkActionable
...
...using the new GtkActionHelper
2012-08-20 13:13:45 -04:00
Benjamin Otte
d8b99d47ea
menuitem: Don't set menubar style class randomly
...
a) We're not a menubar, you can match on the parent if you have to
b) It's not set while getting preferred sizes
2012-04-17 08:59:23 +02:00
Matthias Clasen
050cba6a31
Fix malformed doc comments
...
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
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
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
Benjamin Otte
e6d1c8aeab
menuitem: Move paint function into expose function
2010-09-26 15:11:38 +02:00
Matthias Clasen
e0aa12eb0a
Tons of transfer annotations
2010-09-21 00:18:11 -04:00
Javier Jardón
9e81022bf6
Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
...
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
2010-09-13 21:26:01 +02:00
Matthias Clasen
3bd93e5bfd
Remove GtkItem
...
With the demise of GtkList and GtkTree, it has GtkMenuItem as sole
derived class, and is not really adding any value as a separate class.
Its few useful features have been merged into GtkMenuItem.
Bug 629104
2010-09-08 23:38:09 -04:00
Matthias Clasen
af8539bf11
Move deprectated menu enumerations to a private header
...
The GtkSubmenuDirection and GtkSubmenuPlacement enumerations
have been deprecated as public API for a while, but are still used
internally in the menu code. Move them to a private header. This
also prevents to generation of GObject boilerplate for these enums.
2010-08-28 21:24:11 -04:00
Javier Jardón
4d928459d3
gtk/gtkmenuitem.c: use accessor functions to access GtkWidget
2010-08-22 22:56:09 +02:00
Tristan Van Berkom
10ceb9da68
Fixed GtkMenuItem to not access the menu->requisition but get the minimum size request instead.
2010-08-20 21:18:13 -04:00
Tristan Van Berkom
52e5f36dc3
Implemented height-for-width geometry management for menus
...
Now GtkMenu/GtkMenuItem request/allocate in height-for-width
manner... to reduce the height of the menu one must explicitly
set the requested minimum width of the menu to a greater value
(using gtk_widget_set_size_request()).
2010-08-18 20:01:28 -04:00
Javier Jardón
c1a2ecc369
Check if childs actually exists before using it
...
Check seems to have gone lost during GtkBin sealing in commit 4427760b
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624707
2010-07-22 17:17:43 +02:00
Javier Jardón
4427760bcc
Use GtkBin accessors
2010-07-13 19:40:47 +02:00
Javier Jardón
3a10216dd0
Use accessor functions to acces GtkContainer
2010-07-13 19:40:46 +02:00