Commit Graph

140 Commits

Author SHA1 Message Date
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
cb24305f1b Trivial cleanup 2013-11-16 14:52:21 -05: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
b26c74e5da Deprecate and ignore gtk-menu-bar-accel setting
Use 'F10' by default.
2013-06-26 14:21:44 -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
Benjamin Otte
1349292e47 widget: Adapt _gtk_widget_get_preferred_size_for_size()
... for baseline support byu taking two extra (possible NULL) arguments.
2013-05-01 16:41:11 +02:00
Benjamin Otte
3450388ff0 sizerequest: Split out a common function 2013-04-22 18:29:01 -04:00
Cosimo Cecchi
ea415cd350 menubar: deprecate internal-padding style property
https://bugzilla.gnome.org/show_bug.cgi?id=689168
2012-11-28 10:09:16 -05:00
Cosimo Cecchi
1a79ee4d3e menubar: add support for CSS padding
In preparation for the removal of the internal-padding style property.

https://bugzilla.gnome.org/show_bug.cgi?id=689168
2012-11-28 10:09:16 -05:00
Ryan Lortie
dd143479fe gtkmodelmenu: simplify logic, expose bind API
Make the main (and only) entry-point to gtkmodelmenu.c the now-public
gtk_menu_shell_bind_model().

Move the convenience constructors (gtk_menu_new_from_model() and
gtk_menu_bar_new_from_model()) to their proper files.

Remove the private header file.

Simplify the code a bit by making the initial populate part of the
bind() call.

https://bugzilla.gnome.org/show_bug.cgi?id=682831
2012-09-17 12:31:22 -04:00
Matthias Clasen
bc17073a25 Move the gtk_shadow_type check down to gtk_render_frame
In gtk_menu_bar_draw, the check for shadow type != none
disables rendering of the background instead of the frame.
The check should be moved down to gtk_render_frame.
Patch by Peter de Ridder,
http://bugzilla.gnome.org/show_bug.cgi?id=670390
2012-09-16 23:28:06 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Rui Matos
6b624a5a18 menubar: Stop setting state flags on the style context for drawing 2011-12-19 19:21:16 +00:00
Benjamin Otte
f2626b6183 menubar: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:51 +02:00
Benjamin Otte
c0df6f9622 menushell: Use GtkMenuShellAccessible as a11y object
Previously it was only used by GtkMenuBar, and that's a naming mismatch.
2011-07-18 18:30:49 +02:00
Matthias Clasen
64eec8a97a Convert GailMenuShell to GtkMenuShellAccessible 2011-07-05 16:08:57 -04:00
Javier Jardón
7b0d77def5 gtkcontainer: Move private functions to private header
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-06 12:10:29 +01:00
Cosimo Cecchi
c8a59a6f92 all: avoid boxed structs copying where possible
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.

https://bugzilla.gnome.org/show_bug.cgi?id=650420
2011-05-18 10:27:21 -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
Benjamin Otte
f74df9ba70 menubar: Rewrite size allocation to take natural sizes into account
Yay for properly ellipsizing menubars!
2011-05-01 08:02:15 +02:00
Benjamin Otte
4c9b8e0fcd menubar: Only query ipadding when we actually need it 2011-05-01 05:38:47 +02:00
Benjamin Otte
ae32f2fe90 menubar: Respect ipadding also in y direction 2011-05-01 05:30:42 +02:00
Benjamin Otte
22a1bd6d6b menubar: Implement height-for-width / width-for-height
Pretty much just required hooking up the 2 vfuncs, the previous code
reorg did the rest of the work.
2011-05-01 04:44:56 +02:00
Benjamin Otte
c52f733a2d menubar: Actually query minimum and natural size of children
Previously, we only queried the minimum size and reported that as
natural size, too.
2011-05-01 04:44:56 +02:00
Benjamin Otte
3091a90538 menubar: Query only the necessary size from the child
The get_preferred_size() function was compied form elsewhere. We should
really make that a common API.
2011-05-01 04:44:56 +02:00
Benjamin Otte
923fcaa928 menubar: Only compute the necessary size
There's no need to compute height when we're only interested in width
2011-05-01 04:44:56 +02:00
Benjamin Otte
5aac83bf08 menubar: compute in advance wether to add toggle size 2011-05-01 04:44:56 +02:00
Benjamin Otte
f2bf5ce378 menubar: Change function prototype for size request function
This is in preparation for redoing that function to actually care about
natural sizes.
2011-05-01 04:44:56 +02:00
Benjamin Otte
d6fbbe159f menubar: Remove unnecessary return_if_fail() in vfuncs 2011-05-01 04:44:56 +02:00
Benjamin Otte
62e6bc7c34 menubar: Remove useless function declaration 2011-05-01 04:44:56 +02:00
Benjamin Otte
d8dfa74b4e menubar: Remove unused variable 2011-05-01 04:44:56 +02:00
Benjamin Otte
a64a2aded4 menubar: Compute proper size even when invisible 2011-05-01 04:44:56 +02:00
Matthias Clasen
5f55c42047 GtkMenuShell: always 'activate' menu shells
Failing to do so can leave us with a stuck grab in some cases.
https://bugzilla.gnome.org/show_bug.cgi?id=554057
2011-04-13 13:28:46 -04:00
Matthias Clasen
9d85d87f05 Move GtkMenuBar docs inline
And remove some outdated content.
2011-01-13 22:11:22 -05: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
Matthias Clasen
b5c6904c2f Drop explicit includes of gdkkeysyms.h
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05: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
Carlos Garnacho
cf0bd12e6c GtkStyleProperties: Turn border-width into a GtkBorder property.
All current users of this CSS property have been updated to deal
with a GtkBorder.

Also a 0 border width has been set in the default CSS to ensure
GtkStyleContext and GtkThemingEngine always provide a non-NULL
pointer for this property.
2010-12-04 15:39:52 +01:00
Carlos Garnacho
6fff76568c GtkMenuBar: Use GtkStyleContext for rendering. 2010-12-04 15:39:23 +01:00
Tristan Van Berkom
2dca7ad91d Removed size_request from GtkMenuBar 2010-10-27 14:30:07 +09:00
Emmanuele Bassi
9f9edb662e settings: Move setting property registration in gtksettings.c
Some GtkSettings property are registered by other classes. This leads
to the "interesting" issue that setting GtkSettings:gtk-button-images
requires that the GtkButton class is referenced first - or that a
GtkButton is created.

https://bugzilla.gnome.org/show_bug.cgi?id=632538
2010-10-20 10:34:25 +01: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
240ca0bb21 menubar: Port to draw vfunc 2010-09-26 15:11:37 +02:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02: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
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -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