Commit Graph

20269 Commits

Author SHA1 Message Date
Cosimo Cecchi
8fff30090b radiobutton: don't use focus-line-width 2014-05-09 11:02:45 -07:00
Cosimo Cecchi
a32260660b checkbutton: don't use focus-line-width 2014-05-09 11:02:45 -07:00
Cosimo Cecchi
a2a1c6da95 cellarea: don't use focus-line-width
Use CSS padding instead.
2014-05-09 11:02:45 -07:00
Cosimo Cecchi
2cbf3c66ef treeview: use the CELL style class while doing cell size request
Since we use the same style class later when we draw them. Otherwise
we'll get inconsistent results for CSS borders/paddings between the two
cycles.
2014-05-09 11:02:45 -07:00
Cosimo Cecchi
0ff3f16da1 calendar: don't use focus-line-width 2014-05-09 11:02:44 -07:00
Cosimo Cecchi
694b209094 button: don't use focus-line-width 2014-05-09 11:02:44 -07:00
Cosimo Cecchi
bbadfbcd2a button: remove unused code 2014-05-09 11:02:44 -07:00
Cosimo Cecchi
e8c906966e widget: deprecate focus-line-pattern style property
Nothing in GTK uses it.
2014-05-09 11:02:44 -07:00
Cosimo Cecchi
a2decd1f2f widget: deprecate focus-padding style property
There's no use left inside GTK.
2014-05-09 11:02:44 -07:00
Cosimo Cecchi
5cb43c70f7 calendar: simplify code
Always use the newly introduced get_component_paddings() instead of
doing the work manually every time.
2014-05-09 11:02:44 -07:00
Cosimo Cecchi
1e66a7ccdb calendar: use CSS paddings instead of focus pad for day/week areas
focus-padding is going away.
2014-05-09 11:02:44 -07:00
Cosimo Cecchi
83b4e67307 range: remove unused code 2014-05-09 11:02:44 -07:00
Cosimo Cecchi
c62d6fea70 colorscale: don't use focus padding 2014-05-09 11:02:44 -07:00
Cosimo Cecchi
365ab7f73b range: don't use focus padding 2014-05-09 11:02:43 -07:00
Cosimo Cecchi
d0b8ef3a6f scale: remove unused code 2014-05-09 11:02:43 -07:00
Cosimo Cecchi
24a422631d expander: don't use focus padding 2014-05-09 11:02:43 -07:00
Cosimo Cecchi
d2f77984dc expander: add support for CSS padding and borders
We need to do this since we're about to remove focus-pad.
2014-05-09 11:02:43 -07:00
Cosimo Cecchi
9a811e2c94 notebook: don't use focus padding 2014-05-09 11:02:43 -07:00
Cosimo Cecchi
80981f5c95 modelbutton: don't use focus padding 2014-05-09 11:02:43 -07:00
Cosimo Cecchi
053b21cc1f flowbox: don't use focus padding 2014-05-09 11:02:43 -07:00
Cosimo Cecchi
241b4c0c75 listbox: don't use focus padding 2014-05-09 11:02:43 -07:00
Cosimo Cecchi
ceab6ee15d switch: don't use focus padding 2014-05-09 11:02:42 -07:00
Cosimo Cecchi
52e40a1725 treeview: don't use focus padding 2014-05-09 11:02:42 -07:00
Cosimo Cecchi
c20e8b0b49 checkbutton: support CSS paddings and borders
We need this since we just removed focus-padding.
2014-05-09 11:02:42 -07:00
Cosimo Cecchi
99f0776f19 checkbutton: don't use focus padding 2014-05-09 11:02:42 -07:00
Cosimo Cecchi
8b068e996f button: don't read focus padding property
We're going to deprecate it.
2014-05-09 11:02:42 -07:00
Cosimo Cecchi
b03c22e0c9 widget: deprecate interior-focus style property
Nothing uses it anymore inside GTK.
2014-05-09 11:02:42 -07:00
Cosimo Cecchi
521475da4d win32: don't set interior-focus in the theme 2014-05-09 11:02:42 -07:00
Cosimo Cecchi
a3cbcc6451 textview: always use interior focus 2014-05-09 11:02:42 -07:00
Cosimo Cecchi
5a16ec366d spinbutton: remove unused code 2014-05-09 11:02:41 -07:00
Cosimo Cecchi
0c6cc487d6 radiobutton: always use interior focus 2014-05-09 11:02:41 -07:00
Cosimo Cecchi
b77a8bcb95 expander: always use interior focus 2014-05-09 11:02:41 -07:00
Cosimo Cecchi
21e32f1989 checkbutton: always use interior focus 2014-05-09 11:02:41 -07:00
Cosimo Cecchi
779707fabb entry: always use interior focus 2014-05-09 11:02:41 -07:00
Cosimo Cecchi
4c06925ec2 button: always use interior focus
We're going to deprecate the property, and this is what everyone has
been using.
2014-05-09 11:02:41 -07:00
Matthias Clasen
f4d02bd9c1 GtkCellArea: allow finding attributes at runtime
This will allow e.g. GtkInspector to display attribute mappings.

http://bugzilla.gnome.org/show_bug.cgi?id=729817
2014-05-08 14:09:04 -04:00
Matthias Clasen
c813765430 GtkListBox: improve the docs
The documentation was not really clear about ::row-selected
not working for multi-selection.
2014-05-08 07:33:01 -04:00
William Jon McCann
74405cc964 Update the design for progress bars
We now use a narrower trough and paint the optional text
beside the trough instead of inside it. This makes for a much
cleaner appearance and more readable text.
2014-05-07 09:56:35 -04:00
Matthias Clasen
644f08a771 Remove debug spew 2014-05-07 06:51:51 -04:00
Benjamin Otte
352e28a138 viewport: Don't subtract borders and padding from -1
-1 is a special value for "undefined" and needs to stay that way

https://bugzilla.gnome.org/show_bug.cgi?id=729607
2014-05-06 04:02:40 +02:00
Marcus Karlsson
c39b6be22b docs: Fix name of GtkFileChooser's Create Folder button
The documentation for GtkFileChooser references the button which allows
the user to create new folders as the New Folder button, although the
label actually says Create Folder.

Update the documentation to say Create Folder instead of New Folder.

https://bugzilla.gnome.org/show_bug.cgi?id=729475
2014-05-05 20:54:47 -04:00
Marcus Karlsson
7850fb62ea docs: fix typos in gtk_file_chooser_set_local_only
Change "file are files" to "file or files." Also remove an excessive
"file" in "file system."

https://bugzilla.gnome.org/show_bug.cgi?id=729473
2014-05-05 20:47:04 -04:00
Matthias Clasen
22ab2ca2a5 a11y: Avoid a warning
The listbox row accessible code was giving warnings when
parent is NULL, at destruction time.
2014-05-05 19:46:04 -04:00
Juan Pablo Ugarte
b9f91bcd8c GtkColorButton: Fix recursion loop in "use-alpha" set_property() 2014-05-05 15:31:50 -03:00
Benjamin Otte
748b2bf5ae a11y: Disable deprecation warnings in AtkMisc implementation 2014-05-05 16:10:16 +02:00
Benjamin Otte
a89c598617 combobox: Add workaround so evolution doesn't crash
Removing the NULL checks in 7f60cab47d
caused evolution to crash. It chains up with NULL and that used to work.

This patch should be reverted for GTK 4.0.

https://bugzilla.gnome.org/show_bug.cgi?id=729496
2014-05-05 15:53:03 +02:00
Benjamin Otte
18a594c392 applicationwindow: Properly unmap the menubar widget 2014-05-05 15:48:02 +02:00
Benjamin Otte
65c4c1555d css: Fix printing code for CSS strings and idents
It used to infloop on special characters.
2014-05-05 15:48:02 +02:00
Benjamin Otte
b356d81410 css: Split out a common function
It's used in two places already, and Iwant to use it in a third one.
2014-05-05 15:48:02 +02:00
Matthias Clasen
d495ab1ca0 Small documentation update
Don't show an example that doesn't work anymore.
2014-05-05 09:41:06 -04:00
Matthias Clasen
7e8703918b Small documentation fixes
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=729461
2014-05-05 07:25:27 -04:00
Matthias Clasen
3e80ce39e1 GtkApplication: Clarify docs a bit
Explicitly mention how gtk_application_set_accels_for_action can
be used to remove all accelerators for an action.

https://bugzilla.gnome.org/show_bug.cgi?id=729451
2014-05-05 07:25:27 -04:00
Paolo Borelli
abf10a74b7 listbox: check gsequence end iter in get_row_at_index 2014-05-04 19:45:28 +02:00
Matthias Clasen
d1d2763d00 GtkHeaderBar: Allow overdrawing
The draw function of GtkHeaderBar was returning TRUE, causing
after-signal handlers to not run. This breaks e.g. drawing of
dnd hightlights. Fix that.
2014-05-03 13:16:46 -04:00
Matthias Clasen
a41e2b901d Fix a thinko in the last color button change
Using the interface method in the set_property implementation
leads to an infinite recursion, if the interface method is in
turn using g_object_set.
2014-05-02 21:09:05 -04:00
Matthias Clasen
47094a2a8a GtkDialog: Reduce a g_warning to a g_message
Otherwise, this breaks our testsuite.
2014-05-02 20:47:56 -04:00
Matthias Clasen
9d7f7ddadf GtkSpinButton: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:47:16 -04:00
Matthias Clasen
fc7e7495a6 GtkScaleButton: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:47:00 -04:00
Matthias Clasen
516cd70780 GtkRange: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:45 -04:00
Matthias Clasen
1d50657740 GtkProgressBar: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:30 -04:00
Matthias Clasen
98affc6829 GtkPaned: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:17 -04:00
Matthias Clasen
987cce9e65 GtkLevelBar: Implement new AtkValue interface
The AtkValue interface has been replaced in ATK 2.12.
Implement the new one in addition to the old one.
2014-05-02 20:46:03 -04:00
Matthias Clasen
456dffcbfd GtkWidget: Mark deprecated properties as such
The ::style, ::margin-left and ::margin-right properties are all
deprecated.
2014-05-02 19:25:27 -04:00
Matthias Clasen
4cdc32974a queryimmodules: Localize suppressed deprecation
Drop the blanket GDK_DISABLE_DEPRECATION_WARNINGS and avoid
deprecated API as much as possible.
2014-05-02 18:48:36 -04:00
Matthias Clasen
67b10e649e GtkColorButton: Reduce internal use of deprecated API
Drop the blanket GDK_DISABLE_DEPRECATION_WARNINGS and avoid
deprecated API as much as possible.
2014-05-02 18:42:18 -04:00
Matthias Clasen
69234cfecc GtkColorButton: Update deprecation warnings
It is not great to have deprecation warnings point to another
deprecated function. Update them to point to the eventual
replacement.
2014-05-02 18:41:29 -04:00
Matthias Clasen
c4ec89cf9d GtkDialog: Warn about lack of transient parents
We want make it mandatory for dialogs to have transient parents,
eventually. This is a first step in that direction.
2014-05-02 18:23:58 -04:00
Matthias Clasen
3957ce4898 GtkStack: Avoid compiler warnings
gcc warns about unhandled enum values in these switch statements,
so add an empty default: case to placate the compiler.
2014-05-02 17:15:49 -04:00
Philip Chimento
5b5813fcdc stack: Add counterparts of OVER_UP_DOWN transition
The GtkStackTransitionType enum now has OVER_DOWN_UP, OVER_LEFT_RIGHT,
and OVER_RIGHT_LEFT values to complement OVER_UP_DOWN.

https://bugzilla.gnome.org/show_bug.cgi?id=726676
2014-05-02 16:54:41 -04:00
Philip Chimento
a27b0bad86 stack: More readability when adding transitions
This small refactor makes the code more readable when adding more
transition types that have left, right, up, and down variations.

It adds inline boolean functions to tell information about transition
types (avoiding long if clauses) and changes long chains of "else if
(transition_type == ...)" into switch statements. Both are only likely
to get longer as more transition types are added.

https://bugzilla.gnome.org/show_bug.cgi?id=726676
2014-05-02 16:54:41 -04:00
Cosimo Cecchi
c05525127b overlay: don't have a custom draw implementation
We can't think with Benjamin of a reason this should be needed, so let's
just remove it.
2014-05-02 20:42:54 +02:00
Cosimo Cecchi
a303547489 themingengine: only round outline corners after shrinking
Ensures the correctness of the applied radius.
2014-05-02 20:42:54 +02:00
Juan Pablo Ugarte
b059098c71 GtkBuilder: added template parent type check. 2014-05-02 14:38:05 -03:00
Juan Pablo Ugarte
35df3bc182 GtkFlowBox: fixed NULL dereferencing segfaults 2014-05-01 20:31:59 -03:00
Juan Pablo Ugarte
a05b55872b GtkMenu: fixed more NULL dereferencing segfault 2014-05-01 20:31:31 -03:00
Juan Pablo Ugarte
018c394c52 GtkGrid: gtk_grid_get_size_for_size() do not dereference a NULL pointer. 2014-05-01 19:54:43 -03:00
Juan Pablo Ugarte
49fa04212b GtkBuilder: improved parsing error report for invalid properties and signals.
Added GTK_BUILDER_ERROR_INVALID_PROPERTY and GTK_BUILDER_ERROR_INVALID_SIGNAL
error codes

ObjectInfo: Use a GType instead of a char * for the class name.
PropertyInfo: Use a GParamSpec instead of a char * for the property name.
SignalInfo: Use signal id and detail quark instead of a detailed signal name string.

This not only save us a few malloc in each case but lets us simplify the code
and report unknown properties and signals as a parsing error instead of just
printing a warning.
2014-05-01 17:59:53 -03:00
Juan Pablo Ugarte
c4afca906c GtkBuilder: fixed a few minor memory leaks.
Fixed memory leaks in parse_object(), parse_template() and parse_signal() functions.
Parameters value where strduped before the last posible return and not freed.
2014-05-01 17:59:53 -03:00
Руслан Ижбулатов
0dd810ee22 W32: override selected button style to remove colored background
https://bugzilla.gnome.org/show_bug.cgi?id=729353
2014-05-01 18:20:20 +00:00
Руслан Ижбулатов
b83880b981 W32: Add a theme for .app-notification
This is copied from Adwaita. Looks sufficiently ok.

https://bugzilla.gnome.org/show_bug.cgi?id=729346
2014-05-01 17:54:46 +00:00
Cosimo Cecchi
24fd96d837 listbox: fix a segfault
Don't dereference a NULL pointer.
2014-05-01 19:48:41 +02:00
Cosimo Cecchi
7f60cab47d combobox: fix a segfault
Don't dereference a NULL pointer.
2014-05-01 19:44:12 +02:00
Cosimo Cecchi
489970bcdc themingengine: use outlines to render focus rings
Instead of the old non-CSS implementation. This allows us to get rid of
the very last piece of custom theming in Adwaita.
2014-05-01 18:14:49 +02:00
Cosimo Cecchi
e8cbbedbb2 css: add properties for outline-radius
Both a shorthand and individual properties. This is not officially part
of the CSS standard, but there's precedence for it at least in Mozilla:
https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius
2014-05-01 18:14:49 +02:00
Cosimo Cecchi
a60ba815d9 treeview: respect focus-padding when rendering focus
Adwaita had a hack to work this around, but now that we're moving focus
ring rendering into GTK, we can just fix the treeview instead.
2014-05-01 18:14:49 +02:00
Benjamin Otte
b4282e5ef1 treeview: Always call size request funcs with valid out pointers
Not doing so causes crashes since
a158a2aa48c8023f99963642cc2657bff207b82NULLd
2014-05-01 15:16:17 +02:00
Benjamin Otte
c0f556ab71 revealer: 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
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
Руслан Ижбулатов
5432c37d5a W32: Update the css to match the .modelbutton->.button.menuitem transition 2014-04-28 15:51:51 +00:00
Matthias Clasen
baaf201f2a Rename the modelbutton style class
This is not a great name to use in themes; instead, add the
menuitem class, so themes can use .button.menuitem for styles
that are specific to menuitem-like buttons.
2014-04-27 18:49:27 -04:00
Matthias Clasen
987b56973c GtkModelButton: improve size allocation
Only reserve size for an indicator if at least one sibling
actually has an indicator.
2014-04-26 17:48:57 -04:00
Matthias Clasen
a5d2778737 Actually set the default for GtkMenuButton::use-popover
The previous commit changed the property declaration, but
omitted the actual change of the default.
2014-04-26 14:40:52 -04:00
Matthias Clasen
b6e724e76f Add Adwaita to the list of default icon themes
Hardcode the fallback to Adwaita. I'm leaving gnome in here for
now, since we're in the middle of the transition. It will be
removed before 3.14.
2014-04-26 10:14:38 -04:00
Juan Pablo Ugarte
f2d488dea1 Fixed crash in GtkLockButton if a button with permission set to NULL is clicked.
https://bugzilla.gnome.org/show_bug.cgi?id=728992
2014-04-25 22:13:56 -04:00
Matthias Clasen
063bd57873 GtkWindow: Avoid a critical in F10 handling
The focus widget might be NULL, and we were forgetting to take
that possibility into account in one place.
2014-04-25 22:12:05 -04:00
Matthias Clasen
66b6078ae2 GtkDialog: Update suggested-action more carefully
We were not really handling all cases correctly here. We want
the suggested-action style class to only be set on headerbar
buttons, and it should be set on the default widget. Ensure
this by syncing the suggested-action style class with the
default style class. As a side-effect, setting has-default
on an action widget in ui files will now have the expected
effect.

https://bugzilla.gnome.org/show_bug.cgi?id=728846
2014-04-25 22:11:53 -04:00
Matthias Clasen
90559a3fc5 GtkDialog: Support adding action widgets in ui files
GtkDialog has convenience API for adding action widgets that are
either placed in the action area or the headerbar. This commit
makes the same functionality available from GtkBuilder ui files
by specifying "action" as the child type.

https://bugzilla.gnome.org/show_bug.cgi?id=728846
2014-04-25 22:11:38 -04:00
Antoine Jacoutot
8935d2f123 openbsd: properly set len for gtkmountoperation-x11
sysctl(3) is the correct way to get the lenght for len in this case.
Also drop unused headers and change style to match the rest of the file.
2014-04-25 14:37:59 +02:00
Matthias Clasen
fab2173b31 GtkMenuButton: use popovers by default
When constructing from a menu model, use popovers by default.
This change has the potential to cause some size problems for
applications with big gear menus, so we're doing it early in
the cycle to uncover and fix those.
2014-04-24 23:35:18 -04:00
Руслан Ижбулатов
37aa840e89 W32: Add modelbutton styles
According to what i've been told, modelbuttons are supposed to look
flat, like menu items.

This is basically an improved copy of the menuitem styles.

https://bugzilla.gnome.org/show_bug.cgi?id=728810
2014-04-24 03:35:50 +00:00
Руслан Ижбулатов
1bcd7c40bd W32: Add a set of "focused" styles to checkmarks
This prevents checkmarks in modelbuttons from being styled as buttons
(apparently, modelbuttons apply "focused" to their children, unlike
normal buttons).

https://bugzilla.gnome.org/show_bug.cgi?id=728808
2014-04-24 03:35:50 +00:00