Commit Graph

19845 Commits

Author SHA1 Message Date
Jasper St. Pierre
ad0c4c3e83 window: Fix configure request debug code in move_resize
Make it compile in GTK+3 and switch pos_changed / size_changed
to be the right way around.
2014-02-20 13:55:23 -05:00
Carlos Garnacho
eb0f86d485 popover: Always apply the window shape
In practice this shape is only used to outline the popover when it is
above native windows, in the most normal full-csw case the shape won't apply
visibly, so popovers will still be able to cast a shadow there.

If there are native windows below the popover, the shape will exclude the
shadow, so there are no alpha contents above the window. One worst case that
might happen is that the popover lays above patches of native/client-side
windows, so the shadow could come and go around the border. But first let's
see whether that happens often or visibly enough before adding something more
convoluted.
2014-02-20 16:36:34 +01:00
Matthias Clasen
8ea40e4956 Trivial annotation syntax fix 2014-02-20 10:18:45 -05:00
William Jon McCann
bc41268368 print-dialog: remove shadow in from some of the tabs 2014-02-20 09:19:31 -05:00
Benjamin Otte
b9e37f8d2d revealer: Allocate extra size to child
Do not constrain the child widget to its preferred size when the
revealer is larger.

https://bugzilla.gnome.org/show_bug.cgi?id=724742
2014-02-20 02:10:07 +01:00
Benjamin Otte
1d422deb0f stackswitcher: Don't do unneeded update
The update of the needs-attention state is done via its own property,
so it doesn't need to be done via visibility changes.

This patch is largely the result of inspecting the code due to a warning
and not a result of testing. So if issues pop up that bisect back to
this patch, that's why.
2014-02-20 02:10:07 +01:00
Benjamin Otte
f2d4b07f4b stylecascade: Remove function
Inline it.
2014-02-20 02:10:07 +01:00
Benjamin Otte
6de50aa7d9 settings: Store style cascade in settings object
This ensures that the initialization for the CSS theme happens when the
style cascade gets queried.

https://bugzilla.redhat.com/show_bug.cgi?id=1064922
https://bugzilla.mozilla.org/show_bug.cgi?id=972382
2014-02-20 02:10:07 +01:00
Matthias Clasen
2a8446bdec Add docs 2014-02-19 19:39:06 -05:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
215c55f2b9 GtkActionBar: Implement destroy
Similar to map/unmap, this needs to follow the actual
widget tree. Without this, several test cases in
the templates test fail.
2014-02-19 01:34:19 -05:00
Matthias Clasen
bdaddaabad Drop unimplemented functions
These were added to the header by mistake in a recent commit.
They have no implementation, so dropping them won't cause
any harm.
2014-02-19 01:03:37 -05:00
Matthias Clasen
c5874b1034 Document gtk_header_bar_get_has_subtitle 2014-02-19 01:03:37 -05:00
Matthias Clasen
e79842d64c Document gtk_widget_get_scale_factor 2014-02-19 01:03:36 -05:00
Matthias Clasen
7fbf6a67a2 Fix a small memory leak
GtkPrintUnixDialog was leaking a GFile.
Spotted by Christian Persch in
https://bugzilla.gnome.org/show_bug.cgi?id=724631
2014-02-19 00:31:40 -05:00
Carlos Garnacho
63bb834b2e popover: Accept NULL relative_to widgets
And document the fact that the popover will get destroyed if
a NULL relative-to is given on a parented popover, if no extra
references are kept.

For gtk_popover_new*(), a NULL relative-to will leave the widget
as a floating object, to be sunk by a later call to
gtk_widget_set_relative_to().

https://bugzilla.gnome.org/show_bug.cgi?id=724407
2014-02-19 00:25:34 -05:00
Paolo Borelli
2f379604d1 Do not call popover_set_relative with NULL
This gives a critical warning since that function expects a
valid widget.

https://bugzilla.gnome.org/show_bug.cgi?id=724407
2014-02-19 00:25:34 -05:00
Matthias Clasen
479babf339 GtkTextHandle: Deal with parent_scrollable going away
Use a weak reference to notice when parent_scrollable is
going away.

https://bugzilla.gnome.org/show_bug.cgi?id=724392
2014-02-19 00:24:30 -05:00
Matthias Clasen
e679812be0 GtkBox: Fix an off-by-one error with center allocation
This error was causing children to not get allocated when
the center widget is the first one in the list of the box's
children.
2014-02-18 22:55:45 -05:00
Matthias Clasen
bb4f8d8ce1 Make gtk_box_set_center_widget take NULL
It makes sense to allow this, and gtk_action_bar_set_center_widget
already assumes that it can pass NULL to this function.
2014-02-18 22:50:37 -05:00
Matthias Clasen
5eaebde394 Add map/unmap to GtkActionBar
The recursion in map needs to follow the actual physical
widget tree, otherwise we violate invariants. The generic
container map implementation uses gtk_container_forall to
operate on the children, and thus is not suitable for
containers where the children are inside some internal
container.
2014-02-18 22:50:37 -05:00
Matthias Clasen
3f0e28133d Fix up gtk_action_bar_forall
We need to always iterate over non-internal children.
2014-02-18 22:50:37 -05:00
Matthias Clasen
53f6b8582a Revert "action bar: remove the forall implementation"
This reverts commit 0ff0fdfefb.
2014-02-18 22:50:37 -05:00
Paolo Borelli
d3c2819401 Add a GtkFrame inside GtkActionBar
This is needed to set a padding and draw a border since GtkBox does
not honour css padding yet.

https://bugzilla.gnome.org/show_bug.cgi?id=724693
2014-02-18 22:50:36 -05:00
Ignacio Casal Quinteiro
0b4cb125e7 Remove duplicated word "id" from warning message 2014-02-18 11:42:45 +01:00
Matthias Clasen
d308f39268 Make GtkSeparatorToolItem work for window-dragging again
This broke recently when the window dragging code was changed
to require motion events to be propagated as well.

https://bugzilla.gnome.org/show_bug.cgi?id=724539
2014-02-17 23:55:53 -05:00
Matthias Clasen
62254456f7 GtkLabel: don't eat too many button release events
We should only eat button release events when the label is
actually selectable, since the comment indicates that we
want to eat the release events belonging to press events
that triggered a selection. This fixes problems with actions
on parent widgets that are triggered by button release,
as seen in this bug:

https://bugzilla.gnome.org/show_bug.cgi?id=724541
2014-02-17 23:09:44 -05:00
Matthias Clasen
885026851f Another trivial doc rewording 2014-02-17 22:38:24 -05:00
Matthias Clasen
99bc982bd8 Trivial typo fix 2014-02-17 22:38:24 -05:00
Matthias Clasen
67a00991b7 tree view: clean up custom search entry on destroy
Suprisingly, this bug has been there for a very long time.
I'm fixing it now because we now use a custom search entry
in the app chooser dialog, and this is causing the templates
cleanup test to fail.
2014-02-17 21:41:11 -05:00
Matthias Clasen
2392b1e534 Make print dialog destruction work
This was also causing the templates test to fail.
2014-02-17 21:40:36 -05:00
Matthias Clasen
0ff0fdfefb action bar: remove the forall implementation
With nested internal children, this interferes with proper
cleanup, and makes the templates test fail.
2014-02-17 21:39:44 -05:00
Paolo Borelli
ad9019c2c9 gtkbox: fix positioning of center widget 2014-02-17 23:23:04 +01:00
Matthias Clasen
e734b79fd8 Fix return_if_fail lines in gtk_box_pack
Since the function now returns a value, these checks
need to be updated.
2014-02-17 11:55:56 -05:00
Paolo Borelli
b63ecf8b1a Add builder support for GtkBox center widget 2014-02-17 14:05:36 +01:00
Matthias Clasen
11834ebf5c app chooser: Reword a label
'Find New Applications' is shorter and less cryptic than 'Find
Applications in Software'.
2014-02-17 06:56:00 -05:00
Matthias Clasen
72e2094472 Drop with_separators from gtk_popover_bind_model
The with_separators argument does not really make sense
for popovers, it was just copied from the menu implementation.
Drop it now, before it becomes part of the public API.
2014-02-17 06:52:38 -05:00
Juan R. García Blanco
f3c9f86d14 popover: Make gtk_popover_bind_model() public
This is needed for the C++ bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=724503
2014-02-17 06:52:23 -05:00
Matthias Clasen
8bfa5e4611 Drop GtkCenterBox
Its functionality has been subsumed in GtkBox.
2014-02-16 23:05:21 -05:00
Matthias Clasen
ef565e2713 action bar: Use a regular box instead of GtkCenterBox
GtkBox now supports a centered child, so GtkCenterBox is
no longer needed here.
2014-02-16 23:02:54 -05:00
Matthias Clasen
06716a6c79 Add center widget support to GtkBox
This makes GtkCenterBox unnecessary, and at the same time
adds more features: the center widget can be expanded, and
baseline alignment is supported.
2014-02-16 22:57:24 -05:00
Matthias Clasen
8bd94a9515 Fix a problem with window dragging
Dragging windows was not working on widgets in the titlebar
region unless they had the window-dragging style property
set. Fix this by looking at the region for motion notify
events as well as for buton press events.
2014-02-15 20:41:58 -05:00
Matthias Clasen
3c981d23dc Don't show an empty license tab
It is not useful to show a license tab, if there's no license
to read.  This was pointed out as a possibility in
https://bugzilla.gnome.org/show_bug.cgi?id=724411
2014-02-15 18:07:09 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
Matthias Clasen
e179c65da0 header bar: squeeze the title in
Let the center widget extend into the border area, to avoid
resizing header bars needlessly. This improves the uniformity
of header bars across applications, some of which don't use
subtitles, or use custom title widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=706515
https://bugzilla.gnome.org/show_bug.cgi?id=707999
2014-02-14 15:39:08 -05:00
Matthias Clasen
4a208439e6 Raleigh: fix a typo
titlebar is a style class, so it needs a .
2014-02-14 15:33:47 -05:00
Matthias Clasen
c1def9c224 Forgotten file 2014-02-14 15:33:26 -05:00
Matthias Clasen
9678c92112 Fix a typo
Thanks to Thomas A. Stillings for spotting it.
2014-02-14 11:56:48 -05:00
Matthias Clasen
f55d210c12 app chooser: sync sensitivity of search button
The code setting up the button has been move a little later
in the dialog construction, with the effect that the entry
is already insensitive when we set up the binding.
2014-02-14 09:39:49 -05:00
Matthias Clasen
f217af54ca app chooser: Add a search bar
This replaces the treeview typeahead popup with a GtkSearchBar,
and adds a search button to the header bar (if we have one).

https://bugzilla.gnome.org/show_bug.cgi?id=724218
2014-02-14 07:05:13 -05:00
Matthias Clasen
e30f5dd00d color chooser: Make nonresizable by default
The color chooser does not contain any scrollable content,
therefore it should not be resizable.
2014-02-14 07:05:13 -05:00
William Jon McCann
9a5f7c7978 Use an action bar for the conficts ui in the print dialog 2014-02-13 20:59:26 -05:00
William Jon McCann
283804c0bf Set a default spacing on action bars 2014-02-13 20:59:25 -05:00
William Jon McCann
a121da3bb1 Set no border on notebook in print dialog 2014-02-13 20:59:25 -05:00
William Jon McCann
afa9339e71 volume-button: use symbolic icons by default 2014-02-13 20:47:24 -05:00
Matthias Clasen
352ea3a48d message-dialog: deprecate the image field
We had already set the image to be hidden in the .ui file.
This patch removes the image altogether, and deprecates the
property, setter and getter.

If an image is explicitly put with the setter, it is still
shown, so to not break existing users of this API.

Based on a patch by Jon McCann.
2014-02-13 20:41:29 -05:00
Matthias Clasen
6578c9d876 Modernize the app chooser dialog
This is according to suggestions in
https://bugzilla.gnome.org/show_bug.cgi?id=724218
2014-02-13 00:14:42 -05:00
Matthias Clasen
2671fa98f8 Revert "gtkicontheme: Don't query CONTENT_TYPE to determine if something is an SVG"
This reverts commit f929a61399.

It caused blurry icons in gnome-shell, and we haven't been able
to track down why yet.
2014-02-12 22:36:59 -05:00
William Jon McCann
a9ecde45ec docs: don't show bloatpad images in the docs
They are too large and out of date.
2014-02-12 19:28:51 -05:00
William Jon McCann
37a8ee6e95 docs: fully break lines in examples
Try to do a better job of keeping example content
from being too wide. It is often rendered as <pre>
text so the only time we can wrap it is in the source.

It is best to full break lines at all punctuation and
to try to keep the width under 70 chars or so.
2014-02-12 18:42:50 -05:00
William Jon McCann
d0a654e4b9 Add new ActionBar
https://bugzilla.gnome.org/show_bug.cgi?id=723929
2014-02-12 08:08:03 -05:00
William Jon McCann
c86ee0558c Rename GtkActionBar to GtkCenterBox
https://bugzilla.gnome.org/show_bug.cgi?id=723929
2014-02-12 08:08:03 -05:00
Matthias Clasen
9e002a024e GtkEntry: Fix a few irregularities in the size request code
We don't want the size request to change as icons come and
go (thinking e.g. about the caps lock warning). Just make
sure that we have enough room for showing the icons.
2014-02-11 22:00:12 -05:00
Matthias Clasen
cf4a41a856 Add GtkEntry:max-width-chars
This property allows specifying a natural width of
the entry that is bigger than the minimum width.

https://bugzilla.gnome.org/show_bug.cgi?id=724094
2014-02-11 17:54:25 -05:00
Matthias Clasen
3459a0a273 Revert "Introduce API to get the preferred visual"
This reverts commit 2b95d1a34e.

Conflicts:
	gdk/gdkscreen.c
2014-02-10 22:15:28 -05:00
Matthias Clasen
d326507978 Revert "Use gdk_screen_get_preferred_visual()"
This reverts commit 30fa1426cf.

See the bugs
https://bugzilla.gnome.org/show_bug.cgi?id=724067
https://bugzilla.gnome.org/show_bug.cgi?id=723740
for the issues that are the reason for this revert.
2014-02-10 22:12:53 -05:00
Matthias Clasen
fefd3bf6cc menu button: Don't set use_popover to TRUE by default
This was changed by accident. The default value is supposed
to be FALSE, for now.
2014-02-10 09:10:22 -05:00
Murray Cumming
a76bb2c177 docs: Fix tiny typo. 2014-02-10 12:44:52 +01:00
Alejandro Piñeiro
79ed2b790a a11y: remove implementation for component->get_size
Recently get_size was removed because it was redundant, as
you can get the same information from get_extents.

https://bugzilla.gnome.org/show_bug.cgi?id=723863
2014-02-09 23:11:53 -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
Matthias Clasen
444d04a360 More coding style cleanups 2014-02-09 01:22:07 -05:00
Matthias Clasen
eb0eaffd24 Trivial coding style cleanups 2014-02-09 00:48:38 -05:00
Matthias Clasen
add7a83452 Trivial formatting fix 2014-02-08 22:18:15 -05:00
Matthias Clasen
d1ba50aa96 Quell a compiler warning 2014-02-08 22:17:28 -05:00
Matthias Clasen
14ba1280ce Improve popover positioning
Improve the algorithm to determing popover placement:
If it fits in the preferred direction or its opposite,
do that, otherwise use the direction that causes the least
of the popover to be cut off.
2014-02-08 22:14:51 -05:00
Matthias Clasen
9822d510a6 GtkMenuButton: Support popovers
Add api to allow explicitly setting a GtkPopover instead of
a GtkMenu as the popup of a GtkMenuButton. Also, add api to
instruct the menu button to construct a popover when given
a menu model.

We set the style class "menu-button" on the button only when
it pops up a menu, to allow different treatment for the active
state of the button in the two cases.

https://bugzilla.gnome.org/show_bug.cgi?id=723878
2014-02-08 20:42:20 -05:00
Juan R. García Blanco
552c29b488 GtkPopover: use GdkRectangle instead of cairo_rectangle_int_t
cairo_rectangle_int_t replaced by GdkRectangle whenever it is used.
Also, rect parameter in public method gtk_popover_set_pointing_to
made const.

Bug #723394
2014-02-08 21:53:07 +01:00
Matthias Clasen
e2a2d5012e GtkDialog: Make headerbar buttons homogeneous
The buttons in headerbars should be all the same width. Since
GtkHeaderBar doesn't have a homogeneous mode, use a size group
to achieve this.

https://bugzilla.gnome.org/show_bug.cgi?id=723672
2014-02-07 22:36:24 -05:00
Juan R. García Blanco
dbf1521ad4 GtkFlowBox::child-activated: fix param type in g_signal_connect
Replace GTK_TYPE_WIDGET with more specific GTK_TYPE_FLOW_BOX_CHILD
for GtkFlowBox::child-activated. This matches signature of
child_activated slot in class struct.

https://bugzilla.gnome.org/show_bug.cgi?id=723716
2014-02-07 21:39:49 -05:00
William Jon McCann
eb14b00187 docs: fix typo 2014-02-07 21:34:27 -05:00
William Jon McCann
01b2440370 docs: rewrite the CSS Properties docs 2014-02-07 20:53:00 -05:00
William Jon McCann
7067b3c326 docs: don't use a table for the region docs 2014-02-07 20:53:00 -05:00
William Jon McCann
f5e540d71a docs: improve the cssprovider documentation layout 2014-02-07 20:53:00 -05:00
Matthias Clasen
c823498b4c Fix margin-start/end property implementation
The properties are declared read-write, but only the setter
was hooked up. This was leading to criticals in test apps using
the prop-editor.c code. Complete the implementation by adding the
getter side too.
2014-02-07 20:27:30 -05:00
William Jon McCann
326da2da58 docs: don't use <anchor> 2014-02-07 15:40:52 -05:00
Matthias Clasen
2fea2d4dbd Populate popovers from menu models
This adds a new function, gtk_popover_new_from_model, which creates
a popover and populates it with suitable content according to the
menu model. The current implementation uses GtkModelButton for the
individual items, and a GtkStack for submenus.

https://bugzilla.gnome.org/show_bug.cgi?id=723014
2014-02-07 15:11:51 -05:00
Matthias Clasen
bf9ce3ad25 Introduce GtkModelButton
Similar in spirit to GtkModelMenuItem, this private GtkButton subclass
can connect to a GtkMenuTrackerItem and present itself as either a
regular button, a check button, or a radio button. Activation and
state tracking is done through the GAction that is associated with
the menu tracker item.

https://bugzilla.gnome.org/show_bug.cgi?id=723014
2014-02-07 15:11:50 -05:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
William Jon McCann
4dee965116 docs: use apostrophe in *'m 2014-02-07 13:42:09 -05:00
William Jon McCann
cb6483d382 docs: use apostrophe in *'d 2014-02-07 13:39:53 -05:00
William Jon McCann
fa3f1e1488 docs: use apostrophe in *'ve 2014-02-07 13:38:26 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -05:00
William Jon McCann
285d216d3e docs: use apostrophe in *'ll 2014-02-07 13:35:54 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
f0000b2f3d docs: use more apostrophes 2014-02-07 13:26:12 -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
f116f0071e docs: use links instead of <xref> 2014-02-07 11:13:11 -05:00
Carlos Garnacho
98a67d9697 popover: propagate (insensitive|backdrop) flags from relative-to widget
Popovers aren't direct children of the widget they point to, but yet
they act as children of it, so do the same with state propagation,
so the flags that propagate across the hierarchy reach popovers too.
2014-02-07 16:47:57 +01:00
Carlos Garnacho
63bed5d040 popover: Listen on grab_notify from the relative-to widget
Anytime ::grab-notify comes across, the popover visibility and GTK+
grab ownership are checked, so the popover is hidden when it loses
the GTK+ by any reason.
2014-02-07 16:47:57 +01:00
William Jon McCann
3c4dbe6c7a Add GTK_STYLE_CLASS_DESTRUCTIVE_ACTION 2014-02-07 10:28:53 -05:00