Commit Graph

195 Commits

Author SHA1 Message Date
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
Michael Natterer
260ccdfebe gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-11-02 12:04:35 +09:00
Javier Jardón
c15ef6405c Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 17:37:03 +09:00
Tristan Van Berkom
b277ba4238 Make GtkPathBar use set_size_request() instead of the "size-request" signal. 2010-10-30 17:35:22 +09:00
Matthias Clasen
7f8d92f02c Remove size_request from GtkPathBar 2010-10-30 17:35:19 +09:00
Matthias Clasen
c113b8e229 Make GtkPathBar use gtk_container_class_handle_border_width 2010-10-08 10:27:00 -04:00
Javier Jardón
eac1959d2c Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
9e81022bf6 Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
2010-09-13 21:26:01 +02:00
Javier Jardón
d9e7680735 gtk/gtkpathbar.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Tristan Van Berkom
9934007420 Completely removed requisition cache from GtkWidget instance structure.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.

In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.

This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
2010-09-08 18:50:24 +02:00
Javier Jardón
3a10216dd0 Use accessor functions to acces GtkContainer 2010-07-13 19:40:46 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Tristan Van Berkom
0b92348077 Fixed acces of child->requisition; call gtk_widget_get_child_requisition instead.
This fixes squished pathbar issue (as access to ->requisition is really
not supported anymore).
2010-04-20 00:33:20 -04:00
Matthias Clasen
57a3de1bcd Fix file chooser refcounting issues
This was reported in bug 600992.
2010-04-03 20:59:07 -04:00
Javier Jardón
e082783fbb Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
Use new API instead: gtk_widget_set_realized ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:59:03 -04:00
Javier Jardón
e2f79c33ff Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_NO_WINDOW)
Use new API instead: gtk_widget_set_has_window ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:59:02 -04:00
Javier Jardón
ee0bf98769 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:59 -04:00
Javier Jardón
edc65ce1d2 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:20 -04:00
Javier Jardón
e7127daf84 Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Milan Bouchet-Valat
a27e748586 bgo#355851 - Hide backup files in the file chooser
Backup files are hidden along with dotfiles, just like Nautilus.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-11 19:58:51 -05:00
Denis Chertykov
4d7bbd058e bgo#327152 - Ellipsize long directory names in GtkPathBar, and better layout for the pathbar
Ellipsize labels in the Save folder's combo so they don't grow too wide.

Ellipsize labels in normal directory buttons in the pathbar, and make
their requisition's width reasonably small.  Use a tooltip for buttons
that got ellipsized.

Instead of placing the down-slider directly beside the last button in
the pathbar, use the remaining space in the pathbar for the last
button.  Use a different method to find the first visible button.
Walk down from the end, adding buttons until we use all free space.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2009-06-05 14:13:03 -05:00
Michael Natterer
d9d3379698 gtk/gtkaccellabel.c gtk/gtkcalendar.c gtk/gtkclist.c gtk/gtkentry.c
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaccellabel.c
	* gtk/gtkcalendar.c
	* gtk/gtkclist.c
	* gtk/gtkentry.c
	* gtk/gtkeventbox.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkhandlebox.c
	* gtk/gtkhsv.c
	* gtk/gtkiconview.c
	* gtk/gtkimage.c
	* gtk/gtklayout.c
	* gtk/gtklistitem.c
	* gtk/gtkmenuitem.c
	* gtk/gtkmessagedialog.c
	* gtk/gtknotebook.c
	* gtk/gtkpaned.c
	* gtk/gtkpathbar.c
	* gtk/gtkplug.c
	* gtk/gtkprintunixdialog.c
	* gtk/gtkrange.c
	* gtk/gtkrecentchooserdefault.c
	* gtk/gtkruler.c
	* gtk/gtksocket.c
	* gtk/gtktext.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtktreeitem.c
	* gtk/gtktreeview.c
	* gtk/gtkviewport.c
	* gtk/gtkwin32embedwidget.c: chain up unconditionally in
	realize(), unrealize(), map(), unmap(), style_set(),
	key_press_event() and size_request()


svn path=/trunk/; revision=21088
2008-08-12 09:44:32 +00:00
Michael Natterer
e18d3c6fd3 consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance)
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/*.c: consistently chain up using
	GTK_FOO_CLASS(parent_class)->bar(instance) instead of
	(*GTK_FOO_CLASS(parent_class))->bar(instance).


svn path=/trunk/; revision=21085
2008-08-12 09:06:34 +00:00
Sven Neumann
2a95978506 gtk/gtkaboutdialog.c gtk/gtkcellrendereraccel.c gtk/gtkcellrenderercombo.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaboutdialog.c
	* gtk/gtkcellrendereraccel.c
	* gtk/gtkcellrenderercombo.c
	* gtk/gtkcellrendererspin.c
	* gtk/gtkcellrenderertext.c
	* gtk/gtkclipboard.c
	* gtk/gtkcolorsel.c
	* gtk/gtkcombo.c
	* gtk/gtkcombobox.c
	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilechooserentry.c
	* gtk/gtkfontsel.c
	* gtk/gtkinputdialog.c
	* gtk/gtkmenutoolbutton.c
	* gtk/gtkpathbar.c
	* gtk/gtktooltip.c: use canonical signal names in 
g_signal_connect().


svn path=/trunk/; revision=21060
2008-08-11 09:17:49 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Matthias Clasen
f9c7a4bbd0 Really make GtkFileSystem private by _-prefixing all functions.
* gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtkfilesystem.c:
        * gtk/gtkfilesystem.h:
        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkpathbar.c: Really make GtkFileSystem private
        by _-prefixing all functions.


svn path=/trunk/; revision=20378
2008-06-13 16:47:41 +00:00
Carlos Garnacho
640d68778a Bug 520874 - Should use gio directly.
2008-06-10  Carlos Garnacho  <carlos@imendio.com>

        Bug 520874 - Should use gio directly.

        * gtk/gtkfilesystem.[ch]: Turn into a private object, which mostly
        provides helper functions for asynchronous calls, folder abstraction
        and uniform handling of volumes/drives/mounts.

        * gtk/gtkfilesystemwin32.[ch]:
        * gtk/gtkfilesystemunix.[ch]: Removed, these are no longer required.

        * gtk/gtkfilechooser.c:
        * gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkfilechooserentry.[ch]:
        * gtk/gtkfilechooserprivate.h:
        * gtk/gtkfilechooserutils.c:
        * gtk/gtkfilesystemmodel.[ch]:
        * gtk/gtkpathbar.[ch]: Use GIO internally. Adapt to GtkFileSystem API.
        Do not load filesystem implementation modules.

        * gtk/Makefile.am:
        * gtk/gtk.symbols: the gtkfilesystem.h private header isn't installed
        anymore, nor the unix/win32 implementations.

        * README.in: Add blurb about these changes.

svn path=/trunk/; revision=20342
2008-06-10 00:39:35 +00:00
Carlos Garnacho
761749c26b bgo417389 - Scrollwheel for GtkPathBar
2008-03-03  Carlos Garnacho  <carlos@imendio.com>

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=417389 - Make the
	scrollwheel work in GtkPathBar.

	* gtk/gtkpathbar.h (struct _GtkPathBar): New field event_window.

	* gtk/gtkpathbar.c (gtk_path_bar_realize): New function.  Create
	an input-only window, event_window, which we'll use to capture
	scroll events.
	(gtk_path_bar_map): Show the event_window under the rest of the
	windows, so it will be a catch-all for unhandled events.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19699
2008-03-03 21:15:21 +00:00
Matthias Clasen
13277493eb Use gtk_drag_*_add_{text,uri}_targets instead of hardcoded target tables.
2008-02-15  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentry.c:
        * gtk/gtkfilesel.c:
        * gtk/gtklabel.c:
        * gtk/gtkpathbar.c: Use gtk_drag_*_add_{text,uri}_targets
        instead of hardcoded target tables.  (#516092, Christian Persch)



svn path=/trunk/; revision=19590
2008-02-16 02:31:33 +00:00
Matthias Clasen
6a80b177a0 Use gtk_selection_data_set_uris() instead of doing it by hand. (#514890,
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (recent_model_sort_drag_data_get):
        (recent_model_sort_drag_data_get):
        (search_model_sort_drag_data_get):
        * gtk/gtkfilesystemmodel.c (drag_source_drag_data_get):
        * gtk/gtkpathbar.c (button_drag_data_get_cb):
        Use gtk_selection_data_set_uris() instead of doing it
        by hand.  (#514890, Christian Persch)


svn path=/trunk/; revision=19524
2008-02-12 15:07:38 +00:00
Michael Natterer
9c7a2c321f remove unused variable.
2008-01-09  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcolorsel.c (make_label_spinbutton): remove unused
	variable.

	* gtk/gtkcombobox.c (gtk_combo_box_detacher)
	* gtk/gtkicontheme.c (theme_list_contexts)
	(gtk_icon_theme_lookup_icon)
	* gtk/gtkimcontextsimple.c (beep_window)
	* gtk/gtklinkbutton.c (set_link_color)
	* gtk/gtkuimanager.c (child_hierarchy_changed_cb): add casts to
	fix warnings.

	* gtk/gtkpathbar.c (_gtk_path_bar_set_file_system): remove unused
	variable and add const to another to fix a warning.


svn path=/trunk/; revision=19330
2008-01-09 17:02:50 +00:00
Matthias Clasen
13e87f72c9 Don't leak a label. (#455901, Christian Persch, Vincent Geddes)
2007-07-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkpathbar.c (make_directory_button): Don't leak
        a label.  (#455901, Christian Persch, Vincent Geddes)



svn path=/trunk/; revision=18511
2007-07-20 11:10:07 +00:00
Matthias Clasen
232f30f1ba Use g_get_user_special_dir() to obtain the path for the DESKTOP directory.
2007-06-06  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserbutton.c (model_add_special):
        * gtk/gtkfilechooserdefault.c (shortcuts_append_desktop):
        * gtk/gtkfilesystemunix.c (get_icon_name_for_directory):
        * gtk/gtkpathbar.c (_gtk_path_bar_set_file_system):
        Use g_get_user_special_dir() to obtain the path for the
        DESKTOP directory.

svn path=/trunk/; revision=18070
2007-06-07 04:23:10 +00:00
Cody Russell
ea8f3758dd Check if down_button is NULL. This happens when the pathbar button for the
2007-06-04  Cody Russell  <bratsche@gnome.org>

        * gtk/gtkpathbar.c (gtk_path_bar_scroll_down): Check
        if down_button is NULL.  This happens when the pathbar button
        for the current directory is too large to fit in the
        space, e.g. on Windows for directories named something like
        "My Documents and Settings".


svn path=/trunk/; revision=18030
2007-06-04 18:17:14 +00:00
Matthias Clasen
6d80f2d1dc Add ATK names to the Up, Down, and Root buttons. Keep the focus from
2007-05-16  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkpathbar.c: Add ATK names to the Up, Down, and Root
        buttons. Keep the focus from vanishing when Up or Down arrows
        become insensitive or invisible.  (#357005, Patrick Wade)



svn path=/trunk/; revision=17856
2007-05-16 17:42:53 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Carlos Garnacho
0bbc2a56af Fix parenthesis confusion.
2006-11-09  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtkpathbar.c (on_slider_unmap): Fix parenthesis confusion.
2006-11-09 16:51:05 +00:00
Carlos Garnacho
6549346d08 added, do not leave the scroll timeout running if the slider buttons are
2006-11-08  Carlos Garnacho  <carlosg@gnome.org>

        * gtk/gtkpathbar.c (on_slider_unmap): added, do not leave the scroll
        timeout running if the slider buttons are hidden. (#372527)
2006-11-08 19:46:56 +00:00
Matthias Clasen
07e7719441 Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
2006-10-08 05:07:55 +00:00
Matthias Clasen
f45a35921a Commit a patch by Behdad to fix typos, omissions and other errors in the
2006-09-10  Matthias Clasen  <mclasen@redhat.com>

        * Commit a patch by Behdad to fix typos, omissions and other
        errors in the symbol aliasing, and add checks for local PLT
        entries.  (#354687, Behdad Esfahbod)
2006-09-10 06:39:16 +00:00
Kristian Rietveld
118715cb43 don't cancel the operations spawned by buttons here,
2006-09-04  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkpathbar.c (gtk_path_bar_dispose): don't cancel the
	operations spawned by buttons here,
	(set_button_image_get_info_cb): bail out if button is NULL, but
	do free button_data,
	(button_data_free): only free the data is non NULL (since this
	function can be called multiple times for the same data), cancel
	handle is pending but don't free button_data in this case (will
	happen in the callback).
2006-09-04 19:32:13 +00:00
Matthias Clasen
f8794cccca Improve consistency of signal and property names 2006-07-06 05:14:03 +00:00
Kristian Rietveld
014e448e09 cancel all pending handles in the button list. (Fixes #341035, reported by
2006-05-16  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkpathbar.c (gtk_path_bar_dispose): cancel all pending handles
	in the button list. (Fixes #341035, reported by William Jon McCann).
2006-05-16 12:36:07 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Federico Mena Quintero
d955928bd5 Merged the federico-filename-entry branch, to fix bug #136541. Combined
2006-05-03  Federico Mena Quintero  <federico@novell.com>

	Merged the federico-filename-entry branch, to fix bug #136541.
	Combined ChangeLogs:

	2006-04-17  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (pending_select_paths_process):
	Oops, we *do* need to check that we are in OPEN mode before
	selecting the first row in the file list.  See
	https://bugzilla.novell.com/show_bug.cgi?id=166906
	(gtk_file_chooser_default_get_paths): If we are in the case for
	the file list, and the list has no selected rows, jump to the case
	for the filename entry.  This is so that

	       1. The user types a filename in the SAVE filename entry
	          ("foo.txt").

	       2. He then double-clicks on a folder ("bar") in the file
		  list.

	will yield the expected "bar/foo.txt" selection.

	2006-03-29  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkpathbar.c (gtk_path_bar_init): Reduce the inter-button
	spacing to 0.

	* gtk/gtkfilechooserdefault.c (browse_widgets_create): Make the
	location label bold.

	2006-03-29  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (location_mode_set): Just change the
	location_mode field if we are in SAVE/CREATE_FOLDER modes.
	(gtk_file_chooser_default_get_paths): Get the path based on the
	currently focused widget, or the last-focused widget.  This is
	what we should have been doing in the beginning, but it worked out
	fine because we didn't have the possibility of a filename entry in
	OPEN mode.
	(gtk_file_chooser_default_should_respond): Handle the case where
	the last focused widget is the location_entry.

	2006-03-28  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechoosersettings.[ch]: New files with a simple
	framework for saving/loading settings from the file chooser in
	$XDG_CONFIG_HOME/gtk-2.0/gtkfilechooser.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_unmap):
	Save the current settings.
	(settings_save): New helper function.  We save the location_mode
	and show_hidden flags.
	(gtk_file_chooser_default_map): Load the settings.
	(settings_load): New helper function.

	* gtk/gtkfilechooserentry.c
	(_gtk_file_chooser_entry_set_file_part): Oops, don't modify
	in_change.  Our handlers are what set the file_part, so they
	*must* be run when we modify the text.

	2006-03-27  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault):
	Removed the save_file_name_entry.  We'll make this be the same as
	the location_entry widget.
	(struct _GtkFileChooserDefault): Leave only location_button,
	location_entry_box, location_label, location_entry.  We'll use a
	single toggle button for the location entry, which will appear
	below the path bar.
	(struct _GtkFileChooserDefault): Added a
	processing_pending_selections flag.

	* gtk/gtkfilechooserdefault.c (save_widgets_create): Destroy the
	old location_entry if necessary, and hide the location toggle
	widgets.
	(update_chooser_entry): In multiple selection mode, just clear the
	location_entry.
	(check_save_entry): Allow running in OPEN or SELECT_FOLDER modes
	if we are in LOCATION_MODE_FILENAME_ENTRY.
	(gtk_file_chooser_default_should_respond): Switch to a folder if
	the location_entry contains a folder name in OPEN and SAVE mode,
	not just SAVE mode.  If the entry doesn't contain a folder name,
	but is otherwise well-formed, and we are in OPEN mode, return that
	we should respond with that filename.
	(gtk_file_chooser_default_initial_focus): Focus the location_entry
	if appropriate.
	(browse_widgets_create): Create the location_entry_box and the
	location_label here.
	(update_appearance): Call location_mode_set() when switching back
	to OPEN/SELECT_FOLDER mode.  Hide the location_button when
	switching to SAVE/CREATE_FOLDER mode.
	(pending_select_paths_process): Turn the
	processing_pending_selections flag on and off around changes to
	the current selection.  Don't special-case OPEN mode anymore,
	since the new flag will take care of things in
	update_chooser_entry().
	(update_chooser_entry): Don't do anything if
	processing_pending_selections is TRUE.  This keeps the entry from
	being polluted when changing folders.
	(location_popup_handler): In OPEN/SELECT_FOLDER modes, toggle
	between the path bar and the entry.  In SAVE/CREATE_FOLDER modes, simply focus the
	location_entry.
	(update_from_entry): Removed.
	(location_entry_create): Removed.
	(open_location_cb): Removed.
	(file_list_build_popup_menu): Don't add an "Open _Location" menu item.
	(location_entry_set_initial_text): Don't do anything if
	current_folder is NULL.

	* gtk/gtkfilechooserentry.c
	(_gtk_file_chooser_entry_set_file_part): Turn in_change on and off
	around the call to gtk_entry_set_text().  This makes completion
	not happen when the caller has explicitly set a name.

	2006-03-24  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault):
	Added fields location_mode_box, location_pathbar_radio,
	location_filename_radio, location_widget_box, location_label,
	location_entry.  The radio buttons will switch between the pathbar
	and the location entry; the other boxes are for layout purposes.
	(enum LocationMode): New enum.
	(struct _GtkFileChooserDefault): Added a location_mode field.

	* gtk/gtkfilechooserdefault.c (browse_widgets_create): Create the
	location radio buttons to switch between the pathbar and the
	location entry.  Pack the browse_path_bar in the new
	location_widget_box instead of a generic hbox.
	(location_buttons_create): New function.
	(gtk_file_chooser_default_init): Initialize impl->location_mode.
	(location_switch_to_path_bar): New function.
	(location_switch_to_filename_entry): New function.

	* gtk/gtkfilechooserbutton.c (model_add_special): The display_name
	should not be const.
2006-05-03 22:30:52 +00:00
Kristian Rietveld
2c97a8f6e8 Merge of the GTK+ asynchronous file chooser branch. Please see the
2006-05-01  Kristian Rietveld  <kris@imendio.com>

	Merge of the GTK+ asynchronous file chooser branch.  Please see
	the kris-asynch-branch for more detailed ChangeLog entries.

	* configure.in: increase binary version to 2.9.0.

	* gtk.symbols:
	* gtkfilechooser.c:
	* gtkfilechooserbutton.c:
	* gtkfilechooserdefault.c:
	* gtkfilechooserdialog.c:
	* gtkfilechooserembed.c:
	* gtkfilechooserembed.h:
	* gtkfilechooserentry.c:
	* gtkfilechooserentry.h:
	* gtkfilechooserprivate.h:
	* gtkfilesystem.c:
	* gtkfilesystem.h:
	* gtkfilesystemmodel.c:
	* gtkfilesystemmodel.h:
	* gtkfilesystemunix.c:
	* gtkpathbar.c:
	* gtkpathbar.h:
	Merge from kris-async-branch.
2006-05-01 21:41:12 +00:00
Michael Natterer
dfa4870b74 Made button-press timeouts which work like key repeat timeouts
2005-11-22  Michael Natterer  <mitch@imendio.com>

	Made button-press timeouts which work like key repeat timeouts
	configurable. Addresses bug #142582:

	* gtk/gtksettings.c: added properties "gtk-timeout-initial" and
	"gtk-timeout-repeat" which defalt to 200/20 (ms).

	Use the values from GtkSettings instead of hardcoding them
	(the repeat value is either taken as-is for fast repeat or
	multiplied by 5 for slow repeat). Changed all places to use these
	two standard initial/repeat timings:

	* gtk/gtkcalendar.c (unchanged 200/20)
	* gtk/gtknotebook.c (unchanged 200/100)
	* gtk/gtkpathbar.c (changed from 300/150 to 200/100)
	* gtk/gtkrange.c (changed from 250/100 to 200/100)
	* gtk/gtkspinbutton.c (unchanged 200/20)
2005-11-22 12:40:15 +00:00
Matthias Clasen
72f709a864 Merge remaining fixes from the 2.8 branch, pointed out by Michael
2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.c: Merge remaining fixes from the 2.8 branch,
	pointed out by Michael Natterer.
2005-11-21 15:00:57 +00:00
Matthias Clasen
6e4a379e93 Fix crashes in connection with pathbar scrolling (#321560, Bogdan Nicula)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	Fix crashes in connection with pathbar scrolling (#321560,
	Bogdan Nicula)

	* gtk/gtkpathbar.c (gtk_path_bar_update_slider_buttons):
	Stop scrolling when desensitising slider buttons.
	(gtk_path_bar_scroll_timeout, gtk_path_bar_slider_button_press):
	And use it here.

	* gtk/gtkpathbar.h (struct _GtkPathBar): Add a separate
	scrolling_down flag.
2005-11-19 03:46:04 +00:00
Matthias Clasen
478043a1ed Fix a C99ism. (#321777, Jens Granseuer)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.c (button_clicked_cb): Fix a C99ism.
	(#321777, Jens Granseuer)
2005-11-18 19:56:52 +00:00
Matthias Clasen
938d34c059 Improve navigation to parent folders. (#318444, Andrei Yurkevich)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Improve navigation to parent folders.  (#318444, Andrei Yurkevich)

	* gtk/gtkpathbar.[hc]: Add a child_path argument to
	the path_clicked signal.
	* gtk/gtkfilechooserdefault.c (path_bar_clicked): Select the
	child_path, if it is provided.
	* gtk/marshalers.list (path_bar_clicked): Add the necessary
	glue.
2005-11-10 15:17:40 +00:00
Matthias Clasen
fb02547e1e Set focus-on-click to FALSE for all buttons. Don't grab focus when a
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.[hc]: Set focus-on-click to FALSE for all buttons.
	Don't grab focus when a slider button is pressed, instead, use
	a bit in the pathbar struct to determine whether to scroll up
	or down.  (#314486, Carlos Garnacho)
2005-11-07 20:10:04 +00:00