Commit Graph

144 Commits

Author SHA1 Message Date
Benjamin Otte
d3c147a62d stylecontext: Split render functions out into gtkrender.[ch] 2014-10-03 06:18:05 +02:00
Matthias Clasen
0d528ab391 GtkMenuBar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:05 -04:00
Phillip Wood
beaba95f39 Window: Focus custom titlebar with F10
As discussed on desktop-devel-list [1], "There should be an intuitive,
consistent, immediate way to jump to the widgets that live in the
header bar." F10 has been suggested for this as it is already used to
active menubars.

F10 will focus the custom titlebar widget if the window has one and it
isn't already focused. If the titlebar widget doesn't exist or is
already focused then F10 focuses the menubar if there is one.

[1] https://mail.gnome.org/archives/desktop-devel-list/2014-February/msg00176.html

https://bugzilla.gnome.org/show_bug.cgi?id=725141
2014-03-09 20:26:54 -04:00
Matthias Clasen
fac8d6deea Allow applications to use gtk-menu-bar-accel in 3.12
gnome-terminal is still using this setting, so we'll let
applications override it for another cycle. It is no longer
backed by a system-wide setting, though, and it will still
go away eventually.

This partically reverts b26c74e5da
2014-03-03 18:58:36 -05:00
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