Commit Graph

149 Commits

Author SHA1 Message Date
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
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Matthias Clasen
ff37a04c96 pathbar: Fix scrolling
We need to select for scroll events on the buttons now, selecting
for button events no longer gives us scrolling as a side-effect.
2012-03-02 23:02:57 -05:00
Benjamin Otte
2d1d18b732 pathbar: Fix gcc warning 2012-03-03 04:09:28 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Carlos Garcia Campos
15711a3bf7 gtkpathbar: Use symbolic names for button numbers 2012-01-27 09:47:44 +01:00
Federico Mena Quintero
463c98a9d7 [GtkPathBar] Remove unused error argument
It used to be that _gtk_path_bar_set_file() would return an error if
it wasn't able to switch to the specified file, but that hasn't been
the case for a long while now, since the file chooser became async.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 15:11:54 -06:00
Federico Mena Quintero
7fb00c919e [path-bar] Add some comments to explain the async recursion on an I/O callback
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 14:17:04 -06:00
Federico Mena Quintero
6ce48345ce [path-bar] Only reset the children's styles if the children actually changed
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 14:17:02 -06:00
Federico Mena Quintero
07eb8d6952 Remove unused argument
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 14:17:00 -06:00
Cosimo Cecchi
f7d95b5fe3 pathbar: add the linked style class to GtkPathBar 2011-11-28 14:41:48 -05:00
Cosimo Cecchi
4ea01b2cf3 GtkPathBar: Implement get_path_for_child
This will allow nice theming of the path bar.

https://bugzilla.gnome.org/show_bug.cgi?id=658077
2011-09-05 12:14:09 -04:00
Matthias Clasen
6f39855c08 More include cleanups 2011-08-28 01:54:55 -04:00
Matthias Clasen
4962545ef3 GtkPathBar: don't use a GtkAlignment 2011-06-07 13:01:00 -04:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Carlos Garnacho
7266d0f11f Make GtkPathBar use ::style-updated 2011-01-04 03:06:27 +01:00