Commit Graph

20082 Commits

Author SHA1 Message Date
Benjamin Otte
17e0f9fb0a popover: 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
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
Benjamin Otte
34cfd5cd78 menu: 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
Benjamin Otte
fd527691a8 levelbar: 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
Benjamin Otte
6be0603215 eventbox: 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
Benjamin Otte
d7a3e67025 listbox: 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
Benjamin Otte
562147c267 frame: 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
Benjamin Otte
209781ae3c headerbar: 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
Benjamin Otte
68ceab6872 infobar: 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
Benjamin Otte
f72b496a45 grid: 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
Benjamin Otte
9ee00c3522 scrolledwindow: 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
Benjamin Otte
ddbd71e22a switch: 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
Benjamin Otte
c3dd043765 toolbar: 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
Benjamin Otte
a158a2aa48 treeview: 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
Benjamin Otte
9652b8cf82 viewport: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
29a4f0131e viewport: Implement hfw properly
Previously, the code would fall back on GtkBin's hfw implementation
which didn't account for padding and borders.
2014-05-01 14:51:27 +02:00
Benjamin Otte
b261fc64e2 viewport: Use a convenience function
That function looks longer than not using it, but we'll need it in the
next commit.
2014-05-01 14:51:27 +02:00
Benjamin Otte
2e2e3a5e24 viewport: Request 2x border-width
It's nice that bugs get pointed out in code comments. Fixing them would
probably have been preferrable though.
2014-05-01 14:51:27 +02:00
Benjamin Otte
db791ba3f5 widget: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
43e470dad1 flowbox: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
7455ab72f8 combobox: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
3914bc9ce6 button: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
71fe1a5fe3 alignment: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
e6b15c88ca arrow: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
a1bba344f2 spinner: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Matthias Clasen
ff87672780 GtkSearchBar: fix the template
There was a mismatch between GtkSearchBar being derived from GtkBin
and the template claiming the parent to be GtkBox.
2014-04-29 21:46:38 -04:00
Benjamin Otte
8b15cd33ee window: Subtract shadow from passed in width for height
... and height for width in size requests. Fixes mislayout in
control-center universal access panel.
2014-04-29 19:36:26 +02:00
Benjamin Otte
73aa7bd2f5 widgets: Remove (GtkTickCallback) casts
Instead, make the functions conform to the prototype, so that casting
isn't needed.
2014-04-29 19:35:29 +02:00
Matthias Clasen
6061f234a9 GtkMenuSectionBox: Don't show separators for nested subsections
...unless they are labeled.

To implement this, keep track of the nesting depth of section boxes,
starting from 0 for the toplevel and the submenu ones, and only
insert unlabeled separators if the depth is at most 1.
2014-04-29 12:19:53 -04:00
Matthias Clasen
f3ba001a1d GtkMenuSectionBox: Always show separators for labeled sections
...unless they are empty.
2014-04-29 12:19:53 -04:00
Matthias Clasen
4f293c427c Add a comment with rules for separators 2014-04-29 12:19:53 -04:00
Matthias Clasen
effc7514e7 GtkMenuSectionBox: don't leak
This wasn't fully fleshed out yet.
2014-04-29 10:18:22 -04:00
Alexander Larsson
c0a87a85f4 treeview: Fix prelight redraw when adjustment changes
When the adjustment changes (due to e.g. a mouse wheel scroll) we update
the prelight. The part that un-prelights the previous prelight was
broken by the the pixel cache, as it called update_prelight in the
middle of the scrolling operation, where the windows were moved
but the tree_view->priv->dy was not changed to the new value. This
caused the updates to the pixel cache to go to the wrong place.

We fix this by fully doing the scroll before we update_prelight().

https://bugzilla.gnome.org/show_bug.cgi?id=728284
2014-04-29 09:12:02 +02:00
Matthias Clasen
a6fb006ab5 GtkMenuShell: We want separators in submenus
This was probably an oversight when adding the merge_separators
parameter. Without this change, the testsuite/gtk/gtkmenu test
fails.
2014-04-28 22:46:25 -04:00
Matthias Clasen
723dc0667e GtkMenuShell: Don't use a non-existing property
GtkMenuTrackerItem::visible was removed a few commits ago.
It is not necessary to bind visible anyway, since the menu
tracker will insert and remove items as their visibility
changes.
2014-04-28 21:55:41 -04:00
Carlos Garnacho
5b72e0f8cf popover: Always make room for the tail on all sides on size request
Now that popovers may snap to any side with enough space, make enough
room on every side when requesting size, so that there's no w/h differences
at the time of setting the child allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=729097
2014-04-28 22:35:32 +02:00
Juan Pablo Ugarte
d1467c191d GtkRecentChooserMenu: Set current uri before activating an item.
When activating an item using mnemonics GtkRecentChooserMenu does not select a
item before calling the item-activated signal thus
gtk_recent_chooser_get_current_uri() always return the last selected item
instead of the activated one.

Fixes Bug 495105 "Open recent file keyboard shortcuts do not work correctly"
2014-04-28 17:08:12 -03:00
Matthias Clasen
2dcf6c6b71 Raleigh: fix a typo 2014-04-28 15:39:21 -04:00
Matthias Clasen
0af4b71cd1 GtkDialog: protect against show_all
The real reason for the problem that the just reverted change
was supposed to address is that testfilechooser uses show_all
to tease out places where composite dialogs don't properly
protect their internals against unintended showing. Well,
lets do that, then.
2014-04-28 15:39:21 -04:00
Matthias Clasen
26d6eadab7 Revert "GtkFileChooserDialog: Avoid a bottom border in the dialog"
This reverts commit d871105fa8.
2014-04-28 15:39:21 -04:00
Matthias Clasen
6c3936fb9a Document iconic section support
https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:21:07 -04:00
Matthias Clasen
28a567f5a9 GtkMenuSectionBox: add support for iconic sections
Sections that have the display-hint attribute set to
"horizontal-boxes" will be rendered as a row of icon
buttons, instead of menuitem-like.
2014-04-28 14:20:26 -04:00
Matthias Clasen
8fff8acbac GtkMenuTrackerItem: Add support for display-hint
This commit adds a getter for the display-hint attribute.
2014-04-28 14:20:26 -04:00
Matthias Clasen
6429b33f44 GtkModelButton: Add an iconic mode
In iconic mode, model buttons will be styled like regular icon
buttons, preferring to show only the icon if one is set, falling
back to showing the label.

https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:20:15 -04:00
Matthias Clasen
038de02574 GtkMenuTrackerItem: Add support for verb-icons
When rendering iconic sections, we want to use icons for verbs,
and we want to differentiate these in the menu model, to keep
the icon attribute reserved for nouns.

https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:14:43 -04:00
Ryan Lortie
5137e491dc GtkPopover: new approach to menu model binding
Instead of using GtkMenuTracker to flatten the sections into a single
linear menu, handle the sections ourselves by nesting boxes.

Each section gets an inner and outer box.  The inner box numbers its
children in the way that the tracker instructs.  The outer box
containes the inner box and the separator, if appropriate.

Having the two separate boxes will allow us to change the orientation of
the inner box if we want to pack widgets horizontally within a section.
2014-04-28 14:14:42 -04:00
Ryan Lortie
d930716daf GtkMenuTracker: add 'merge_sections' flag
Add the possibility of a GtkMenuTracker that performs no section
merging.  Instead, it will report an item in the form of a separator for
subsections.  It is then possible to get a separate tracker for the
subsection contents by using gtk_menu_tracker_new_for_item_link().
2014-04-28 14:14:42 -04:00
Ryan Lortie
f6ee00769a GtkMenuTracker: don't specialise "submenu" link
We have some API in GtkMenuTracker and GtkMenuTrackerItem that is
specifically designed to deal with submenus.

Generalise these APIs to take a 'link_name' parameter that we always
give as G_MENU_SUBMENU for now.  In the future, this will allow creating
trackers for other types of links, such as sections.
2014-04-28 14:14:41 -04:00
Ryan Lortie
48db841822 GtkMenuTracker: make "is-visible" a property
Make this a property just like all of the other things and make the APIs
for accessing it non-private (but add a note that they are not intended
to be used).
2014-04-28 14:14:41 -04:00
Ryan Lortie
06ab1d9203 GtkMenuTracker: remove "visible" property
This is in conflict with the "is-visible" pseudo-property which is about
to be promoted to being an actual property.
2014-04-28 14:14:40 -04:00