Commit Graph

164 Commits

Author SHA1 Message Date
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Timm Bäder
773c16076b widget: Remove state-flags leftovers 2016-11-02 18:40:00 +01:00
Benjamin Otte
32a5729d18 gtk: Chain up in realize()
... instead of copy/paste from gtk_widget_real_realize.
2016-11-02 07:16:08 +01:00
Timm Bäder
9992a616ef widget: Use ::measure vfunc to measure size
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Benjamin Otte
e5b67ff7d8 pathbar: Use gdk_window_new_input() 2016-10-18 00:22:35 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Timm Bäder
f45dadadd0 box: Remove 'padding' child property 2016-10-16 18:17:21 +02:00
Benjamin Otte
c6834a002f pathbar: Order button CSS nodes right
The previous code ordered them the wrong way, so the first button (from
a CSS pov) was the last visible one.
2016-03-20 05:18:04 +01:00
Matthias Clasen
8a3c25ca66 path bar: Stop mishandling slider buttons
We must call get_preferred_width/height on the slider buttons
before allocating them, otherwise the layout machinery spews
warnings.
2016-03-13 23:09:41 -04:00
Benjamin Otte
8ea697c434 pathbar: Use CSS node ordering
Instead of the custom get_path_for_child() function.
2016-01-26 15:53:56 +01:00
Matthias Clasen
e8ad47498b path bar: Don't hide arrows
Changing the visibility of child widgets in size-allocate does
not work well with out current allocation and layout machinery.
To avoid the visual fallout, just keep the arrow buttons visible
and only change their sensitivity.

https://bugzilla.gnome.org/show_bug.cgi?id=754868
2016-01-24 16:29:40 -05:00
Benjamin Otte
415030d25f dnd: Split GtkDragSourceSite into its own file 2015-11-25 20:31:27 +01:00
Florian Müllner
e364ae3ea8 Use gtk_widget_set_focus_on_click() instead of deprecated setters
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Matthias Clasen
9f6f4b2004 path bar: Don't use prerendered surfaces
The current icon handling did not update icons for widget
state changes, causing black-on-black icons in HighContrast.
Instead, use the GIcon.

https://bugzilla.gnome.org/show_bug.cgi?id=753397
2015-09-04 02:09:43 -04:00
Ignacio Casal Quinteiro
b8005f4de9 pathbar: use the same parameter as in the declaration 2015-02-19 14:46:32 +01:00
Matthias Clasen
63bc3542ce path bar: Don't segfault if we get disposed quickly
The file chooser code now calls into the path bar in init,
starting an async operation. This unveiled that the path bar
code was not safe against being disposed early, by causing
a crahsh of the objects-finalize test.
Fix this by making the callback check for CANCELLED.
2015-01-19 11:57:10 -05:00
Benjamin Otte
b5a8b7ef3b widget: Make _gtk_set_simple_clip() take an optional content clip 2014-08-21 00:54:07 +02:00
Matthias Clasen
f72bcc5c01 GtkPathBar: Don't hardcode spacing in buttons
The theme will be changed to provide padding.
2014-08-13 09:31:34 -04:00
Matthias Clasen
9ce968ffb2 GtkPathBar: Make recoloring symbolics work
We were only recreating the icons the very first time the theme
changed, and not every time as was intended.
2014-08-13 09:29:40 -04:00
Matthias Clasen
d576069cec GtkPathBar: Use symbolic icons
This fits better with the symbolic icons we use in the places
sidebar now.
2014-07-23 13:41:57 -04:00
Matthias Clasen
0d1d17107f GtkPathBar: Set style classes on buttons
Set text-button/image-button on these, just like we do for
buttons everywhere else.
2014-07-23 12:44:26 -04:00
Matthias Clasen
f7e94a7389 GtkPathBar: Add a style class
This will allow nautilus to reuse the style on its own
pathbar widget.
2014-07-17 06:48:36 -04:00
Benjamin Otte
a43b90e49f pathbar: Implement clipping
.. so the path bar's buttons can have shadows.
2014-07-15 14:36:04 +02:00
Matthias Clasen
c242437535 Drop GtkArrow use in GtkPathBar
This was just an unneeded include anyway.
2014-05-13 23:50:13 -04:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
4a11acdc8c resources: move resources into a subdirectory 2014-01-23 21:04:59 -05:00
Matthias Clasen
7c08896384 path bar: Request enough natural width to fit all buttons
Otherwise, we are at the mercy of the container giving us
more space than we request, which does not always work.
2014-01-18 17:58:44 -05:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Cosimo Cecchi
89214cad5b pathbar: fix positioning of the down slider button
So that it's always linked with the rest of the pathbar.

https://bugzilla.gnome.org/show_bug.cgi?id=706722
2013-08-31 17:25:49 -04:00
Cosimo Cecchi
c9cc58de49 pathbar: remove unused spacing private member
It's always zero.

https://bugzilla.gnome.org/show_bug.cgi?id=706722
2013-08-31 17:25:49 -04:00
Matthias Clasen
68b34b1bba GtkPathBar: Don't make current dir bold
This is closer to the nautilus path bar.

https://bugzilla.gnome.org/show_bug.cgi?id=706451
2013-08-31 17:25:49 -04:00
Cosimo Cecchi
844dade070 pathbar: add back GTK_STYLE_CLASS_LINKED
This was accidentally removed in commit
42f53ab58e

https://bugzilla.gnome.org/show_bug.cgi?id=706028
2013-08-20 02:47:07 +02:00
Matthias Clasen
cda60c3c40 Another round of template binding api changes
We rename the gtk_widget_class_bind_template_child{_internal}
macros by appending a _private to their name. Otherwise, it
would be too magic to pass the 'public' names as arguments,
but affect a member of the Private struct. At the same time,

Add two new macros with the old names,
gtk_widget_class_bind_template_child{_internal} that operate
on members of the instance struct.
2013-07-26 16:29:12 -04:00
Emmanuele Bassi
89ae3524a3 Rename the widget template API
The macros and functions are inconsistently named, and are not tied to
the "template" concept - to the point that it seems plausible to use
them without setting the template.

The new naming scheme is as follows:

  gtk_widget_class_bind_template_child_full
  gtk_widget_class_bind_template_callback_full

With the convenience macros:

  gtk_widget_class_bind_template_child
  gtk_widget_class_bind_template_child_internal
  gtk_widget_class_bind_template_callback

https://bugzilla.gnome.org/show_bug.cgi?id=700898
https://bugzilla.gnome.org/show_bug.cgi?id=700896
2013-07-26 13:52:15 -04:00
Alexander Larsson
a8e84545d1 widget: Use a real offset in gtk_widget_class_automate_child
Using an offset from the struct means you can have children in
both the public and private (via G_PRIVATE_OFFSET) parts of the
instance. It also matches the new private macros nicer.

https://bugzilla.gnome.org/show_bug.cgi?id=702563

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2013-07-26 08:41:09 -04:00
Matthias Clasen
2f1fa7cdc3 Drop some unnecessary includes
Drop includes of deprecated headers where they are
no longer needed.
2013-07-19 22:32:23 -04:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
William Jon McCann
57fc8763e9 Deprecate and ignore the timeout-initial and timeout-repeat settings 2013-07-11 17:08:15 -04: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
Alexander Larsson
eac7dce160 File chooser: Convert icons to using cairo_surface_t 2013-07-03 14:39:26 +02:00
William Jon McCann
aef9dca9d5 Deprecate GtkIconFactory, GtkIconSet, GtkIconSource
We want to use GtkIconTheme instead. It is worth noting that
the parts that remain undeprecated are GtkIconSize and gtk_icon_size_lookup.
2013-06-26 20:02:27 -04:00
William Jon McCann
e779e04bc2 Deprecate and ignore gtk-icon-sizes setting
We don't have icons rendered at arbitrary sizes and we have better
APIs that aren't restricted to GtkIconSizes.
2013-06-26 18:04:27 -04:00
Tristan Van Berkom
42f53ab58e GtkPathBar: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
c6ab515735 Deprecate gtk_widget_push_composite_child & friends
Deprecate gtk_widget_push_composite_child, gtk_widget_pop_composite_child,
gtk_widget_set_composite_name, gtk_widget_get_composite_name.

This API is just bloat and was never useful, this patch deprecates
it and removes all internal calls to the composite child APIs
2013-04-08 21:19:27 +09:00
Alexander Larsson
3d4cd4db3e Add gtk_widget_(un)register_window
This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.

We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Cosimo Cecchi
aeb5cb2caa pathbar: fix a copy/paste error from last commit
We need to update the child pointer to the current iterator when going
trough the button list.
2012-05-02 11:49:40 -04:00
Benjamin Otte
01b75f19a6 pathbar: Only invalidate styles in allocate if stuff really changed
I still don't like queueing restyles in size_allocate(), but I can't
come up with a better mechanims for the way the pathbar works today.
2012-05-02 17:04:49 +02:00
Benjamin Otte
33f111a47c widget: Don't cache widget paths all the time
Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
  function caching the path.
2012-04-17 08:59:21 +02:00
Benjamin Otte
ece9d2fd92 gtk: Make widget only invalidate widget positions
Instead of resetting them completely
2012-04-17 08:59:10 +02:00
Benjamin Otte
461803e407 gtk: Get gtkwidgetpath.h includes out of the public headers
and include them in the C files instead.
2012-03-19 02:26:16 +01:00