Commit Graph

50373 Commits

Author SHA1 Message Date
Timm Bäder
b39844c70f label: Move if statement where it makes sense
In the else branch of the if statement before this one, we're assigning
*smallest = *widest anyway, so this if statement is never true. Move it
to the if block before instead, where it can apply.
2017-04-25 17:29:41 +02:00
Timm Bäder
7cf85519e7 label: Remove useless if statements
We never pass nullable pointers into get_size_for_allocation.
2017-04-25 17:29:41 +02:00
Timm Bäder
c401bb5adb label: Remove useless if statement
The if before this one already makes sure priv->wrap is TRUE.
2017-04-25 17:29:41 +02:00
Timm Bäder
088897c7bc gtkmain: Fix code example
gtk_init doesn't take parameters anymore
2017-04-25 17:29:41 +02:00
Timm Bäder
559ea08978 label: Don't use gtk_widget_set_simple_clip
The clip returned by gtk_css_gadget_allocate already includes the
box-shadow size and we manually care about the text-shadow size.
2017-04-25 17:29:41 +02:00
Timm Bäder
02ff0ab3ec frame: Compute clip directly 2017-04-25 13:05:27 +02:00
Timm Bäder
5a034f3489 listbox: Compute clips directly 2017-04-25 13:05:27 +02:00
Timm Bäder
df14af4287 gtkwidget: Queue a resize on the parent when unparenting
gtk_widget_set_parent (via gtk_widget_reposition_after) will queue a
resize on the parent widget automatically when adding a child widget, so
unparent should do the same
2017-04-25 13:05:27 +02:00
Timm Bäder
cf51e2c274 widget: Fix set_parent/unparent docs to not mention GtkContainer
They can both be used by non-container widgets these days.
2017-04-25 13:05:27 +02:00
Timm Bäder
3fe03d80a7 grid: Compute clip directly
Instead of iterating over the children again in
gtk_container_get_children_clip
2017-04-25 13:05:27 +02:00
Timm Bäder
5e602e438e container: Use gtk_container_forall less
Just iterate over the child widgets directly and produce a much nicer
stack trace when debugging.
2017-04-25 13:05:27 +02:00
Timm Bäder
18672fd616 box: Compute clips directly
Instead of using _gtk_widget_set_simple_clip *and*
gtk_container_get_children_clip
2017-04-25 13:05:27 +02:00
Timm Bäder
98b3c56a75 testsuite: Add widget ordering test case 2017-04-25 13:05:27 +02:00
Timm Bäder
c0056963d1 box: Remove center child 2017-04-25 13:05:27 +02:00
Timm Bäder
6cde47300a container: Remove include_internals parameter from forall
with include_internals=TRUE, this is the same as the (still private)
gtk_widget_forall, or just using the children/sibling accessors in a
loop.
2017-04-25 13:05:26 +02:00
Timm Bäder
2a4d1f63e7 actionbar: Add explicit center widget
The center widget in GtkBox was only introduced to use it in
GtkActionBar. However, the implementation there is much more complex
than it needs to be, so move the center widget into GtkActionBar instead
and later remove it from GtkBox.
2017-04-25 13:05:26 +02:00
Timm Bäder
88cbd79bf6 box: Remove fill child property
GtkWidget:halign and GtkWidget:valign are sufficient
2017-04-25 13:05:23 +02:00
Timm Bäder
d8140d75ab box: Remove expand child property
GtkWidget already has hexpand/vexpand properties.
2017-04-24 21:52:14 +02:00
Timm Bäder
fbfe8c37ec expander: Use widgets for title box and arrow 2017-04-24 21:52:14 +02:00
Timm Bäder
2efcbd4b0f window: Make sure the decoration node stays at the beginning
Otherwise, the gtk_widget_set_parent call might add the widget node of
the child before the decoration node.
2017-04-24 21:52:14 +02:00
Timm Bäder
395e8d6569 levelbar: Use widgets for all blocks
This replaces all internal gadgets with widgets.

Remaining problem: "block" nodes have a min-width of 32px in Adwaita,
but when allocated in continuous mode, the levelbar doesn't care and
underallocates them.
2017-04-24 21:52:14 +02:00
Timm Bäder
36e4d502c4 progressbar: Use widgets for all subgadgets
A GtkLabel for the possible text node and two GtkGizmos for the
trough/progress gadgets.
2017-04-24 21:52:14 +02:00
Timm Bäder
e1acec273e Add GtkGizmo
GtkGizmo is the easiest possible widget to implement. It does nothing
except give its creator a way to control measure/size-allocate/snapshot,
so it can be used in a variety of use cases.
2017-04-24 21:52:14 +02:00
Timm Bäder
21c6aa5a15 overlay: Ensure proper child widget order
Make sure the main widget stays below all the overlay children.
2017-04-24 21:52:13 +02:00
Timm Bäder
bc7b93ca31 treeview: insert the column button css node in the right place
Insert the css node before setting a parent widget on the column button,
so the gtk_widget_set_parent won't attempt to add the css node as child
of the parent widget css node.
2017-04-24 21:52:13 +02:00
Timm Bäder
6c808fe6a0 widget: Add gtk_widget_insert_before/after
To insert a widget into the widget tree before or after a child widget
of the soon-to-be parent.
2017-04-24 21:52:10 +02:00
Timm Bäder
72ab59a1af gdk: Add 3.92 version macros 2017-04-24 19:14:30 +02:00
Timm Bäder
88bc0aad06 listbox: Properly remove placeholders 2017-04-24 19:14:27 +02:00
Timm Bäder
abe1280594 widget-factory: Add dummy listbox placeholder
It doesn't do anything and isn't visible anyway, but it tests that
adding and removing placeholders works
2017-04-24 18:41:52 +02:00
Timm Bäder
a919f0c7f3 spinbutton: Add undershoot nodes to CSS docs 2017-04-24 16:24:32 +02:00
Timm Bäder
0acb404166 spinbutton: Remove an unused define 2017-04-24 16:24:20 +02:00
Timm Bäder
68383cfcd3 window: Expand CSS node docs 2017-04-24 16:24:12 +02:00
Timm Bäder
bd55396d39 filechooserbutton: Show/hide appropriate child 2017-04-24 15:58:01 +02:00
Timm Bäder
ccdc50e540 paned: Fix typo 2017-04-24 15:16:15 +02:00
Timm Bäder
cc00fee386 testboxcss: Fix custom CSS
remove engine: parameter and add units to values
2017-04-24 15:16:08 +02:00
Timm Bäder
d5c6692104 gtk4-sections: Add missing GtkWidget child/sibling accessors 2017-04-24 14:15:57 +02:00
Timm Bäder
911d71ae7a levelbar: Remove unused define 2017-04-24 14:15:28 +02:00
Matthias Clasen
d0f36a1793 testlist3: Handle dropping a row onto itself
Instead of spewing criticals, we should handle this
gracefully by doing nothing.
2017-04-22 21:39:48 -04:00
Carlos Soriano
72d13535b7 gtkplacesview.ui: Remove translatable from server label helper
Translating it seems pointless if we can use a non-translatable example
such as gnome.org instead of foo.example.com.

This will help to make changes in here without breaking string freeze.

https://bugzilla.gnome.org/show_bug.cgi?id=781622
2017-04-22 21:53:45 +02:00
Matthias Clasen
2fed741b40 Fix the build 2017-04-22 11:30:33 -04:00
Matthias Clasen
8644e5f34d Refine the listbox dnd example
Add a drag handle, and demonstrate broken offsets.
2017-04-22 08:08:43 -04:00
Carlos Soriano
73d13fbdac gtkplacesview: Fix unmounted open in tab/window
We were send the "open-location" signal without mounting first the
location if necessary, making the open in tab/window context menu not
work for those.

This patch makes sure we mount the location before emitting the signal.

https://bugzilla.gnome.org/show_bug.cgi?id=771269
2017-04-22 11:54:23 +02:00
Matthias Clasen
2e7db0d662 Fix a typo 2017-04-21 18:28:56 -04:00
Matthias Clasen
ff8cca77a2 Implement dnd for list box rows in an example
This shows very basic DND of list box rows.
2017-04-21 18:28:47 -04:00
John Ralls
139b669196 Replace NSScreen:userSpaceScaleFactor, deprecated since MacOS X 10.7.
userSpaceScaleFactor is not compatible with high-resolution (aka HiDPI)
displays.
2017-04-11 16:10:51 -07:00
Georges Basile Stavracas Neto
400db31ad3 placesview: fix testsuite
Because the network monitor can perfectly be NULL,
the tests were failing on that for GtkPlacesView
always tries to disconnect this handler.

Fix that by only disconnecting the handler when
the network monitor exists.

https://bugzilla.gnome.org/show_bug.cgi?id=781195
2017-04-11 16:50:33 -03:00
Georges Basile Stavracas Neto
767927aef3 places-view: monitor network
GtkPlacesView exposes local access points and network
shares transparently by using the 'network:///' URI,
which is handled by GIO.

Currently, however, it doesn't monitor the network
for new available points, such as computers that just
join the network. It may happen too that the backend
won't find all the networks before the network enumeration
finishes.

Fix that by keeping a file monitor inspecting the network
uri, and update the places list when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=781162
2017-04-10 19:36:02 -03:00
gogo
529b8f8197 Update Croatian translation 2017-04-10 21:29:53 +00:00
gogo
7176ab1e86 Update Croatian translation 2017-04-10 21:01:06 +00:00
gogo
313bb76558 Update Croatian translation
(cherry picked from commit 6e87915b05)
2017-04-10 20:43:23 +00:00