Commit Graph

655 Commits

Author SHA1 Message Date
Matthias Clasen
7d8930fdcc Never scroll the places horizontally. Instead, ellipsize the text.
* gtk/gtkfilechooserdefault.c (shortcuts_list_create): Never scroll
        the places horizontally. Instead, ellipsize the text.



svn path=/trunk/; revision=22397
2009-02-24 02:20:15 +00:00
Matthias Clasen
a220373a55 Skip Desktop if it equals the home folder
svn path=/trunk/; revision=22192
2009-01-23 06:00:44 +00:00
Federico Mena Quintero
c6f4b327e6 GtkFileChooser: only set local_only on the location entry if it exists
2009-01-21  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (save_widgets_create): Set
	local_only on the location entry when we create it...
	(set_local_only): ... and set it here only if the location entry
	exists.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22163
2009-01-21 19:12:58 +00:00
Federico Mena Quintero
2c07a59e54 Add a local_only property to GtkFileChooserEntry
Patch by Carlos Garnacho <carlos@imendio.com> - add a local_only
	property to GtkFileChooserEntry:

	* gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Add a
	local_only field.
	(_gtk_file_chooser_entry_init): Default to local_only being true.
	(start_explicit_completion): Don't allow completion of non-native
	files if local_only is turned on.
	(start_loading_current_folder): Don't start loading non-native
	folders if local_only is turned on.
	(_gtk_file_chooser_entry_set_local_only): New function.
	(_gtk_file_chooser_entry_get_local_only): New function.

	* gtk/gtkfilechooserentry.h (_gtk_file_chooser_entry_set_local_only,
	_gtk_file_chooser_entry_get_local_only): New prototypes.

	* gtk/gtkfilechooserdefault.c (set_local_only): Set the local_only
	property on the entry.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22156
2009-01-21 03:16:46 +00:00
Federico Mena Quintero
d00b5cd3ee Load/save the file chooser's size
* gtk/gtkfilechooserdefault.c (save_dialog_geometry): New function.
	(settings_save): Save the dialog's geometry.
	(gtk_file_chooser_default_get_default_size): Load the geometry
	from the settings.  If it was already saved, return that instead
	of computing an ad-hoc size.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22119
2009-01-14 20:19:10 +00:00
Federico Mena Quintero
1d4694ec79 Avoid visibly resizing the file chooser at startup
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_map):
	Don't change the default size in ::map() so we don't flicker...
	(gtk_file_chooser_default_realize): ... so do it in ::realize()
	instead, when the window is not yet visible.  This avoids a
	dialog-that-resizes when you first pop up the file chooser.
	(emit_default_size_changed): Just emit the signal; don't check for
	the widget's state so we can be emitted during the initial
	::realize() when we are not mapped yet.
	(update_preview_widget_visibility): Only emit default_size_changed
	if the widget is not mapped, to avoid resizing the dialog while it
	is visible.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=22117
2009-01-14 20:18:40 +00:00
Tomas Bzatek
d1a0239a18 Mask G_FILE_TYPE_SHORTCUT as a directory (#561494)
2008-12-15  Tomas Bzatek  <tbzatek@redhat.com> 

        * gtk/gtkfilechooserdefault.c: (list_row_activated):
        * gtk/gtkfilesystem.c: (_gtk_file_info_consider_as_directory):
        Mask G_FILE_TYPE_SHORTCUT as a directory (#561494)


svn path=/trunk/; revision=21906
2008-12-15 16:12:09 +00:00
Matthias Clasen
083967b3b8 Mount the enclosing volume if the folder we're switching to is not
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
        Mount the enclosing volume if the folder we're switching to is not
        mounted. Patch by Tomas Bzatek, based on work by Carlos Garnacho


svn path=/trunk/; revision=21899
2008-12-14 03:33:41 +00:00
Matthias Clasen
50329fa7c0 Privately export this method. It classifies directories and mountables the
* gtk/gtkfilesystem.[hc] (_gtk_file_info_consider_as_directory):
        Privately export this method. It classifies directories and mountables
        the same.

        * gtk/gtkfilesystem.c (enclosing_volume_mount_cb): Silently drop
        G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible
        mounts.

        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtkfilechooserdefault.c: Use the new function instead of
        direct checks for G_FILE_TYPE_DIRECTORY throughout.


svn path=/trunk/; revision=21898
2008-12-14 02:14:19 +00:00
Matthias Clasen
d68d9790df fix the build
svn path=/trunk/; revision=21896
2008-12-14 01:16:05 +00:00
Matthias Clasen
2ebb72e82a Don't show an error dialog when changing to a non-existing folder, since
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
        Don't show an error dialog when changing to a non-existing folder,
        since this is ususally just an annoyance. 


svn path=/trunk/; revision=21894
2008-12-14 00:43:09 +00:00
Matthias Clasen
3a20f54bbe Avoid a warning in tests. Patch by Christian Dywan
* gtk/gktfilechooserdefault.c (set_local_only): Avoid a warning
        in tests. Patch by Christian Dywan

svn path=/trunk/; revision=21892
2008-12-14 00:32:32 +00:00
Matthias Clasen
67d94ca553 Don't forget to reset reload_state when current_folder is already correct.
2008-10-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
        Don't forget to reset reload_state when current_folder is already
        correct. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=465992


svn path=/trunk/; revision=21608
2008-10-08 15:32:23 +00:00
Christian Persch
96b8743e95 Bug 554698 – mem leak in filechooser
svn path=/trunk/; revision=21570
2008-10-02 19:47:52 +00:00
Christian Persch
ab7aa3e113 Bug 554690 – mem leak in filechooser
svn path=/trunk/; revision=21567
2008-10-02 19:47:35 +00:00
Matthias Clasen
bc48caa272 Bug 553133 – GtkFileChooser won't ask to mount a volume
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 553133 – GtkFileChooser won't ask to mount a volume

        * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Use
        a GtkMountOperation when mounting, so that we get a password
        dialog when required.

svn path=/trunk/; revision=21523
2008-09-26 19:25:35 +00:00
Michael Natterer
23bcd6df88 don't unref the file system backend, the newly added
2008-09-25  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
	don't unref the file system backend, the newly added
	unset_file_system_backend() already does this (bug #553135).


svn path=/trunk/; revision=21514
2008-09-25 11:22:34 +00:00
Matthias Clasen
235480bd9c Bug 553135 – eog crash: assertion failed. Gtk error:
2008-09-22  Matthias Clasen  <mclasen@redhat.com>

        Bug 553135 – eog crash: assertion failed. Gtk error:
        shortcuts_remove_rows: code should not be reached

        * gtk/gtkfilechooserdefault.c: Disconnect from GtkFileSystem
        signals when we are destroyed, in order to avoid nasty surprises.
        Patch by Claudio Saavedra


svn path=/trunk/; revision=21492
2008-09-22 18:32:31 +00:00
Emmanuele Bassi
e27c3c1939 Bug 552789 – Show size column in the search and recently used files
2008-09-22  Emmanuele Bassi  <ebassi@linux.intel.com>

	Bug 552789 – Show size column in the search and recently used
	files modes

	* gtk/gtkfilechooserdefault.c: Display the file size column
	when in OPERATION_MODE_SEARCH. This removes a stat() call
	and simplifies the code a little bit by changing the query
	for file informations for each search engine hit.

svn path=/trunk/; revision=21491
2008-09-22 14:25:45 +00:00
Emmanuele Bassi
d5a173b4ed Save the size column visibility state with the rest of the FileChooser
2008-09-18  Emmanuele Bassi  <ebassi@linux.intel.com>

	* gtk/gtkfilechooserdefault.c (settings_save): Save the size column
	visibility state with the rest of the FileChooser settings.

svn path=/trunk/; revision=21437
2008-09-18 22:00:53 +00:00
Emmanuele Bassi
555ef89dc3 Bug 325095 – show a 'size' column
2008-09-18  Emmanuele Bassi  <ebassi@linux.intel.com>

	Bug 325095 – show a 'size' column

	* gtk/gtkfilechooserdefault.c:
	* gtk/gtkfilechooserprivate.h: Add a context menu item controlling
	the visibility of the file size column. This works only for the
	browse mode, and the column is not visible by default.

	* gtk/gtkfilechoosersettings.[ch]: Add a ShowSizeColumn key to the
	settings file.

svn path=/trunk/; revision=21431
2008-09-18 15:29:33 +00:00
Matthias Clasen
8ee6ecbeed Fix content type handling
svn path=/trunk/; revision=21318
2008-09-08 03:07:40 +00:00
Matthias Clasen
d69788f070 Don't leak all search results
svn path=/trunk/; revision=21317
2008-09-08 02:49:20 +00:00
Matthias Clasen
f2c0fa2ce9 Don't unref the GFile we just put into the search_model. This adds a new
2008-09-07  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (search_add_hit): Don't unref the
        GFile we just put into the search_model. This adds a new memory
        leak...



svn path=/trunk/; revision=21315
2008-09-08 01:05:50 +00:00
Matthias Clasen
4b97ecb8f9 plug a memory leak
svn path=/trunk/; revision=21314
2008-09-07 22:18:37 +00:00
Michael Natterer
e936ba0f5a stop the emission of the signal also when we bail out early because we
2008-09-05  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkfilechooserdefault.c (file_list_drag_data_received_cb):
	stop the emission of the signal also when we bail out early
	because we don't accept drops from ourselves. Keeps the code from
	running into a warning in gtktreeview.c.


svn path=/trunk/; revision=21302
2008-09-05 19:53:30 +00:00
Matthias Clasen
4c6577fb8b Bug 549354 – Crash trying to open a file on a remote folder
2008-08-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 549354 – Crash trying to open a file on a remote folder

        * gtk/gtkfilechooserdefault.c (error_message_with_parent): Handle
        the fact that parent may be NULL without crashing.


svn path=/trunk/; revision=21206
2008-08-27 04:01:53 +00:00
Federico Mena Quintero
b4b74a3c6c [PATCH 7/7] bgo543308 - Remove the default_width/height stuff, since we are not using it anymore
Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=21168
2008-08-20 01:13:17 +00:00
Federico Mena Quintero
967a68008f [PATCH 6/7] bgo543308 - Only compute a font-based size if we are in expanded mode or one of the OPEN modes
Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=21167
2008-08-20 01:12:54 +00:00
Federico Mena Quintero
8a8915e0fd [PATCH 5/7] bgo543308 - Unconditionally compute a size based on font size
Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=21166
2008-08-20 01:12:35 +00:00
Federico Mena Quintero
73fa2005fc [PATCH 4/7] bgo543308 - Emit default-size-changed when the file chooser is mapped
Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=21165
2008-08-20 01:12:13 +00:00
Federico Mena Quintero
0e386e9324 [PATCH 3/7] bgo543308 - Factor out the code to emit default-size-changed.
Only emit default-size-changed if the file chooser widget is mapped.
It only makes sense to do this once we know our final configuration,
which is actually when we are mapped.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=21164
2008-08-20 01:11:45 +00:00
Sven Neumann
b699ac5853 gtk/gtkaccellabel.c gtk/gtkaction.c gtk/gtkclist.c gtk/gtkcolorbutton.c
2008-08-12  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaccellabel.c
	* gtk/gtkaction.c
	* gtk/gtkclist.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkctree.c
	* gtk/gtkdialog.c
	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilesel.c
	* gtk/gtkgamma.c
	* gtk/gtkiconview.c
	* gtk/gtkkeyhash.c
	* gtk/gtklabel.c
	* gtk/gtkmenu.c
	* gtk/gtkmenubar.c
	* gtk/gtkpaned.c
	* gtk/gtkrecentchooserdialog.c
	* gtk/gtkrecentchooserutils.c
	* gtk/gtkselection.c
	* gtk/gtksizegroup.c
	* gtk/gtktextbtree.c
	* gtk/gtktextbuffer.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtktreemodel.c
	* gtk/gtkuimanager.c
	* gtk/gtkwindow-decorate.c
	* gtk/gtkwindow.c: use canonical signal names in some more places
	that I missed earlier. Also changed this in the documentation and
	comments.


svn path=/trunk/; revision=21094
2008-08-12 14:37:03 +00: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
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
Carlos Garnacho
7e439efc92 Deprecate gtk_file_chooser_*_new_with_backend(), since GIO is already used
2008-08-04  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtk.symbols:
        * gtk/gtkfilechooserbutton.[ch]:
        * gtk/gtkfilechooserdefault.[ch]:
        * gtk/gtkfilechooserdialog.[ch]:
        * gtk/gtkfilechooserwidget.[ch]: Deprecate
        gtk_file_chooser_*_new_with_backend(), since GIO is already used
        directly. Fixes #545976.

svn path=/trunk/; revision=20972
2008-08-04 14:43:53 +00:00
Carlos Garnacho
02c65db5c0 Make GFile-oriented API public. Fixes #545978.
2008-08-04  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtk.symbols:
        * gtk/gtkfilechooser.[ch]: Make GFile-oriented API public. Fixes
        #545978.
        * gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkfilechooserutils.c: Update to use public GFile API.

svn path=/trunk/; revision=20971
2008-08-04 14:43:05 +00:00
Michael Natterer
7f00695920 remove _gtk_binding_signal_new().
2008-07-21  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbindings.[ch]: remove _gtk_binding_signal_new().

	* gtk/gtkfilechooserdefault.c
	* gtk/gtkmenu.c
	* gtk/gtkmenushell.c
	* gtk/gtkscalebutton.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtkwidget.c: use g_signal_new_class_handler() instead. Add
	some missing I_() to the signal names.


svn path=/trunk/; revision=20874
2008-07-21 09:48:20 +00:00
Matthias Clasen
ba3b08bc7b Fix a problem with context menu sensitivity
svn path=/trunk/; revision=20834
2008-07-15 05:57:39 +00:00
Matthias Clasen
128585147f Bug 541645 – gtkfilechooserdefault segfaults when bookmark does not
2008-07-06  Matthias Clasen  <mclasen@redhat.com>

        Bug 541645 – gtkfilechooserdefault segfaults when bookmark does not
        contain ://

        * gtk/gtkfilechooserdefault.c (_gtk_file_chooser_label_for_file):
        Be more robust. Reported by  Jelte van der Hoek


svn path=/trunk/; revision=20787
2008-07-06 05:34:03 +00:00
Matthias Clasen
2f1ef69fb7 Don't select the first row if the folder is empty. Patch by Olle
* gtk/gtkfilechooserdefault.c (browse_files_select_first_row): Don't
        select the first row if the folder is empty.
        Patch by Olle Bergkvist.


svn path=/trunk/; revision=20751
2008-07-03 22:40:33 +00:00
Michael Natterer
1b291602bd remove some of the million includes.
2008-07-02  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkfilechooserdefault.c: remove some of the million includes.


svn path=/trunk/; revision=20732
2008-07-02 10:14:45 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Carlos Garnacho
1732652e71 current_folder can be NULL here, do not try to reference it (Bug #540235)
2008-06-26  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtkfilechooserdefault.c
        (gtk_file_chooser_default_get_current_folder): current_folder can be
        NULL here, do not try to reference it (Bug #540235)
        (gtk_file_chooser_default_get_files): Deal better with
        gtk_file_chooser_default_get_current_folder() being able to return
        NULL.

svn path=/trunk/; revision=20687
2008-06-26 09:41:13 +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
Christian Persch
a58a173b48 Use gtk_drag_[dest|source]_add_[text|uri]_targets(), and simplify code. Bug #516092.
svn path=/trunk/; revision=20464
2008-06-19 12:52:40 +00:00
Christian Persch
446f41757b Use g_set_error_literal where appropriate. Bug #538640.
svn path=/trunk/; revision=20463
2008-06-19 12:47:48 +00:00
Olle Bergkvist
ad54e22fc7 bgo538784 - Don't change the filename entry in CREATE_FOLDER mode
2008-06-18  Olle Bergkvist <olle.bergkvist@yahoo.se>

	http://bugzilla.gnome.org/show_bug.cgi?id=538784 - Don't change
	the filename in the name entry in CREATE_FOLDER mode when changing
	folders, so that you can enter a new subfolder name, double-click on a
	folder to change to it, and close the dialog.

	* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't change
	the filename in the entry in CREATE_FOLDER mode, either.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=20457
2008-06-18 22:35:32 +00:00
Olle Bergkvist
666b544ddd bgo419737 - Don't clear filename entry in SAVE/CREATE_FOLDER modes
2008-06-18  Olle Bergkvist <olle.bergkvist@yahoo.se>

	http://bugzilla.gnome.org/show_bug.cgi?id=419737#c59 - The file
	chooser clears the filename entry in SAVE/CREATE_FOLDER modes when
	it shouldn't.

	* gtk/gtkfilechooserdefault.c (shortcuts_activate_iter): Don't
	clear the entry for CREATE_FOLDER either; this needs the same
	behavior as SAVE mode.
	(update_chooser_entry): Only clear the entry in OPEN/SELECT_FOLDER
	modes.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=20455
2008-06-18 22:23:39 +00:00
Matthias Clasen
d217ec4f90 Use standard icon names.
2008-06-18  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilesystem.c (_gtk_file_system_volume_render_icon):
        * gtk/gtkfilechooserbutton.c (change_icon_theme):
        (model_add_bookmarks):
        (model_update_current_folder):
        * gtk/gtkfilechooserdefault.c (shortcuts_insert_file):
        (shortcuts_reload_icons): Use standard icon names.


svn path=/trunk/; revision=20454
2008-06-18 16:22:42 +00:00
Michael Natterer
40b6173aa3 remove static integer variables which hold the number of members in
2008-06-17  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkfilechooserdefault.c: remove static integer variables
	which hold the number of members in GtkTargetEntry arrays and use
	G_N_ELEMENTS() directly instead.


svn path=/trunk/; revision=20421
2008-06-17 12:54:16 +00:00
Emmanuele Bassi
ea51ac13f8 Remove the GtkRecentManager screen dance, as it has been deprecated since
2008-06-17  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c:
	(gtk_file_chooser_default_init),
	(gtk_file_chooser_default_constructor),
	(gtk_file_chooser_default_screen_changed),
	(recent_start_loading): Remove the GtkRecentManager screen
	dance, as it has been deprecated since 2.12. Now we get the
	GtkRecentManager singleton whewn we create the FileChooserDefault
	instance. (Michael Natterer)

svn path=/trunk/; revision=20419
2008-06-17 12:46:12 +00:00
Michael Natterer
5337cdbb10 remove GtkTooltips member from the GtkFileChooserDefault struct.
2008-06-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkfilechooserprivate.h: remove GtkTooltips member from the
	GtkFileChooserDefault struct.

	* gtk/gtkfilechooserdefault.c: don't allocate and free the
	GtkTooltips.


svn path=/trunk/; revision=20396
2008-06-16 11:49:23 +00:00
Carlos Garnacho
bfe00f9b9b Return full path here as expected, not just the basename.
2008-06-15  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtkfilechooser.c (gtk_file_chooser_get_filename): Return full
        path here as expected, not just the basename.

        * gtk/gtkfilechooserdefault.c
        (gtk_file_chooser_default_update_current_folder): Ensure that we keep
        a reference to file, since it can be destroyed when switching back to
        browse mode.

        * gtk/gtkfilesystem.c (get_icon_for_special_directory): Removed, home
        and desktop directories are dealt by the filechooser as normal files,
        not volumes, so the icon for these is handled directly by GIO.
        (_gtk_file_system_volume_render_icon): Update caller.

svn path=/trunk/; revision=20393
2008-06-15 23:32:11 +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
Behdad Esfahbod
d76e3d552e Bug 503071 – Application direction changes to right to left even if
2008-06-11  Behdad Esfahbod  <behdad@gnome.org>

        Bug 503071 – Application direction changes to right to left even if
        theres no translation

        * configure.in: Bump glib requirement.

        * gtk/gtkaccellabel.c
        (_gtk_accel_label_class_get_accelerator_label):
        * gtk/gtkactiongroup.c (dgettext_swapped):
        * gtk/gtkbuilder.c (gtk_builder_class_init):
        * gtk/gtkbuilderparser.c (_dpgettext),
        (_gtk_builder_parser_translate):
        * gtk/gtkfilechooserdefault.c (list_size_data_func):
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
        * gtk/gtkintl.h:
        * gtk/gtkmain.c (setlocale_initialization),
        (do_pre_parse_initialization), (gettext_initialization):
        * gtk/gtkstock.c (gtk_stock_lookup), (sgettext_swapped):
        Use g_dgettext() and g_dngettext().


svn path=/trunk/; revision=20358
2008-06-11 23:40:35 +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
Federico Mena Quintero
4b1bba8af1 bgo533891 - disallow DnD from the file list into itself
2008-05-27  Federico Mena Quintero  <federico@novell.com>

	http://bugzilla.gnome.org/show_bug.cgi?id=533891 - Don't allow
	drag and drop from the file list into itself, as it doesn't make
	sense (it would just change the current folder).

	* gtk/gtkfilechooserdefault.c (file_list_dest_targets): Use
	GTK_TARGET_OTHER_WIDGET so we don't DnD from the file list into
	itself.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=20194
2008-05-27 20:33:23 +00:00
Carlos Garnacho
cdaca42be3 Enable rubberbanding when "select-multiple" is TRUE. Bug #446068.
2008-05-27  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtkfilechooserdefault.c (set_select_multiple): Enable
        rubberbanding when "select-multiple" is TRUE. Bug #446068.

svn path=/trunk/; revision=20184
2008-05-27 00:20:18 +00:00
Jan Arne Petersen
1d946af2f3 Add GDK_ACTION_MOVE to the drag actions to allow trash (#137717).
2008-05-25  Jan Arne Petersen  <jpetersen@jpetersen.org>

	* gtk/gtkfilechooserdefault.c: (create_file_list): Add GDK_ACTION_MOVE
	to the drag actions to allow trash (#137717).


svn path=/trunk/; revision=20150
2008-05-25 14:24:42 +00:00
Jan Arne Petersen
242f330920 Ignore G_IO_ERROR_FAILED_HANDLED errors (#532262).
2008-05-25  Jan Arne Petersen  <jpetersen@jpetersen.org>

	* gtk/gtkfilechooserdefault.c:
	(shortcuts_activate_volume_mount_cb): Ignore G_IO_ERROR_FAILED_HANDLED
	errors (#532262).


svn path=/trunk/; revision=20145
2008-05-25 12:22:30 +00:00
Jan Arne Petersen
adcf2fd3f3 Don't try to toggle the visibility of the location entry field in search
2008-05-24  Jan Arne Petersen  <jpetersen@jpetersen.org>

	* gtk/gtkfilechooserdefault.c: (location_toggle_popup_handler): Don't
	try to toggle the visibility of the location entry field in search and
	recent mode (#526422)


svn path=/trunk/; revision=20138
2008-05-24 18:59:56 +00:00
Jan Arne Petersen
d6c80f57b6 Show parse name as tooltip for path shortcuts (#137503).
2008-05-24  Jan Arne Petersen  <jpetersen@jpetersen.org>

	* gtk/gtkfilechooserdefault.c: (shortcuts_query_tooltip_cb),
	(shortcuts_list_create): Show parse name as tooltip for path
	shortcuts (#137503).


svn path=/trunk/; revision=20137
2008-05-24 18:56:22 +00:00
Hans Breuer
0b57c6b98f updated fix c99ism (variable at start of block export functions for window
2008-05-23  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc gtk/makefile.msc.in : updated
	* gtk/gtkwidget.c : fix c99ism (variable at start of block
	* gdk/gdk.symbols gtk/gtk.symbols : export functions for window 
	redirection
	* gtk/gtkfilechooserdefault.c : #include <locale.h> for 
	setlocale(LC_ALL, ...)

svn path=/trunk/; revision=20131
2008-05-23 20:29:27 +00:00
Federico Mena Quintero
20ee3a022e bgo322298 - Make the file chooser dialog always resizable
2008-05-19  Federico Mena Quintero  <federico@novell.com>

	http://bugzilla.gnome.org/show_bug.cgi?id=322298 - Save dialog
	can't be resized until you expand the "Browse for other folders"
	section.

	* gtk/gtkfilechooserembed.h (struct _GtkFileChooserEmbedIface):
	Removed the "get_resizable" method.
	(_gtk_file_chooser_embed_get_resizable): Removed.

	* gtk/gtkfilechooserembed.c: Removed the _get_resizable() machinery.

	* gtk/gtkfilechooserdefault.c: Likewise.

	* gtk/gtkfilechooserdialog.c
	(file_chooser_widget_default_size_changed): Act as if the dialog
	were always resizable.

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/trunk/; revision=20113
2008-05-19 17:25:19 +00:00
Sven Neumann
04466bac87 gtk/gtkfilechooserdefault.c set alternative button order for overwrite
2008-03-13  Sven Neumann  <sven@gimp.org>

	* gtk/gtkfilechooserdefault.c
	* gtk/gtkprintunixdialog.c: set alternative button order for
	overwrite confirmation dialogs (bug #522191).

svn path=/trunk/; revision=19866
2008-03-13 14:09:02 +00:00
William Rikard Lachance
b68d7cc100 Oops, forgot to make the raw "%H:%M" string localizable (as it should be).
svn path=/trunk/; revision=19724
2008-03-06 19:57:55 +00:00
William Rikard Lachance
69cef720a4 Don't print "Today at" in front of the time for today's date. It's
redudant. (see bug #410517).

svn path=/trunk/; revision=19723
2008-03-06 19:43:22 +00:00
Tor Lillqvist
f07ad74afc Small further change to make it more robust.
svn path=/trunk/; revision=19626
2008-02-21 16:23:01 +00:00
Tor Lillqvist
7a9bbf551f Must pass the format string to strftime in the C library's locale's
2008-02-21  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func) [Win32]: Must
	pass the format string to strftime in the C library's locale's
	charset, not the system's. Correspondingly, the return value from
	strftime() is in the C library's locale's charset. (#509885)


svn path=/trunk/; revision=19625
2008-02-21 12:47:45 +00:00
Federico Mena Quintero
1cda35d32c Fix 419737 - don't focus the file list when activating a shortcut in the file chooser
2008-02-12  Federico Mena Quintero  <federico@novell.com>

	Merged from gtk-2-12:

	Don't focus the file list when shortcuts get activated.  This
	removes a lot of ambiguity in when the file selection should
	change, and makes the overall code flow simpler.

	This fixes http://bugzilla.gnome.org/show_bug.cgi?id=419737 -
	file/save dialog clears the filename entry when changing
	directories.

	Also fixes http://bugzilla.gnome.org/show_bug.cgi?id=499940 -
	focus should not go to the file list when a shortcut is activated.

	* gtk/gtkfilechooserdefault.c
	(shortcuts_activate_volume_mount_cb): Don't focus the file list
	(shortcuts_activate_get_info_cb): Likewise.

	* gtk/gtkfilechooserdefault.c (switch_to_shortcut): Don't focus
	the file list (this was the last place where we would focus the
	file list explicitly).  If you are in the location entry, for
	example, you don't want Alt-Home to take you to the file list; you
	just want the current folder to change.  Thanks to Olle Bergkvist
	<olle.bergkvist@yahoo.se> for pointing this out in
	http://bugzilla.gnome.org/show_bug.cgi?id=419737#c51.
	(focus_browse_tree_view_if_possible): Removed.

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

svn path=/trunk/; revision=19543
2008-02-12 19:32:17 +00:00
Matthias Clasen
4118dd893f Skip exensions when selecting filenames in the save-as dialog. (#362516,
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        Skip exensions when selecting filenames in the save-as dialog.
        (#362516, Carlos Garnacho)

        * gtk/gtkfilechooserentry.h:
        * gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_select_filename):
        New function to skip the extension part when selecting a filename.
        (_gtk_file_chooser_entry_set_base_folder): Use it here.

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_entry_grab_focus):
        ...and here.


svn path=/trunk/; revision=19540
2008-02-12 17:34:43 +00:00
Matthias Clasen
0509519d35 Unify the handling of various "Enter" keysyms all over the place.
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c: Unify the handling of various "Enter" keysyms
        all over the place.  (#515047, Christian Persch)



svn path=/trunk/; revision=19528
2008-02-12 15:51:09 +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
Emmanuele Bassi
6f1d571c04 Use the correct comparison function (kudos to Christian Persch and Claudio
2008-01-03  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c (recent_sort_mru): Use the
	correct comparison function (kudos to Christian Persch and
	Claudio Saavedra for spotting this)

	* gtk/gtkrecentchooserutils.c:
	(sort_recent_items_mru),
	(sort_recent_items_lru): Ditto as above.

svn path=/trunk/; revision=19302
2008-01-03 12:29:16 +00:00
Matthias Clasen
dcc86ce57c Don't leak pixbufs. (#502250, Yevgen Muntyan)
2007-12-07  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): Don't
        leak pixbufs.  (#502250, Yevgen Muntyan)


svn path=/trunk/; revision=19128
2007-12-07 18:51:25 +00:00
Josselin Mouette
21a30978dc reviewed by: Federico Mena Quintero
2007-11-26  Josselin Mouette <joss@malsain.org>

        reviewed by: Federico Mena Quintero

        * gtk/gtkfilechooserdefault.c: (shortcuts_append_paths),
        (shortcuts_add_bookmarks), (shortcuts_selection_changed_cb),
        (shortcuts_list_create), (gtk_file_chooser_default_should_respond):
        Make the shortcuts activate with a single click. (#148828)
        Fix a few things affected by the change:
          - Set selection mode to GTK_SELECTION_SINGLE to allow a case 
            where no shortcut is selected.
          - Don't activate a shortcut in the response callback.
          - Filter out duplicate entries in volumes and bookmarks to 
            avoid the selection to change when reordering them with DnD.


svn path=/trunk/; revision=19072
2007-11-26 23:16:19 +00:00
Emmanuele Bassi
2ad0ef4632 Convert the format to the current locale before passing it to strtime().
2007-10-10  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): Convert
	the format to the current locale before passing it to
	strtime(). Fixes corrupt dates with non-UTF8 encodings on
	OpenSolaris. (#465380, Takao Fujiwara)

svn path=/trunk/; revision=18903
2007-10-10 08:09:13 +00:00
Emmanuele Bassi
928db3a71b Fix the time_t typecasting on OpenSolaris. (#465380, Takao Fujiwara)
2007-10-10  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): Fix the
	time_t typecasting on OpenSolaris. (#465380, Takao Fujiwara)

svn path=/trunk/; revision=18902
2007-10-10 08:02:16 +00:00
Loïc Minier
618c8de221 Fix warnings and display of modified date / time in filechooser for some
2007-10-04  Loïc Minier  <lool@dooz.org>

       * gtk/gtkfilechooserdefault.c: (list_mtime_data_func): Fix warnings
       and display of modified date / time in filechooser for some locales as
       it was missing a locale to UTF-8 conversion. Fixes #482504.

svn path=/trunk/; revision=18880
2007-10-04 07:40:55 +00:00
Federico Mena Quintero
721eb57a22 455284 - Focus or toggle location entry
2007-10-02  Federico Mena Quintero  <federico@novell.com>

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=455284 - In the file
	chooser, Ctrl-L should switch to the location entry.  If we are
	already on the location entry, turn it off.  Based on a patch by
	Jaap A. Haitsma <jaap@haitsma.org> and an idea by Wouter
	Bolsterlee.

	* gtk/gtkfilechooserdefault.c (location_button_toggled_cb): Call
	location_mode_set() directly instead of using toggle_location_mode().
	(toggle_location_mode): Removed.
	(location_toggle_popup_handler): If the file entry is not visible,
	show it.  If it is visible, turn it off only if it is focused.
	Otherwise, switch to the entry.

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

svn path=/trunk/; revision=18874
2007-10-02 15:50:27 +00:00
Emmanuele Bassi
7421a81f67 Fixes for bug #480123.
2007-09-25  Emmanuele Bassi  <ebassi@gnome.org>

	Fixes for bug #480123.

	* gtk/gtksearchenginesimple.c:
	(gtk_search_engine_simple_dispose), (search_thread_done_idle): Cancel
	the file tree walking thread when disposing the search engine
	implementation.

	* gtk/gtkfilechooserdefault.c (search_stop_searching): Forcibly
	stop the search engine implementation when stopping the search,
	instead of just unreffing the object.

svn path=/trunk/; revision=18865
2007-09-25 20:59:15 +00:00
Emmanuele Bassi
e299a72a49 Use the "document-open-recent" icon for the the Recently Used shortcut in
2007-09-12  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c (render_recent_icon): Use the
	"document-open-recent" icon for the the Recently Used shortcut
	in the file chooser. (#306445)

	* gtk/Makefile.am:
	* gtk/stock-icons/16/document-open-recent.png:
	* gtk/stock-icons/16/document-open-recent.svg:
	* gtk/stock-icons/24/document-open-recent.png:
	* gtk/stock-icons/24/document-open-recent.svg: Add the
	"document-open-recent" icon to the builtin theme we provide
	as a fallback.

svn path=/trunk/; revision=18803
2007-09-12 18:00:30 +00:00
Matthias Clasen
b0c57a4b8f Initialize error to NULL before calling g_set_error(). Should fix #473954,
2007-09-06 Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (shortcuts_drop_uris): Initialize
        error to NULL before calling g_set_error(). Should fix #473954,
        reported by Sebastien Bacher.

svn path=/trunk/; revision=18738
2007-09-06 19:15:37 +00:00
Emmanuele Bassi
a35bd52a96 Check if we are still holding the model before updating it; removes a set
2007-08-23  Emmanuele Bassi  <ebassi@gnome.org>

	* gtkfilechooserdefault.c:
	(search_hit_get_info_cb), (recent_item_get_info_cb): Check if
	we are still holding the model before updating it; removes a
	set of critical warnings when switching to the browse mode from
	a loading search or recent files list.

	(recent_clear_model), (recent_sort_model),
	(recent_idle_cleanup): When in recent files mode, set the
	model for the files list view when we have completed the loading
	of the recently used files list. This makes switching between
	modes fast again and reduces the amount of redraws needed
	to display the list. (#469214)

svn path=/trunk/; revision=18677
2007-08-23 10:48:28 +00:00
Matthias Clasen
57c44b18e7 Port to use new tooltips API. (#451397, Jan Arne Petersen)
2007-07-24  Matthias Clasen  <mclasen@redhat.com>

        * gtkcolorsel.c:
        * gtkfilechooserdefault.c:
        * gtkpagesetupunixdialog.c:
        * gtkprintunixdialog.c: Port to use new tooltips API.
        (#451397, Jan Arne Petersen)


svn path=/trunk/; revision=18539
2007-07-24 15:18:42 +00:00
Matthias Clasen
13277b42e2 Apply a patch by Emmanuele Bassi to limit the number of shown recent
2007-07-20  Matthias Clasen  <mclasen@redhat.com>

        Apply a patch by Emmanuele Bassi to limit the number
        of shown recent files.  (#439715)

        * gtk/gtksettings.c: Add a setting for the number
        of recent files to display by default.

        * gtk/gtkrecentchooserdefault.c:
        * gtk/gtkfilechooserdefault.c: Respect the limit.

        * gtk/gtkrecentmanager.c: Remove the poll timeout in
        dispose, and do not stat more often than every 5 seconds.

        * gtk/gtkrecentchooserutils.c:
        * gtk/gtkrecentchoosermenu.c: Cleanups

        * tests/testrecentchoosermenu.c: Test limits.


svn path=/trunk/; revision=18510
2007-07-20 10:39:03 +00:00
Matthias Clasen
2b5eeba065 Apply a patch by Emmanuele Bassi to add tooltips to the file lists in
2007-07-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c: Apply a patch by Emmanuele
        Bassi to add tooltips to the file lists in recent files and
        search modes.



svn path=/trunk/; revision=18508
2007-07-20 09:53:20 +00:00
Emmanuele Bassi
b38d9cec6b Fix a typo in the previous commit.
2007-06-26  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): Fix
	a typo in the previous commit.

	(shortcuts_append_desktop): Remove unused variable and
	hush the compiler warning.

svn path=/trunk/; revision=18249
2007-06-26 22:26:29 +00:00
Emmanuele Bassi
1bf057fa95 Show the time of last change in the file chooser, for files modified today
2007-06-26  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): Show
	the time of last change in the file chooser, for files
	modified today or yesterday. (#324543)

	* configure.in: Check for localtime_r().

svn path=/trunk/; revision=18248
2007-06-26 20:37:44 +00:00
Xan Lopez
ee0411ae72 Update changelog
svn path=/trunk/; revision=18173
2007-06-17 12:02:42 +00:00
Kristian Rietveld
87ae968f9e gtk/gtk.symbols rename _gtk_file_system_create to gtk_file_system_create
2007-06-13  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtk.symbols
	* gtk/gtkfilesystem.[ch]: rename _gtk_file_system_create to
	gtk_file_system_create to make it public and bring trunk back
	in sync with gtk-2-10.

	* gtk/gtkfilechooserdefault.c (set_file_system_backend): updated.


svn path=/trunk/; revision=18121
2007-06-13 13:51: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
Emmanuele Bassi
f74c473299 Factor out the search shortcut, the recently used shortcut and the
2007-06-06  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c:
	(get_file_info_finished), (shortcuts_insert_path),
	(shortcuts_add_bookmarks), (shortcuts_add_current_folder): Factor
	out the search shortcut, the recently used shortcut and the separator
	from the shortcut selection combo. (#444734)

	(recent_idle_load): Remove the idle source that lazily loads the
	recently used files, if the GtkRecentManager returns an empty
	list. (#443913)

svn path=/trunk/; revision=18063
2007-06-06 16:07:03 +00:00
Emmanuele Bassi
7ec6f9375c Fix to update the file chooser entry
Return after setting the file chooser entry instead of falling through. Also
remove the handling for the search and recent files operation modes, since
they don't have a location entry to update.

svn path=/trunk/; revision=17983
2007-05-30 12:27:47 +00:00
Carlos Garnacho
7bb7cfb293 Refactor GtkFileChooserDialog sizing.
2007-05-18  Carlos Garnacho  <carlos@imendio.com>

        Refactor GtkFileChooserDialog sizing.

        * gtkfilechooserembed.[ch] (delegate_get_resizable_hints)
        (_gtk_file_chooser_embed_get_resizable_hints):
        s/resizable_hints/resizable/, return just one boolean value to
        determine whether the filechooser should be resizable or not.

        * gtkfilechooserprivate.h (struct GtkFileChooserDialogPrivate): remove
        variables related to the GtkFileChooserEmbed get_default_size() and
        get_resizable() implementations.
        (struct GtkFileChooserDefault): Move default size management here.

        * gtkfilechooserdefault.c (gtk_file_chooser_default_size_allocate):
        Added, store currently allocated size to calculate default size later.
        (gtk_file_chooser_default_get_resizable_hints):
        s/resizable_hints/resizable/.
        (gtk_file_chooser_default_set_property): Reload settings if the file
        chooser action changes, this way the save expander state will be known
        before mapping the window, avoiding wrong window positioning and
        flickering. (#424299, #424309)
        (find_good_size_from_style): Only get size from style if it wasn't set
        previously.
        (gtk_file_chooser_default_get_default_size): return default size based
        on stored default size and preview/extra widget sizes.

        * gtkfilechooserdialog.c (file_chooser_widget_update_hints)
        (file_chooser_widget_realized_size_changed)
        (file_chooser_widget_unrealized_size_changed): simplified to
        (file_chooser_widget_size_changed): set window size and resizability
        based on the GtkFileChooserEmbed interface implementation. (Bug
        #420285, Tomeu Vizoso)
        (gtk_file_chooser_dialog_map): force a dialog size change, so it's
        clamped for sure to the 75% of the screen size.


svn path=/trunk/; revision=17859
2007-05-18 10:38:42 +00:00
Kristian Rietveld
a09b7359f5 remove dangling semicolon, fixes the segfault ebassi was seeing earlier
2007-05-14  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkfilechooserdefault.c (recent_column_path_sort_func): remove
	dangling semicolon, fixes the segfault ebassi was seeing earlier today
	;)


svn path=/trunk/; revision=17848
2007-05-14 21:36:24 +00:00
Emmanuele Bassi
59120d8bfd Convert the GtkTreeIter inside the sorting functions for the search and
2007-05-14  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c:
	Convert the GtkTreeIter inside the sorting functions for the
	search and recent modes. This doesn't yet fix the segfault when
	clicking the 'Name' column in recent mode, though.

svn path=/trunk/; revision=17843
2007-05-14 10:16:07 +00:00
Emmanuele Bassi
32f42f446a GtkFileChooser search fixes and recent files support. (#435342)
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	GtkFileChooser search fixes and recent files support.  (#435342)
	
	* gtk/gtkfilechooserdefault.c: Support drag and drop for
	adding shortcuts of folders when in search or recent files
	mode.

svn path=/trunk/; revision=17829
2007-05-11 19:44:32 +00:00
Emmanuele Bassi
dfff0c0a14 GtkFileChooser search fixes and recent files support. (#435342)
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	GtkFileChooser search fixes and recent files support.  (#435342)

	* gtk/gtkfilechooserprivate.h:
	* gtk/gtkfilechooserdefault.c: Follow the sorting order of
	the GtkTreeView displaying the files list.

	(shortcuts_get_index), (shortcuts_insert_separator),
	(shortcuts_model_create), (shortcuts_combo_filter_func): Remove
	the separator between the Search and the Recently Used shortcuts.

	(list_select_func), (list_icon_data_func), (list_name_data_func),
	(list_mtime_data_func): Update the sensitivity of the row
	depending on the GtkFileChooserAction used.

svn path=/trunk/; revision=17828
2007-05-11 19:42:40 +00:00
Emmanuele Bassi
9f2d195367 GtkFileChooser search fixes and recent files support. (#435342)
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	GtkFileChooser search fixes and recent files support.  (#435342)

	* gtk/gtkfilechooserprivate.h:
	* gtk/gtkfilechooserdefault.c: Update the contents of the
	files list when changing the filter of the GtkFileChooserDefault
	widget.

svn path=/trunk/; revision=17827
2007-05-11 19:37:26 +00:00
Emmanuele Bassi
2957c052b8 GtkFileChooser search fixes and recent files support. (#435342)
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	GtkFileChooser search fixes and recent files support.  (#435342)

	* gtk/gtkfilechooserdefault.c: Update the add bookmark button
	sensitivity when in search or recent files mode, and allow
	adding a bookmark for a folder.

svn path=/trunk/; revision=17826
2007-05-11 19:33:38 +00:00
Emmanuele Bassi
588d09cfc0 GtkFileChooser search fixes and recent files support. (#435342)
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	GtkFileChooser search fixes and recent files support.  (#435342)

	* gtk/gtkfilechooserdefault.c: UI fixes in the Search mode: add
	a mnemonic to the label, de-boldify the label's text and assign
	focus to the search entry when switching to the search mode.

	(list_name_data_func): Split the text in both search and recent
	files mode: on the first line use the short name and on the
	second line use the full path.

svn path=/trunk/; revision=17825
2007-05-11 19:30:38 +00:00
Emmanuele Bassi
4078ef567b GtkFileChooser search fixes and recent files support. (#435342)
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	GtkFileChooser search fixes and recent files support.  (#435342)

	* gtk/gtkfilechooserprivate.h:
	* gtk/gtkfilechooserdefault.c: Add support for showing the
	recently used files list as a special shortcut item.

svn path=/trunk/; revision=17824
2007-05-11 19:26:32 +00:00
Emmanuele Bassi
b5d60d48e8 GtkFileChooser search fixes and recent files support. (#435342)
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>
	
	GtkFileChooser search fixes and recent files support.  (#435342)

	* gtk/gtkfilechooserdefault.c: Overall whitespace fixes and
	indentation style consistency.

	(list_row_activated): If the search hit is a folder, follow it
	when activating the row, and switch back to browse mode.

	(search_clear_model), (search_start_query),
	(search_entry_activate_cb), (search_setup_widgets): Remember
	the last query when switching between modes.

svn path=/trunk/; revision=17823
2007-05-11 19:22:38 +00:00
Emmanuele Bassi
ccc3c58ac7 Add key binding for the Search shortcut; default to MOD1+S.
2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkfilechooserdefault.c:
	(_gtk_file_chooser_default_class_init): Add key binding for
	the Search shortcut; default to MOD1+S.

	(search_shortcut_handler): Handle the key binding.

	(search_hit_get_info_cb), (search_add_hit), (search_clear_model),
	(search_setup_model): Retrieve informations on the search hits
	when adding them to the model.

	(list_icon_data_func): Show the search hit icon.

svn path=/trunk/; revision=17822
2007-05-11 19:16:59 +00:00
Emmanuele Bassi
d3aeccf774 Add search file support in the GtkFileChooser. Original patch by Federico
2007-05-02  Emmanuele Bassi  <ebassi@gnome.org>

	Add search file support in the GtkFileChooser. Original patch
	by Federico Mena Quintero; patch updated by Matthias Clasen.
	See bug #344785.

	* gtk/gtksearchengine.[ch]: Private search engine abstraction
	object.

	* gtk/gtksearchenginebeagle.[ch]: Private search engine
	implementation using libbeagle (via g_module_open()).

	* gtk/gtksearchenginesimple.[ch]: Private search engine
	implementation using file tree walking.

	* gtk/gtksearchenginetracker.[ch]: Private earch engine
	implementation using libtracker (via g_module_open()).

	* gtk/gtkquery.[ch]: Private query object for the search
	engines.

	* gtk/gtkfilechooserprivate.h:
	* gtk/gtkfilechooserdefault.c: Use the GtkSearchEngine to
	query a search engine backend using GtkQuery; create a new
	operating mode, OPERATION_MODE_SEARCH, and call the common
	operating mode OPERATION_MODE_BROWSE; add support for virtual
	shortcuts inside the shortcuts model and create a new "Search"
	virtual shortcut.

	* gtk/Makefile.am: Update the build with the new files

svn path=/trunk/; revision=17783
2007-05-02 22:51:43 +00:00
Matthias Clasen
a9423f4964 add a new struct field to clear the file entry after the current folder
2007-05-01  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (struct UpdateCurrentFolderData),
        (update_current_folder_get_info_cb): add a new struct field to clear
        the file entry after the current folder has been updated.

        (gtk_file_chooser_default_update_current_folder),
        (change_folder_and_display_error): Add a new function parameter to
        trigger file entry clearing.

        (edited_idle_create_folder_cb),
        (file_list_drag_data_received_get_info_cb),
        (gtk_file_chooser_default_map),
        (gtk_file_chooser_default_set_current_folder),
        (switch_to_selected_folder), (save_entry_get_info_cb),
        (shortcuts_activate_volume_mount_cb), (shortcuts_activate_volume),
        (shortcuts_activate_get_info_cb), (list_row_activated),
        (path_bar_clicked): use new function parameter appropriately.

        (gtk_file_chooser_default_should_respond): trigger file entry clearing
        after the directory is updated instead of clearing it before, this way
        we avoid reloading the completion model with the soon to be old folder,
        causing a warning and a glitch in the folder where completion happens.
        (#379414, Carlos Garnacho)


svn path=/trunk/; revision=17754
2007-05-01 20:35:33 +00:00
Matthias Clasen
b608b56786 Add a keybinding (C-h) to toggle whether to show hidden files. (#344657,
2007-03-23  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c: Add a keybinding (C-h) to
        toggle whether to show hidden files.  (#344657,
        Wouter Bolsterlee, Priit Laes, et al)



svn path=/trunk/; revision=17557
2007-03-23 05:13:56 +00:00
Matthias Clasen
dabf04423b Add a keybinding to toggle the visibility of the location entry. (#383354,
2007-03-23  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c: Add a keybinding to
        toggle the visibility of the location entry.  (#383354,
        John Pye, patch by Carlos Garnacho)



svn path=/trunk/; revision=17555
2007-03-23 05:06:00 +00:00
Federico Mena Quintero
244bbfa043 Merged from gtk-2-10:
2007-03-15  Federico Mena Quintero  <federico@novell.com>

	Merged from gtk-2-10:

	* gtk/gtkfilechooserdefault.c (find_good_size_from_style):
	PANGO_PIXELS() gives us device units, which are *points* in
	pangocairo's parlance, but we want actual pixels.  So, get the
	screen's resolution to compute the actual number of pixels.
	Fixes bug #418585.

svn path=/trunk/; revision=17530
2007-03-16 00:53:09 +00:00
Kristian Rietveld
10d9b04e74 immediately bail out if current_folder is NULL. (#350988, lots of
2007-03-12  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkfilechooserdefault.c (check_save_entry): immediately
	bail out if current_folder is NULL. (#350988, lots of reporters,
	modified patch by Jan Darmochwal).


svn path=/trunk/; revision=17479
2007-03-12 00:12:25 +00:00
Matthias Clasen
e4d9a1ccc6 Apply a patch by Carlos Garnacho to fix several problems with filechooser
2007-02-26  Matthias Clasen <mclasen@redhat.com>

        Apply a patch by Carlos Garnacho to fix several problems
        with filechooser size handling (#325477, #151169, 143213,
        #153785)

        * gtk/gtkfilechooserdefault.c: Increase NUM_LINES slightly.
        (browse_widgets_create): Don't force the paned position to 200.
        (find_good_size_from_style): Take the size of the extra widget
        into account.

        * gtk/gtkfilechooserdialog.c (file_chooser_widget_update_hints):
        Accept a minimal width parameter. Update all callers.


svn path=/trunk/; revision=17357
2007-02-26 19:45:33 +00:00
Peter Teichman
0177b21959 Save the expanded state of the folder browser with the file chooser
* gtk/gtkfilechooserdefault.c:
* gtk/gtkfilechooserprivate.h:
* gtk/gtkfilechoosersettings.c:
* gtk/gtkfilechoosersettings.h:
Save the expanded state of the folder browser with the file
chooser settings.  Resolves the expander portions of (#153828,
Lemmit Kaplinski)

svn path=/trunk/; revision=17121
2007-01-08 18:34:06 +00:00
Matthias Clasen
846197a5bd Exit early if we can't get file info - this happens if the iter points to
2007-01-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (update_chooser_entry):
        Exit early if we can't get file info - this happens
        if the iter points to the row where we are editing
        the name for a newly created folder.  (#392191, Michael
        Partridge, patch by Kristian Rietveld)



svn path=/trunk/; revision=17046
2007-01-04 01:45:19 +00:00
Matthias Clasen
7979cd6ac7 Move a few settings to gtksettings.c to make sure they show up in the
2006-12-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintoperation-unix.c:
        * gtk/gtkprintbackend.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtksettings.c: Move a few settings to gtksettings.c
        to make sure they show up in the docs.  (#365364, Christian
        Persch)



svn path=/trunk/; revision=16992
2006-12-31 05:54:46 +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
Christian Persch
fc3b484688 Don't make the "Location" label bold. Bug #372449.
2006-11-08  Christian Persch  <chpe@cvs.gnome.org>

	* gtk/gtkfilechooserdefault.c (browse_widgets_create): Don't make
	the "Location" label bold. Bug #372449.
2006-11-08 17:09:24 +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
09f461b01e Make remote bookmarks work better (#354887)
2006-09-22  Matthias Clasen  <mclasen@redhat.com>

	Make remote bookmarks work better (#354887)

	* gtk/gtkfilechooserdefault.c (shortcuts_reload_icons):
	(shortcuts_insert_path):
	* gtk/gtkfilechooserbutton.c (change_icon_theme):
	(model_add_bookmarks):
	(model_update_current_folder):
	(update_label_and_image):
	If the bookmark points to a remote file, don't call get_info(),
	since that may a) take a long time and b) pop up an auth dialog.
	Instead, just use a folder icon and create a display name
	from the uri.

	* gtk/gtkfilechooserdefault.c (_gtk_file_chooser_label_for_uri):
	New function to create a suitable display name for a remote
	uri. This should really be done in GtkFileSystem.
2006-09-22 16:11:04 +00:00
Matthias Clasen
19063333ad Display an error when we come to the root.
2006-09-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
	Display an error when we come to the root.
2006-09-19 14:18:18 +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
f270f2250f if setting the given folder failed, try setting the parent folder until we
2006-09-04  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
	if setting the given folder failed, try setting the parent folder
	until we succeed; display an error box at the end.
2006-09-04 20:09:08 +00:00
Kristian Rietveld
023cb79cd2 change file_exists_and_is_not_folder checks to get the file info for the
2006-09-03  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkfilechooserdefault.c (save_entry_get_info_cb),
	(file_exists_get_info_cb), (gtk_file_chooser_default_should_respond):
	change file_exists_and_is_not_folder checks to get the file info
	for the path directly instead of querying the current file folder
	of the save entry.

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault): add
	new field.

	* tests/autotestfilechooser.c (wait_for_idle_idle), (wait_for_idle),
	(test_reload_sequence), (test_button_folder_states_for_action): wait
	for idle after setting a folder to ensure the async operations to load
	the folder are finished,
	(test_confirm_overwrite), (test_confirm_overwrite_for_path):
	factor out test_confirm_overwrite code so we can add tests for more
	paths more easily.
2006-09-03 20:47:54 +00:00
Kristian Rietveld
254b684e4c First part of file chooser fixes.
2006-09-02  Kristian Rietveld  <kris@imendio.com>

	First part of file chooser fixes.

	* gtk/gtkfilechooserbutton.c (model_add_special): also set the
	handle in the model for the desktopdir case.

	* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder): free
	volume in case we retrieved it but don't pass it on to insert_path,
	(shortcuts_model_create): change the column type for the handles
	to pointer instead of GObject so our handle ref counting is not
	disturbed,
	(show_and_select_paths_finished_loading): don't forget to unref
	the dialog.

	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_class_init),
	(gtk_file_system_unix_init), (gtk_file_system_unix_dispose):
	remove pending execute_callbacks_idle during dispose, also
	execute all callbacks waiting to be run in the next idle,
	(queue_*callback), (execute_callbacks_idle): refactor to maintain
	a list of callbacks to call per file system instead of globally,
	guard the file system during callback invocation,
	(gtk_file_system_unix_get_folder): only add load folder idle if
	none has been added yet.
2006-09-02 14:26:12 +00:00
Federico Mena Quintero
ad0ca3897b Enable "/" and "~" as bindings to activate the location entry again. Fixes
2006-08-17  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c
	(_gtk_file_chooser_default_class_init): Enable "/" and "~" as
	bindings to activate the location entry again.  Fixes bug #340856.
	(tree_view_keybinding_cb): Likewise.
	(trap_activate_cb): Likewise.
	(location_popup_handler): Handle the "path" argument again; set it
	as the text on the location entry.
	(location_set_user_text): New helper function.
	(load_setup_timer): Fix comment.

	* tests/autotestfilechooser.c (main): Oops, enable all the tests again.
2006-08-17 21:31:08 +00:00
Federico Mena Quintero
3f498adfb0 Fix https://bugzilla.novell.com/show_bug.cgi?id=184875 - make the location
2006-07-18  Federico Mena Quintero  <federico@novell.com>

	Fix https://bugzilla.novell.com/show_bug.cgi?id=184875 - make the
	location entry in Save mode preserve the stuff from
	set_filename(); it was overwriting it with $cwd.

	This is the same fix for
	http://bugzilla.gnome.org/show_bug.cgi?id=347066

	* tests/autotestfilechooser.c: (test_black_box): Added black-box
	test for set_filename() and set_current_name().

	* gtk/gtkfilechooser.c (gtk_file_chooser_get_type): Cast to
	GClassInitFunc in the call to g_type_register_static_simple(), to
	avoid a compiler warning.

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault):
	Added a browse_files_last_selected_name field.  We'll copy the
	logic from gtkfilesel.c to see when to clear the location entry.
	(struct _GtkFileChooserDefault): Removed the
	processing_pending_selections field.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
	Free impl->browse_files_last_selected_name.
	(pending_select_paths_process): Don't use
	impl->processing_pending_selections.
	(update_chooser_entry): Keep track of the name that was last
	selected in the file list.  We use this to know when to clear the
	location entry.  The logic is similar to that of
	gtkfilesel.c:gtk_file_selection_file_changed().  This also lets us
	get rid of the processing_pending_selections flag.
	(update_chooser_entry): Clear the entry if we didn't have a
	selection before.
	(location_switch_to_filename_entry): Do not set $cwd as the
	contents of the location entry here...
	(location_popup_handler): ... but do it here instead, only as the
	result of the user asking to turn on the location entry.
	(gtk_file_chooser_default_get_paths): If the location entry is
	empty, do the fallback of seeing if it is sensible to say that
	$cwd is the selected path.
	(gtk_file_chooser_default_update_current_folder): Don't set the
	text of the location entry; this is no longer needed with the
	fixes above.
	(shortcuts_activate_iter): Clear the location entry when
	activating a shortcut if we are not in SAVE mode.  This keeps the
	contents of the location entry consistent even when switching
	folders via the shortcuts.
2006-07-18 16:36:19 +00:00
Matthias Clasen
c3741c0038 Mark the text of the location label as translatable.
2006-07-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (browse_widgets_create): Mark
	the text of the location label as translatable.
2006-07-17 03:17:24 +00:00
Matthias Clasen
f8794cccca Improve consistency of signal and property names 2006-07-06 05:14:03 +00:00
Matthias Clasen
894b902206 Avoid a near-duplicate string and add some translator comments. (#345320,
2006-06-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c:
	Avoid a near-duplicate string and add some
	translator comments.  (#345320, #345321, Hendrik Richter)
2006-06-19 17:43:59 +00:00
Matthias Clasen
2b125d2284 Avoid a near-duplicate string. (#345320, Hendrik Richter)
2006-06-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_add_shortcut_folder):
	Avoid a near-duplicate string.  (#345320, Hendrik Richter)
2006-06-19 17:40:43 +00:00
Matthias Clasen
8d22851ae6 Add support for pasting filenames into the filechooser. (#153212, Bastian
2006-06-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Add support for pasting
	filenames into the filechooser.  (#153212, Bastian Nocera)
2006-06-12 15:11:39 +00:00
Matthias Clasen
854b26a441 Turn off profiling 2006-06-08 19:20:12 +00:00
Kristian Rietveld
c0ec5cedd8 put the newly selected row(s) the in the middle of the view,
2006-05-16  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkfilechooserdefault.c
	(show_and_select_paths_finished_loading): put the newly selected
	row(s) the in the middle of the view,
	(update_current_folder_get_info_cb),
	(gtk_file_chooser_default_update_current_folder): make sure reload
	state is set to RELOAD_HAS_FOLDER while loading the new folder,
	so _map() won't start loading the current working directory. (Fixes
	#341028, reported by Michael Natterer).
2006-05-16 12:34:01 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
9b62142d44 Fix some typos in messages. (#341091, Tino Meinen)
2006-05-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_add_shortcut_folder):
	* gtk/gtktextbufferserialize.c (parse_attr_element): Fix some typos in
	messages.  (#341091, Tino Meinen)
2006-05-09 02:25:46 +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
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +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
Matthias Clasen
a560c6ba97 Handle double queuing, rather than asserting that it does not happen.
2006-03-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (queue_edited_idle): Handle
	double queuing, rather than asserting that it does not
	happen.  (#330617)
2006-03-29 05:35:00 +00:00
Federico Mena Quintero
712dc6b8da Cancel drags when the grabs get broken. Fixes bug #333056:
2006-03-07  Federico Mena Quintero  <federico@novell.com>

	Cancel drags when the grabs get broken.  Fixes bug #333056:

	* gtk/gtkdnd.c (gtk_drag_selection_received): The time argument is
	a guint, not guint32.
	(gtk_drag_source_event_cb): Return gboolean, not gint.
	(gtk_drag_anim_timeout): Likewise.
	(gtk_drag_motion_cb): Likewise.
	(gtk_drag_key_cb): Likewise.
	(gtk_drag_button_release_cb): Likewise.
	(gtk_drag_abort_timeout): Likewise.
	(gtk_drag_begin_internal): Connect to "grab-broken-event" on the
	ipc_widget.
	(gtk_drag_source_info_destroy): Disconnect from the
	"grab-broken-event" callback.
	(gtk_drag_end): Likewise.
	(gtk_drag_grab_broken_event_cb): New callback.  We cancel the drag
	if the grab was broken and not regrabbed by the DnD code.

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

	* gtk/gtkfilechooserdefault.c (shortcuts_button_press_event_cb):
	Hack to let the treeview's button-press-event handler run before
	ours.  This lets the selection be updated before we pop up a
	context menu.
2006-03-07 17:48:07 +00:00
Federico Mena Quintero
50d9a067bb Make the column header visible, and make it be "_Places". Changed the
2006-02-24  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_list_create): Make the
	column header visible, and make it be "_Places".  Changed the
	accessible object name to Places as well.  Fixes bug #331306.
	(file_pane_create): Do not create the path bar and "create folder"
	button here...
	(browse_widgets_create): ... but create them here instead.  This
	moves the path bar to be above both the hpaned, giving it the full
	width of the dialog.  Fixes bug #327733.
2006-02-25 02:45:57 +00:00
Federico Mena Quintero
bd51b09f77 Fixes bug #328820:
2006-01-27  Federico Mena Quintero  <federico@ximian.com>

	Fixes bug #328820:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up
	the location dialog populated to "/".
	(tree_view_keybinding_cb): Likewise.
	(trap_activate_cb): Likewise.
2006-01-27 17:22:17 +00:00
Dan Winship
967aeb882b On "unix", pop up the "Open Location" window on "~" as well as "/".
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init,
	tree_view_keybinding_cb, trap_activate_cb): On "unix", pop up the
	"Open Location" window on "~" as well as "/". #153213
	(location_entry_create): Fix this so autocompletion still works
	correctly in that case.
(ok'ed by federico)
2006-01-20 19:11:08 +00:00
Federico Mena Quintero
446d1edbdb "event->state & modifiers", not "event->state && modifiers". Patch by
2005-12-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (trap_activate_cb): "event->state &
	modifiers", not "event->state && modifiers".  Patch by Sadrul
	Habib Chowdhury <imadil@gmail.com>.  Fixes bug #323073.
2005-12-06 03:11:43 +00:00
Federico Mena Quintero
62ed8cb115 Fixes the critical warnings from bug #317999, thus fixing the bug
2005-11-28  Federico Mena Quintero  <federico@ximian.com>

	Fixes the critical warnings from bug #317999, thus fixing the bug
	completely:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_paths): In SELECT_FOLDER mode,
	use _gtk_file_chooser_get_current_folder_path() instead of fetching the
	impl->current_folder directly.  The latter may be null if we are
	in RELOAD_NONE state.
2005-11-29 01:15:13 +00:00
Federico Mena Quintero
4ac1632f10 Fix bug #321560, based on a patch by Bogdan Nicula (bogdanni@hotmail.com):
2005-11-28  Federico Mena Quintero  <federico@ximian.com>

	Fix bug #321560, based on a patch by Bogdan Nicula (bogdanni@hotmail.com):

	* gtk/gtkfilechooserdefault.c (up_folder_handler): Don't add the
	current_folder to the pending select paths here; the path bar will
	give it to us now.
	(path_bar_clicked): Add the child_path to the pending select paths
	here.
	(show_and_select_paths): Don't filter out folders.
	(show_and_select_paths): Don't take separate arguments for
	only_one_path and multiple paths.

	* tests/autotestfilechooser.c (test_folder_switch_and_filters):
	New test about preserving the filters when we change folders.
2005-11-28 22:25:03 +00:00
Matthias Clasen
9228dcee29 Make F2 work for renaming bookmarks. (#320822, Jaap A. Haitsma, patch by
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
	F2 work for renaming bookmarks.  (#320822, Jaap A. Haitsma, patch
	by Paolo Borelli)
2005-11-28 14:03:20 +00:00
Tim Janik
fbb2e3f4f5 deprecated floating/sink API and implemented it in terms of the GObject
Wed Nov 23 18:55:47 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkobject.[hc]: deprecated floating/sink API and implemented it
        in terms of the GObject floating/sink API.

        * gtk/gtkaboutdialog.c:
        * gtk/gtkaction.c:
        * gtk/gtkcellview.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcombobox.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkiconview.c:
        * gtk/gtkinvisible.c:
        * gtk/gtkitemfactory.c:
        * gtk/gtklayout.c:
        * gtk/gtkmenu.c:
        * gtk/gtkmenutoolbutton.c:
        * gtk/gtknotebook.c:
        * gtk/gtkprogress.c:
        * gtk/gtkrange.c:
        * gtk/gtkspinbutton.c:
        * gtk/gtkstatusicon.c:
        * gtk/gtktext.c:
        * gtk/gtktextview.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktreeitem.c:
        * gtk/gtktreeview.c:
        * gtk/gtktreeviewcolumn.c:
        * gtk/gtkuimanager.c:
        * gtk/gtkviewport.c:
        * gtk/gtkwidget.c:
        * gtk/gtkwindow.c:
        ported to use GObject's g_object_ref_sink().

        * gtk/gtkcolorsel.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkaboutdialog.c:
        fixed compiler warnings.
2005-11-23 18:06:58 +00:00
Federico Mena Quintero
c100ebd2da Do not check whether the path is a folder. It is useful to bookmark files
2005-11-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Do not
	check whether the path is a folder.  It is useful to bookmark
	files as well (e.g. todo.txt), and this will also help
	performance.
	(shortcuts_add_bookmark_from_path): Likewise.
	(shortcuts_activate_iter): Change folders or select files, as
	appropriate.
2005-11-11 22:29:09 +00:00
Federico Mena Quintero
287dee48be Only get the base path of the volume if it is mounted.
2005-11-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
	the base path of the volume if it is mounted.
2005-11-11 19:29:44 +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
0c7e1c1624 Don't looks the bookmark label when reordering. (#320720, Jeremy Cook)
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_reorder): Don't
	looks the bookmark label when reordering.  (#320720, Jeremy Cook)
2005-11-07 20:31:10 +00:00
Federico Mena Quintero
647ba5b40d Fixes bug #317999:
2005-10-18  Federico Mena Quintero  <federico@ximian.com>

	Fixes bug #317999:

	* tests/autotestfilechooser.c
	(test_button_folder_states_for_action): Test that we have either
	$cwd or the explicitly-set folder.
	(test_reload_sequence): Likewise.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_current_folder): If our reload_state
	is RELOAD_EMPTY, return a GtkFilePath corresponding to $cwd.
2005-10-19 16:25:42 +00:00
Tommi Komulainen
8ad0abb867 Add ALREADY_EXISTS error code. Return an error code when the shortcut
2005-10-10  Tommi Komulainen  <tommi.komulainen@iki.fi>

	* gtk/gtkfilechooser.h (GtkFileChooserError): Add ALREADY_EXISTS error
	code.
	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_add_shortcut_folder): Return an error code
	when the shortcut already exists in the sidebar.  (#147521)
2005-10-10 14:29:03 +00:00
Matthias Clasen
6592f00a6d fix includes 2005-10-07 20:03:36 +00:00
Michael Natterer
cab26ded6f remove some explicit #defines of PROFILE_FILE_CHOOSER because they break
2005-10-07  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkfilechooserdefault.c: remove some explicit #defines of
	PROFILE_FILE_CHOOSER because they break compilation after the
	removal of <unistd.h>.
2005-10-07 18:51:30 +00:00
Matthias Clasen
5b2d546e9f Remove a redundant (and unconditional) include of unistd.h (#318211,
2005-10-07   Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c: Remove a redundant (and
        unconditional) include of unistd.h  (#318211, Kazuki Iwamoto)
2005-10-07 16:20:37 +00:00
Federico Mena Quintero
1155f0b3e5 Take a shortcut position, not a ShortcutsIndex, to make the function more
2005-10-04  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (switch_to_shortcut): Take a
	shortcut position, not a ShortcutsIndex, to make the function more
	generic.
	(home_folder_handler): Pass the resolved index to
	switch_to_shortcut(), rather than just SHORTCUTS_HOME.
	(desktop_folder_handler): Likewise for SHORTCUTS_DESKTOP.
	(gtk_file_chooser_default_class_init): Add a "quick-bookmark"
	binding signal, and bind it to Alt-1, Alt-2. ..., Alt-0.  These
	make the respective key switch to the first, second, ..., tenth
	bookmark.
	(quick_bookmark_handler): Implement.
2005-10-05 05:05:42 +00:00
Federico Mena Quintero
5a65996333 Don't special-case Home and Desktop; just use their real names on the file
2005-10-04  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkpathbar.c (get_dir_name): Don't special-case Home and
	Desktop; just use their real names on the file system for the
	user-visible names.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_class_init): Add a "desktop-folder"
	binding signal, and bind it to M-d by default.
	(desktop_folder_handler): Implement the default handler.
	(home_folder_handler): Use a helper function.
	(switch_to_shortcut): New helper function.
	(shortcuts_append_home): Don't special-case the name of "Home";
	just use the folder name.
2005-10-04 20:08:32 +00:00
Federico Mena Quintero
3e9f549d3b New file with a set of tests for GtkCellRendererText. The idea is to run a
2005-09-28  Federico Mena Quintero  <federico@ximian.com>

	* tests/testcellrenderertext.c: New file with a set of tests for
	GtkCellRendererText.  The idea is to run a text renderer through
	most of its interesting property values to see that it works
	correctly.

	* tests/Makefile.am: Added testcellrenderertext.

	* gtk/gtkfilechooserdefault.c (load_set_model): Mark the
	entry/exit of this function for profiling.
	(gtk_file_chooser_default_style_set): Mark the start/end of the
	calls to the parent class and the the signal emission for profiling.
2005-09-29 00:19:32 +00:00
Federico Mena Quintero
72851a22cd Don't reload the current folder unnecessarily on ::map().
2005-09-27  Federico Mena Quintero  <federico@ximian.com>

	Don't reload the current folder unnecessarily on ::map().

	* gtk/gtkfilechooserprivate.h (ReloadState): New enum to represent
	the reloading state.
	(struct _GtkFileChooserDefault): Added a "reload_state" field.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
	Initialize impl->reload_state.
	(gtk_file_chooser_default_map): Check the impl->reload_state; load
	a default folder if no folder has been set, or reload the current
	one only if we had been unmapped first.
	(gtk_file_chooser_default_update_current_folder): Set the
	reload_state to RELOAD_HAS_FOLDER.
	(gtk_file_chooser_default_unmap): Implement, and set the
	reload_state to RELOAD_WAS_UNMAPPED.
	(shortcuts_model_create): Don't call shortcuts_add_bookmarks()
	here; they'll get (re)loaded on ::map() anyway.

	* gtk/gtkfilechooserwidget.c
	(gtk_file_chooser_widget_constructor): Don't set a default folder here.

	* tests/autotestfilechooser.c (test_action_widgets): Don't take in
	a dialog; build it ourselves.
	(test_reload): New test to ensure that we don't load the default
	folder more than once, and that we reload it when
	unmapping/remapping.
	(get_impl_from_dialog): New utility function.
	(test_widgets_for_current_action): Use get_impl_from_dialog().
2005-09-27 23:57:09 +00:00
Federico Mena Quintero
58a2a79682 Mark the entry/exit of this function for profiling. (check_icon_theme):
2005-09-27  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_constructor): Mark the entry/exit of
	this function for profiling.
	(check_icon_theme): Likewise.
	(change_icon_theme): Likewise.
	(settings_notify_cb): Likewise.
	(gtk_file_chooser_default_screen_changed): Likewise.
	(update_chooser_entry): If the selection is empty, clear the file
	name entry only if we are in CREATE_FOLDER mode.  In SAVE mode,
	nothing will be selected when the user starts typeahead in the
	treeview, and we don't want to clear the file name entry in that
	case --- the user could be typing-ahead to look for a folder name.
	Fixes bug #308332, patch by Jürg Billeter.
2005-09-27 21:33:24 +00:00
Federico Mena Quintero
e9465843db Do not create the save mode-specific widgets in the open modes, so that we
2005-09-26  Federico Mena Quintero  <federico@ximian.com>

	Do not create the save mode-specific widgets in the open modes, so
	that we don't carry their baggage around.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_constructor): Don't create the
	save_widgets here.
	(save_widgets_create): Set the impl->save_widgets directly here,
	instead of passing the widgets back to the caller.  Also, pack
	them into the impl's box.
	(update_appearance): Create or destroy the save widgets as
	appropriate.  Set the action of the save_file_name_entry here.
	(shortcuts_add_current_folder): Set the active item in the
	save_folder_combo only if it exists.
	(gtk_file_chooser_default_set_property): Don't set the action of
	the save_file_name_entry here.
	(gtk_file_chooser_default_update_current_folder): Set the base
	folder of the save_file_name_entry only if the entry exists.
	(shortcuts_drag_data_received_cb): Cast the selection_data->data
	to (const char *) since that's what shortcuts_drop_uris() expects.
	(file_list_drag_data_received_cb): Likewise, for
	g_uri_list_extract_uris().
2005-09-27 01:34:24 +00:00
Federico Mena Quintero
329bc4e221 Start a set of automated tests for the file chooser. The only test in
2005-09-15  Federico Mena Quintero  <federico@ximian.com>

	* tests/autotestfilechooser.c: Start a set of automated tests for
	the file chooser.  The only test in there right now doesn't pass
	yet.  It specifies the intended behavior of the first optimization
	of a series which I'll do on the file chooser (see
	http://primates.ximian.com/~federico/news-2005-09.html#14 for the
	details of this optimization).

	* tests/Makefile.am: Added autotestfilechooser.c.

	* gtk/gtkfilechooserprivate.h (struct
	_GtkFileChooserDialogPrivate): Move all the file chooser's private
	structures to here, so that they can be accessed by
	tests/autotestfilechooser.c:  _GtkFileChooserDialogPrivate,
	_GtkFileChooserWidgetPrivate, LoadState, _GtkFileChooserDefault.

	* gtk/gtkfilechooserdialog.c: See above.

	* gtk/gtkfilechooserwidget.c: See above.

	* gtk/gtkfilechooserdefault.c: See above.
2005-09-15 21:51:31 +00:00
Federico Mena Quintero
14bcc53ec5 Add an easy-to-find profiling marker when starting to create a file
2005-09-14  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): Add
	an easy-to-find profiling marker when starting to create a file
	chooser.
	(browse_files_model_finished_loading_cb): Likewise, for when the
	chooser is finished loading.
2005-09-15 00:59:16 +00:00
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +00:00
Matthias Clasen
af89d145f7 Use gdk_atom_intern_static_string() where appropriate.
* gtk/*.c:  Use gdk_atom_intern_static_string() where
	appropriate.
2005-09-11 05:48:27 +00:00
Alexander Larsson
fa0b788dde Handle base_path being null in the rest of the cases (#310270)
2005-09-02  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkfilechooserdefault.c: (shortcuts_add_volumes),
	(shortcuts_activate_volume):
	Handle base_path being null in the rest of the cases (#310270)
2005-09-02 13:33:06 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Matthias Clasen
d0ef4dec81 Fix a C99ism. (#314262, Robert Jeff Mitchell)
2005-08-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_append_desktop): Fix a
	C99ism.  (#314262, Robert Jeff Mitchell)
2005-08-23 12:48:05 +00:00
Matthias Clasen
cbd1435c88 When using gtk_dialog_run() for modal dialogs, make sure to inherit the
2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: When using gtk_dialog_run() for
	modal dialogs, make sure to inherit the window group from
	the parent, since we don't inherit window groups across
	transient parents currently.  (#312918, Christian Persch)

	* gtk/gtkmessagedialog.c (gtk_message_dialog_new):
	* gtk/gtkdialog.c (gtk_dialog_run): Slight update to the docs.
2005-08-15 18:17:01 +00:00
Matthias Clasen
2b40fb4fd9 Work around some problems with the gnome-vfs backends which could lead to
2005-08-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Work around some problems
	with the gnome-vfs backends which could lead to crashes
	in the bookmark handling.  (#310270, Diego Gonzalez, patch
	by Michael Meeks)
2005-08-12 03:03:44 +00:00
Matthias Clasen
98a1367afe Fix up includes on Win32. (#311630, Kazuki Iwamoto)
2005-07-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Fix up includes on Win32.
	(#311630, Kazuki Iwamoto)
2005-07-26 18:43:27 +00:00
Federico Mena Quintero
d06ef3be88 Clarify the usage of this function. (gtk_file_chooser_set_uri): Likewise.
2005-07-21  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooser.c (gtk_file_chooser_set_filename): Clarify
	the usage of this function.
	(gtk_file_chooser_set_uri): Likewise.
	(gtk_file_chooser_set_current_name): Likewise.

	* gtk/gtkfilechooserdefault.c (set_file_system_backend):
	Instrument this function for profiling as well.
	(gtk_file_chooser_default_init): Likewise; just to have a marker
	of where instance initialization begins.
2005-07-22 02:54:24 +00:00
Federico Mena Quintero
78d3db9fad Added a few utility functions for profiling; instrument the code, make it
2005-07-19  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c: Added a few utility functions for
	profiling; instrument the code, make it conditional.
2005-07-20 02:11:37 +00:00
Federico Mena Quintero
55fe917aad Take the parent folder path instead of the display name, to avoid doing
2005-07-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(should_respond_after_confirm_overwrite): Take the parent folder
	path instead of the display name, to avoid doing duplicated work
	in gtk_file_chooser_default_should_respond().
2005-07-15 15:06:52 +00:00
Federico Mena Quintero
0f18ef8887 Take the display name of the folder as well so that we can present a
2005-07-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(confirm_dialog_should_accept_filename): Take the display name of
	the folder as well so that we can present a better message.  Use a
	stock cancel button, "_Replace", and GTK_STOCK_SAVE_AS.
	(gtk_file_chooser_default_should_respond): Pass the file part and
	folder display name directly to the function above.  Oops, only do
	the confirmation dialog if the file exists.
2005-07-15 13:50:54 +00:00
Federico Mena Quintero
dfda674070 Use header capitalization for the buttons, per the HIG.
2005-07-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c
	(confirm_dialog_should_accept_filename): Use header capitalization
	for the buttons, per the HIG.
2005-07-15 06:16:20 +00:00
Federico Mena Quintero
fb7d6ac4fd Add overwrite confirmation for SAVE mode. Fixes bug #152850:
2005-07-14  Federico Mena Quintero  <federico@ximian.com>

	Add overwrite confirmation for SAVE mode.  Fixes bug #152850:

	* gtk/gtkfilechooser.h: Add prototypes for
	gtk_file_chooser_set/get_do_overwrite_confirmation().
	(GtkFileChooserConfirmation): New enum for the result of the
	"confirm-overwrite" signal.

	* gtk/gtkmarshalers.list: Add ENUM:VOID.

	* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Add a
	"do-overwrite-confirmation" boolean property.
	(gtk_file_chooser_set_do_overwrite_confirmation): Implement.
	(gtk_file_chooser_get_do_overwrite_confirmation): Implement.
	(confirm_overwrite_accumulator): New accumulator for the signal.

	* gtk/gtkfilechooserutils.h (GtkFileChooserProp): Add
	GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION.

	* gtk/gtkfilechooserutils.c
	(_gtk_file_chooser_install_properties): Override the
	do-overwrite-confirmation property.

	* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserIface): Add a
	confirm_overwrite signal to the vtable.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_property): Handle the new property.
	(gtk_file_chooser_default_get_property): Likewise.
	(get_selected_file_info_from_file_list): New helper function; code
	taken from list_selection_changed().
	(list_selection_changed): Use get_selected_file_info_from_file_list().
	(should_respond_after_confirm_overwrite): New function.
	(gtk_file_chooser_default_should_respond): Confirm when necessary.
2005-07-15 04:55:56 +00:00
Matthias Clasen
1df38871e1 Implement Drag-and-Drop to the file list. (#145121, Sven Neumann)
2005-07-07  Matthias Clasen  <mclasen@redhat.com>

	Implement Drag-and-Drop to the file list.  (#145121, Sven Neumann)

	* gtk/gtkfilechooserdefault.c (file_list_drag_data_received_cb)
	(file_list_drag_drop_cb, file_list_drag_motion_cb): New functions
	to handle drag-and-drop on the file list.
	(create_file_list): Set up drag-and-drop handlers on the file list.
2005-07-07 17:11:26 +00:00
Matthias Clasen
8cc4fe41ff Fix #157787, reported by Jonathan Blandford:
2005-07-07  Matthias Clasen  <mclasen@redhat.com>

	Fix #157787, reported by Jonathan Blandford:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_set_current_folder): Don't leave a
	"trail" behind when set_current_folder is called explicitly.
	(gtk_file_chooser_default_update_current_folder): New function
	that is called to update the current folder in response to
	user actions.

	* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Add a boolean
	keep_trail argument, and don't leave a "trail" behind unless
	it is set.
2005-07-07 12:40:50 +00:00
Manish Singh
be53636ec1 remove unused variable.
Thu Jun 16 15:33:42 2005  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkcursor-x11.c (update_cursor): remove unused variable.

        * gdk/x11/gdkwindow-x11.c (_gdk_x11_window_get_cursor): use
        g_return_val_if_fail.

        * gtk/gtkdnd.c (gtk_drag_get_cursor): initialize hot_x and hot_y
        for all cases.

        * gtk/gtkfilechooserdefault.c (button_new): gtk_button_set_image
        takes a GtkWidget, not a GtkImage.
2005-06-16 22:35:45 +00:00
Matthias Clasen
2ee17f4875 Simplify the code and respect the show-button-images setting. (#307941,
2005-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (button_new): Simplify
	the code and respect the show-button-images setting.
	(#307941, Vincent Noel)
2005-06-16 16:44:08 +00:00
Federico Mena Quintero
cd3c641ce4 Merged from gtk-2-6:
2005-06-14  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fix #302087:

	* gtk/gtkfilechooserdefault.c (list_selection_changed): Emit
	"selection-changed" and do the normal housekeeping even if we are
	in SAVE mode and there is nothing selected.  We didn't emit that
	signal if we were in SAVE mode and unselect_all() got called.
	(gtk_file_chooser_default_unselect_all): Call
	pending_select_paths_free() so that we cancel any asynchronous
	selections.
	(gtk_file_chooser_default_set_current_name): Likewise.
2005-06-15 01:03:21 +00:00
Federico Mena Quintero
fb323cfb0c Merged from gtk-2-6:
2005-06-14  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fixes #307640:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_should_respond): Oops, I broke SAVE
	mode.  If the parent path is a folder, only create a subfolder if
	we are in CREATE_FOLDER mode; if we are in SAVE mode, just return
	and respond.  Also, pick up the case where the user types
	"dirname/" instead of "dirname".
	(check_save_entry): Make the return type void.  Add some return
	parameters so that we can do more thorough checking.
	(gtk_file_chooser_default_get_paths): If the file part is empty
	and we are in SAVE mode, return an empty selection.
2005-06-14 23:30:12 +00:00
Federico Mena Quintero
ab44ea2b8c Merged from gtk-2-6:
2005-06-10  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fixes #162358:

	* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't return
	immediately if we are in CREATE_FOLDER mode, so that we can fill
	the entry with the newly-selected folder.
	(gtk_file_chooser_default_set_property): Warn against turning on
	multiple selection for CREATE_FOLDER mode, or about setting that
	action while multiple selection is on.
	(update_chooser_entry): Change the entry's contents as well if we
	are in CREATE_FOLDER mode.  If nothing is selected, clear the
	chooser entry.
	(trap_activate_cb): Don't trap enter/space if modifiers are
	pressed.  This lets one use Ctrl-space to toggle rows in multiple
	selection mode.
	(gtk_file_chooser_default_should_respond): Clean up the if-chain
	mess of special cases by using an array to determine what to do.
	Also, for the save-entry case in CREATE_FOLDER mode, actually fix
	the bug where the file chooser would switch to an existing folder
	rather than confirming with it, and create the folder ourselves.
	(error_creating_folder_over_existing_file_dialog): New function.

	* gtk/gtkfilechooserentry.c (check_completion_callback): Only
	insert the common prefix if we are in an "open" mode.  Use a
	helper function.
	(append_common_prefix): New helper function; code moved over from
	check_completion_callback().
	(find_common_prefix): New helper function.
	(gtk_file_chooser_entry_focus): Append the common prefix if the
	user requests it explicitly.
2005-06-10 05:54:28 +00:00
Matthias Clasen
39d710eabe Don't grab the focus away from the file list when operating the filter
2005-05-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (filter_create): Don't grab
	the focus away from the file list when operating the filter
	combo with the pointer.  (#304844, Sven Neumann)
2005-05-23 16:45:57 +00:00
Matthias Clasen
b1f056a802 Remove the no longer needed workaround.
2005-05-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
	Remove the no longer needed workaround.
2005-05-18 16:22:20 +00:00
Matthias Clasen
2763b81fe3 Add a bug reference 2005-05-18 15:24:01 +00:00
Federico Mena Quintero
093b389f6a Merged from gtk-2-6:
2005-05-02  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fixes #301068:

	* gtk/gtkfilesystemunix.c (struct _GtkFileSystemUnix): Add fields
	to store struct stat for /afs and /net, and boolean fields to say
	whether these are valid.
	(struct _GtkFileFolderUnix): Added a boolean is_network_dir field.
	(gtk_file_system_unix_get_folder): Fill in the is_network_dir
	field of the folder structure.
	(fill_in_names): If the folder is a network directory, create a
	fake struct stat for its entries.
	(fill_in_stats): Don't stat() the children of network directories.

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): If the mtime
	is 0, use "Unknown" for the cell's displayed text.
2005-05-03 01:55:33 +00:00
Federico Mena Quintero
d22aa7c0f5 Merged from gtk-2-6:
2005-04-18  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	* gtk/gtkfilechooserdefault.c (remove_selected_bookmarks): Remove
	obsolete assertion that the selected row can't be a volume; this
	is handled by the "removable" column now.  Fixes #301017.
2005-04-18 17:56:57 +00:00
Federico Mena Quintero
9bd53c8683 Merged from gtk-2-6:
2005-04-15  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	* gtk/gtkfilechooserdefault.c (pending_select_paths_process):
	Patch from Christian Neumair <chris@gnome-de.org>; only select the
	first row if we are in OPEN mode.  The only other case we were
	letting pass through was SELECT_FOLDER, but selecting the first
	row when changing folders confuses people when folders are
	actually being selected.  Fixes #171885.
2005-04-15 21:27:27 +00:00
Matthias Clasen
af8b86b8a1 Avoid unaligned access. (#172947)
2005-04-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/updateiconcache.c (write_card16, write_card32): Avoid
	unaligned access.  (#172947)

	* gtk/gtkfilechooserdefault.c (file_list_build_popup_menu):
	Consistently use the term "Bookmarks" in the UI.  (#166906,
	Sebastian Bacher)
2005-04-07 19:10:11 +00:00
Jeroen Zwartepoorte
2b874b2438 Make the preview label ellipsize so the dialog layout stays constant.
2005-03-28  Jeroen Zwartepoorte  <jeroen.zwartepoorte@gmail.com>

	* gtk/gtkfilechooserdefault.c: (update_preview_widget_visibility): Make
	the preview label ellipsize so the dialog layout stays constant.
	(#171398)
2005-03-28 17:18:00 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
dce8bffc7d Implement bookmark renaming (#136216, Sean Middleditch)
2005-03-22  Matthias Clasen  <mclasen@redhat.com>

	Implement bookmark renaming  (#136216, Sean Middleditch)

	* gtk/gtkfilesystem.h (struct _GtkFileSystemIface): Add
	get_bookmark_label and set_bookmark_label vfuncs.

	* gtk/gtkfilesystem.h:
	* gtk/gtkfilesystem.c (gtk_file_system_set_bookmark_label):
	(gtk_file_system_get_bookmark_label): Wrappers for the
	vfuncs.

	* gtk/gtk.symbols: Add new exported symbols.

	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_set_bookmark_label):
	(gtk_file_system_unix_get_bookmark_label): Implementations
	for the Unix backend.

	* gtk/gtkfilechooserdefault.c: Add a context menu to
	the bookmarks pane, and allow to rename bookmarks.
2005-03-22 20:23:19 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
6da29b43a6 gdk/gdkkeyuni.c gdk/gdkpixbuf-drawable.c gdk/gdkrgb.c gdk/x11/gdkdnd-x11.c
2005-03-01  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkkeyuni.c
	* gdk/gdkpixbuf-drawable.c
	* gdk/gdkrgb.c
	* gdk/x11/gdkdnd-x11.c
	* gdk/x11/gdkevents-x11.c
	* gdk/x11/gdkproperty-x11.c
	* gdk/x11/gdkvisual-x11.c
	* gdk-pixbuf/gdk-pixbuf.c
	* gtk/gtkaction.c
	* gtk/gtkbindings.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkcombo.c
	* gtk/gtkcontainer.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilesel.c
	* gtk/gtkgamma.c
	* gtk/gtkiconview.c
	* gtk/gtkinputdialog.c
	* gtk/gtkitemfactory.c
	* gtk/gtkmenu.c
	* gtk/gtktextview.c
	* gtk/gtktooltips.c
	* gtk/gtktreedatalist.c
	* gtk/gtkuimanager.c
	* gtk/tree_minus.xpm
	* gtk/tree_plus.xpm
	* gtk/xdgmime/xdgmime.c
	* gtk/xdgmime/xdgmime.h:
	Move constant data to .rodata.
2005-03-01 06:25:55 +00:00
Matthias Clasen
c78b24e7d3 Unset "focus-on-click" for the save folder combo. (#168688, Sven Neumann)
2005-02-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (save_folder_combo_create):
	Unset "focus-on-click" for the save folder combo.  (#168688,
	Sven Neumann)
2005-02-28 04:25:20 +00:00
Matthias Clasen
59d658187c Don't leak parent_path. (#168435, Morten Welinder)
2005-02-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_select_path):
	Don't leak parent_path.  (#168435, Morten Welinder)
2005-02-24 20:28:26 +00:00
Federico Mena Quintero
1707e510a8 Merged from gtk-2-6:
2005-02-02  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	* gtk/gtkfilechooserdefault.c (pending_select_paths_process):
	Don't select the first row if the chooser is not mapped.  This
	happens when it's acting on behalf of GtkFileChooserButton.  Also,
	don't select the first row if we are in SAVE or CREATE_FOLDER
	modes --- I had missed that (see the ChangeLog entry from
	2005-01-18).  Fixes #165264.
2005-02-02 18:25:27 +00:00
Federico Mena Quintero
4200bed6be Merged from gtk-2-6:
2005-02-01  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	* gtk/gtkfilechooserdefault.c
	(browse_files_model_finished_loading_cb): Don't
	g_assert_not_reached() if we are in any other state.  Another code
	path may have triggered a folder reload.  Fixes #165556.
2005-02-02 00:53:10 +00:00
Federico Mena Quintero
224c47a9b8 Merged from gtk-2-6:
2005-02-01  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fix #165770:

	* gtk/gtkfilechooserdefault.c (FALLBACK_ICON_SIZE): Make the
	fallback size be 16, to be equal to the default for
	GTK_ICON_SIZE_MENU (in gtkiconfactory.c:init_icon_sizes()).
	(change_icon_theme): Use GTK_ICON_SIZE_MENU instead of
	GTK_ICON_SIZE_SMALL_TOOLBAR.
2005-02-01 23:55:44 +00:00
Federico Mena Quintero
9032abed7c Merged from gtk-2-6:
2005-01-27  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_select_path): Oops, don't assert that we
	can't reach the end of the function; this happens if we are still
	loading but don't need a path change.  Fixes #165213.
2005-01-27 20:08:56 +00:00
Federico Mena Quintero
570ad468e0 Removed leftover comments.
2005-01-24  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c: Removed leftover comments.
2005-01-25 01:39:23 +00:00
Federico Mena Quintero
ed30bc0c76 Merged from gtk-2-6:
2005-01-24  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	Fix #147785 and clean up the loading code:

	* gtk/gtkfilechooserdefault.c (LoadState): Make the set of states
	be EMPTY, PRELOAD, LOADING, FINISHED.
	(gtk_file_chooser_default_init): Start in the LOAD_EMPTY state.
	(struct _GtkFileChooserDefault): Added a pending_select_paths
	field.
	(load_remove_timer): Add the new states.
	(load_setup_timer): Likewise.
	(load_timeout_cb): Likewise.  Switch to the LOAD_LOADING state.
	(browse_files_model_finished_loading_cb): Switch to the
	LOAD_FINISHED state.
	(enum PendingOp): Removed.
	(struct _GtkFileChooserDefault): Removed the pending_op and
	pending_select_path fields.
	(pending_select_paths_free): New utility function.
	(pending_select_paths_add): New utility function.
	(gtk_file_chooser_default_finalize): Call
	pending_select_paths_free().
	(pending_op_queue): Removed.
	(pending_op_process): Removed.
	(pending_select_paths_process): New function.
	(browse_files_model_finished_loading_cb): Call
	pending_select_paths_process().
	(center_selected_row_foreach_cb): Handle multiple selection by
	only centering the first row.
	(get_is_file_filtered): Constify.
	(gtk_file_chooser_default_select_path): Queue into a list of paths
	to select if we are not finished loading.
	(show_and_select_paths): New utility function.
	(up_folder_handler): Use pending_select_paths_add().
	(gtk_file_chooser_default_should_respond): Do not call
	pending_op_queue(); free the pending_selected_paths instead.
	(gtk_file_chooser_default_initial_focus): Don't queue a pending
	operation, and don't select the first row unconditionally --- this
	will happen when the folder is done loading.
	(shortcuts_row_activated_cb): Free the pending_select_paths.
	(pending_select_paths_store_selection): New utility function.
	(gtk_file_chooser_default_map): Call
	pending_select_paths_store_selection() to save the selection
	before reloading the folder.
	(select_func): Umm?  Call gtk_tree_selection_select_iter().  Don't
	move the cursor here; it will be done when processing the pending paths.

	* tests/testfilechooser.c (main): Add a button to the command
	window to unmap and remap the file chooser.
2005-01-25 01:35:09 +00:00
Matthias Clasen
895e943360 In save mode, don't return paths containing nonexisting directories.
2005-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_should_respond):
	In save mode, don't return paths containing nonexisting
	directories.  (#162443, Jean Marie Favreau)
2005-01-19 21:05:15 +00:00
Manish Singh
fad37a600e Actually assign PENDING_OP_NONE.
Tue Jan 18 13:56:09 2005  Manish Singh  <yosh@gimp.org>

        * gtk/gtkfilechooserdefault.c (pending_op_queue): Actually assign
        PENDING_OP_NONE.
2005-01-18 21:57:40 +00:00
Federico Mena Quintero
19c564ba25 Merged from gtk-2-6:
2005-01-18  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-6:

	* gtk/gtkfilechooserdefault.c (pending_op_queue): Don't queue an
	operation to select the first file if we are in SAVE or
	CREATE_FOLDER modes.  Executing that operation would overwrite the
	contents of the save-name entry.
2005-01-18 21:45:01 +00:00
Matthias Clasen
a1f0b89d92 Save and restore the selected row in the bookmark list and the save folder
2005-01-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_add_bookmarks): Save
	and restore the selected row in the bookmark list and the
	save folder combo.  (#164290)
2005-01-17 07:05:17 +00:00
Federico Mena Quintero
74f4872211 Add an "Open _Location" item. Fixes #148839.
2005-01-06  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (file_list_build_popup_menu): Add an
	"Open _Location" item.  Fixes #148839.
2005-01-06 20:27:58 +00:00
Federico Mena Quintero
bbea189a4f Fix #161409:
2005-01-05  Federico Mena Quintero  <federico@ximian.com>

	Fix #161409:

	* gtk/gtkfilechooserdefault.c (shortcuts_row_activated_cb): Queue
	a pending operation to select the first row.
2005-01-06 01:53:50 +00:00
Federico Mena Quintero
faaee051d1 Don't call button_data_free() explicitly; the button is weak-reffed and
2005-01-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Don't call
	button_data_free() explicitly; the button is weak-reffed and the
	callback will free the button data.  Fixes #163010.
	(_gtk_path_bar_set_path): Don't ref/sink the button.  And for the
	failure case, call gtk_widget_destroy() on it.

	* gtk/gtkfilechooserdefault.c (check_is_folder): Use
	gtk_file_system_get_folder() again (see the ChangeLog entry from
	2004-08-25).  We can't first get the parent folder and then
	request the info for the path in question, as the parent folder
	may not be readable.  See bug #162617.
	(gtk_file_chooser_default_set_current_folder): Assert that the
	passed-in path is not null.
	(shortcuts_find_current_folder): Likewise.
	(shortcuts_add_current_folder): Likewise.
	(set_list_model): Likewise.
	(gtk_file_chooser_default_map): Only reload the current folder if
	it exists.
	(bookmarks_check_add_sensitivity): Check for the current folder
	being NULL.
	(browse_files_select_first_row): Don't set the cursor if there is
	no model loaded.
2005-01-06 01:46:39 +00:00
Matthias Clasen
9359ede29b Don't construct errors from the GTK_FILE_SYSTEM_ERROR domain. Partial fix
2005-01-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Don't construct errors from
	the GTK_FILE_SYSTEM_ERROR domain. Partial fix for #162911.
	(get_file_info, check_is_folder): Translate errors from
	the filesystem into the GTK_FILE_CHOOSER_ERROR domain. Rest
	of the fix for #162911, noticed by Murray Cumming.
2005-01-05 17:18:01 +00:00
Matthias Clasen
7794fa7f57 Don't construct errors from the GTK_FILE_SYSTEM_ERROR domain. Partial fix
2005-01-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Don't construct errors from
	the GTK_FILE_SYSTEM_ERROR domain. Partial fix for #162911.
2005-01-05 16:57:49 +00:00
Tor Lillqvist
c668f46d9e Add -lole32, needed for CoTaskMemFree in get_special_folder() below.
2005-01-02  Tor Lillqvist  <tml@iki.fi>

	* gtk/Makefile.am (libgtk_target_ldflags): Add -lole32, needed for
	CoTaskMemFree in get_special_folder() below.

	* gtk/gtkfilesystem.h: Implement case-insensitive path compare on
	Win32 using _gtk_file_system_win32_path_compare().

	* gtk/gtk.symbols: Add _gtk_file_system_win32_path_compare.

	* gtk/gtkfilechooserbutton.c (model_add_special)
	* gtk/gtkfilechooserdefault.c (shortcuts_append_desktop): Use
	_gtk_file_system_win32_get_desktop() to get correct Desktop folder
	on Win32. (#144003)

	* gtk/gtkfilesystemwin32.c: Remove unnecessary includes. Do
	consider all drives "mounted", including floppies. Trying to
	inspect the contents of a nonexistent floppy will cause errors
	later that are handled normally, no need to avoid them
	completely. Keep the drive type in the GtkFileSystemVolume.
	Support UNC paths. (#161797) Fix error message capitalizations
	as in gtkfilesystemunix.c.

	(gtk_file_system_win32_init): Start one timeout per
	GtkFileSystemWin32.

	(gtk_file_system_win32_finalize): Remove the timeout.

	(get_special_folder): Copied from GLib.

	(_gtk_file_system_win32_get_desktop): New function, uses
	get_special_folder().

	(gtk_file_system_win32_list_volumes): Don't start a timeout at
	each call to this function. Don't assume A: and B: are floppies.

	(gtk_file_system_win32_get_volume_for_path): Don't assume all
	volumes are drive roots, i.e. support share roots of UNC paths
	(\\server\share).

	(gtk_file_system_win32_get_folder): Don't assume errno is set
	after g_file_test() returns FALSE. It isn't on Win32 (and even on
	Unix I don't think one should assume anything about errno after
	g_file_test()).

	(gtk_file_system_win32_volume_get_is_mounted): Always return TRUE.

	(gtk_file_system_win32_volume_get_display_name): Don't call
	GetVolumeInformation() on drives A: or B: if they are removable,
	as they might then be floppies, causing an unnecessary
	delay. (#157820)

	(gtk_file_system_win32_volume_render_icon): Use network icon for
	unrecognized drive types.

	(canonicalize_filename, gtk_file_system_win32_parse): Don't get
	confused by UNC paths.

	(bookmarks_serialize): Use _gtk_file_system_win32_path_compare()
	for case-insensitive UTF-8 path comparison.

	(extract_icon): Use SHGetFileInfo() which is faster than
	ExtractAssociatedIcon(). Icon extraction is still slow, though,
	needs work.

	(win32_pseudo_mime_lookup): Don't use the same icon for all
	shortcuts or executables. Cache only other file type icons.

	(gtk_file_system_win32_render_icon): Use network stock icon for
	remote drives and UNC server share roots. Compare home directory
	case-insensitively. Do lookup icons also for executable files,
	after all, it's these files that can have individual icons in the
	first place. Yes, it can be slow. Needs work.

	(filename_is_drive_root): Require also the slash after the colon.

	(filename_is_server_share): New function.

	(_gtk_file_system_win32_path_compare): New function, does
	case-folded UTF-8 comparison.

	* gtk/gtkfilesystemwin32.h: Declare
	_gtk_file_system_win32_path_compare().
2005-01-02 23:15:21 +00:00
Matthias Clasen
db4665b45e Use secondary text for error dialogs.
2004-12-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Use secondary text for error
	dialogs.
2004-12-30 07:42:07 +00:00
Matthias Clasen
947fcbbd9f Add missing GDK_THREADS_ENTER/LEAVE.
2004-12-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserentry.c (check_completion_callback)
	(load_directory_callback): Add missing GDK_THREADS_ENTER/LEAVE.

	* gtk/gtkfilechooserdefault.c (edited_idle_cb)
	(shortcuts_drag_outside_idle_cb): Add missing
	GDK_THREADS_ENTER/LEAVE.  (#161604)

	* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb):
	(list_select_func): Don't call gtk_file_info_get_is_folder()
	on NULL.
2004-12-19 04:45:09 +00:00
Matthias Clasen
43f8526198 Don't try to filter if impl->current_filter is NULL. (#161329, R.
2004-12-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (get_is_file_filtered): Don't
	try to filter if impl->current_filter is NULL.  (#161329,
	R. McFarland)
2004-12-15 14:30:53 +00:00
Federico Mena Quintero
9f558a1540 Merged from gtk-2-4:
2004-12-14  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	Fix #145470:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_initial_focus): Queue a pending
	operation to select the first row if we are not finished loading
	yet.
	(gtk_file_chooser_default_class_init): Override GtkWidget::map().
	(gtk_file_chooser_default_map): New ::map() handler; refresh the
	file and bookmark lists.

	* gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_class_init):
	Override GtkWidget::map() and GtkWidget::unmap().
	(gtk_file_chooser_dialog_constructor): Don't call initial_focus()
	here.
	(gtk_file_chooser_dialog_map): Map the file chooser widget if
	needed.  Call initial_focus() here.
	(gtk_file_chooser_dialog_unmap): Unmap the file chooser widget.
	When we are re-mapped, the widget will get mapped as well and it
	will have a chance to refresh.
2004-12-15 01:37:41 +00:00
Matthias Clasen
e83213d06d Apply a patch to reset the filter if an otherwise invisible file is
2004-12-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Apply a patch to reset the
	filter if an otherwise invisible file is selected via the
	location popup.  (#159896, Carlos Garnacho Parro)
2004-12-09 22:06:55 +00:00
Federico Mena Quintero
787ee3e77d Merged from gtk-2-4:
2004-12-08  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	* gtk/gtkfilechooserdefault.c (pending_op_process): Center the
	selected row so that it's easily visible.
2004-12-09 02:12:47 +00:00
Matthias Clasen
be60805ef6 Reinstate the previous behavior for clicking Ok after activating a
2004-12-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_should_respond): 	Reinstate the previous behavior for clicking Ok after
	activating a bookmark or path bar button in folder
	modes.  (#160044, Dennis Cranston)
2004-12-03 03:42:48 +00:00
Federico Mena Quintero
bc63304b92 Merged from gtk-2-4:
2004-12-02  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	Fix #159656:

	* gtk/gtkfilechooserdefault.c (PendingOp): New enumeration for the
	pending operation to perform when finishing loading a folder.
	(struct _GtkFileChooserDefault): New fields 'pending_op' and
	'pending_select_path'.
	(pending_op_queue): New utility function.
	(pending_op_process): New utility function.
	(gtk_file_chooser_default_select_path): Don't select the path
	immediately; delay it until the folder is finished loading.
	(browse_files_model_finished_loading_cb): Process the pending
	operation.
	(browse_files_select_first_row): New utility function.
	(gtk_file_chooser_default_initial_focus): Use
	browse_files_select_first_row().
	(gtk_file_chooser_default_should_respond): Queue an operation to
	select the first row once we load the child folder.
	(up_folder_handler): Queue an operation to select the current
	folder once we load the parent folder.
	(gtk_file_chooser_default_finalize): Free the pending_select_path.
2004-12-02 21:36:14 +00:00
Federico Mena Quintero
d5323addf5 Merged from gtk-2-4:
2004-11-29  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	* gtk/gtkfilechooserdefault.c (trap_activate_cb): Don't handle
	Enter if we are in SELECT_FOLDER or CREATE_FOLDER actions.  This
	lets us navigate thei file system more easily.
	(gtk_file_chooser_default_should_respond): If we are in
	SELECT_FOLDER or CREATE_FOLDER modes, return TRUE if something is
	selected.
2004-11-30 00:00:07 +00:00
Federico Mena Quintero
dc478e8647 Merged from gtk-2-4:
2004-11-20  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	* gtk/gtkfilechooserdefault.c (list_icon_data_func): Set an empty
	icon if we are on the editable row:  if we don't set the cell
	renderer at all, it will reuse the last thing it painted.
2004-11-20 06:21:30 +00:00
Federico Mena Quintero
e44612e7da Merged from gtk-2-4:
2004-11-19  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	Fix #141077.  Based on a patch by Christian Neumair <chris@gnome-de.org>:

	* gtk/gtkfilechooserdefault.c (new_folder_button_clicked):
	Desensitize the "new folder" button.
	(edited_idle_cb): Sensitize the button back.
2004-11-20 02:00:45 +00:00
Federico Mena Quintero
a006f66238 Merged from gtk-2-4:
2004-11-19  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	Fix #158477:

	* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
	Remove the "save_extra_align" and "browse_extra_align" fields; use
	a single "extra_align" field.
	(save_widgets_create): Don't create the save_extra_align.
	(browse_widgets_create): Don't create the browse_extra_align.
	(gtk_file_chooser_default_constructor): Create the extra_align
	here.
	(set_extra_widget): Add the extra widget to the alignment here,
	and remove the old one if necessary.
	(update_appearance): No need to frob the extra widget's alignments
	anymore.
	(gtk_file_chooser_default_set_property): No need to call
	update_appearance() anymore when we set the extra widget.

2004-11-19  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_initial_focus): Don't set the cursor if
	we are still loading.
2004-11-20 01:39:26 +00:00
Federico Mena Quintero
74c146301c Merged from gtk-2-4:
2004-11-18  Federico Mena Quintero  <federico@ximian.com>

	Merged from gtk-2-4:

	Fixes #155744:

	Try to load the whole file system model within a specified time.

	* gtk/gtkfilechooserdefault.c (set_list_model): Don't create and
	set the sort model here.  Instead, set up a timer in which we'll
	try to load the file system model.
	(load_set_model): Create and set the sort model here.
	(load_setup_timer): New function to set up a timer and switch to
	the LOAD_LOADING state.
	(load_remove_timer): New function to unset the timer and switch to
	the LOAD_FINISHED state.
	(browse_files_model_finished_loading_cb): Remove the timer if
	needed and set the file system and sort model; switch to the
	LOAD_FINISHED state.
	(gtk_file_chooser_default_finalize): Remove the load timer.
	(gtk_file_chooser_default_init): Start in the LOAD_FINISHED state.
2004-11-20 00:17:30 +00:00
Manish Singh
60b30ff513 gdk/linux-fb/gdkgc-fb.c gdk/win32/gdkgc-win32.c
Fri Nov 19 14:54:09 2004  Manish Singh  <yosh@gimp.org>

        * gdk/linux-fb/gdkgc-fb.c
        * gdk/win32/gdkgc-win32.c
        * gdk/win32/gdkwindow-win32.c
        * gtk/gtkaboutdialog.c
        * gtk/gtkaction.c
        * gtk/gtkactiongroup.c
        * gtk/gtkcellrendererprogress.c
        * gtk/gtkcellview.c
        * gtk/gtkcolorbutton.c
        * gtk/gtkcombobox.c
        * gtk/gtkcomboboxentry.c
        * gtk/gtkentrycompletion.c
        * gtk/gtkfilechooserbutton.c
        * gtk/gtkmenutoolbutton.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktoggletoolbutton.c
        * gtk/gtktoolbutton.c
        * gtk/gtktoolitem.c
        * gtk/gtktreemodelfilter.c
        * gtk/gtktreeselection.c
        * gtk/gtktreeviewcolumn.c
        * gtk/gtkuimanager.c: get rid of unnecessary casts.

        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property):
        cast away the const for g_value_set_enum. This is after the g_warning,
        so this is a hack to begin with.

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property):
        add a cast to GTK_FILE_CHOOSER for impl here.
2004-11-19 23:18:38 +00:00
Davyd Madeley
b23e4c2349 Allow backspace to move up the FileChooser tree to make it consistent with
2004-11-17  Davyd Madeley  <davyd@madeley.id.au>

        * gtk/gtkfilechooserdefault.c: Allow backspace to move up the
        FileChooser tree to make it consistent with Nautilus and others.
2004-11-16 16:52:17 +00:00
Matthias Clasen
297a55d018 Show files in folder modes. (#157013, Nickolay V. Shmyrev)
2004-11-07  Matthias Clasen  <mclasen@redhat.com>

	Show files in folder modes. (#157013, Nickolay V. Shmyrev)

	* gtk/gtkfilechooserdefault.c (create_file_list): Use a selection
	function to determine which rows can be selected.
	(update_appearance): Always show files. Also queue a redraw.
	(set_list_model): Always show files.
	(list_select_func): The selection function used for the file list.
	Don't allow to select files when in select/create folder mode.
	(list_row_activated): Don't activate files in folder modes.
	(list_icon_data_func, list_mtime_data_func, list_size_data_func):
	Render files insensitive in folder modes.
2004-11-07 05:15:25 +00:00
Matthias Clasen
14ed2beff5 Jump through a few hoops to make the tooltip on the filter combo box work
2004-11-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (file_pane_create): Jump through
	a few hoops to make the tooltip on the filter combo box work
	a bit better. This fixes #157273 and #157074.
2004-11-07 04:10:01 +00:00
Matthias Clasen
ff56295f76 Don't leak the path. (#157301, Carlos Garnacho Parro)
2004-11-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (new_folder_button_clicked):
	Don't leak the path.  (#157301, Carlos Garnacho Parro)
2004-11-04 03:28:23 +00:00
Matthias Clasen
8ab4fd4526 Add a public setting for button ordering (#74669, Owen Taylor)
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	Add a public setting for button ordering (#74669, Owen Taylor)

	* gtk/gtksettings.c (gtk_settings_class_init): Add a
	gtk-alternative-button-order setting.

	* gtk/gtkdialog.h:
	* gtk/gtkdialog.c (gtk_alternative_dialog_button_order): A
	getter for the alternative button order setting.
	* gtk/gtkdialog.c (gtk_dialog_set_alternative_button_order):
	New function to install an alternative button order for a
	dialog.

	* gtk/gtkfilesel.c (gtk_file_selection_init):
	* gtk/gtkfontsel.c (gtk_font_selection_dialog_init):
	* gtk/gtkmessagedialog.c (gtk_message_dialog_add_buttons):
	* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init):
	* gtk/gtkfilechooserdefault.c (location_popup_handler):
	Set up an alternative button order.
2004-10-25 05:43:29 +00:00
Matthias Clasen
6e95002931 Fix the build. 2004-10-24 05:13:24 +00:00
Matthias Clasen
a2997a6065 If the location dialog is brought up by typing '/', insert the slash in
2004-10-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (location_popup_handler): If the
	location dialog is brought up by typing '/', insert the slash
	in the entry.  (#155370, Warren Togami)

2004-10-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (tree_view_keybinding_cb)
	(trap_activate_cb): Accept shift-/ for bringing up the location
	popup, since German and French keyboards generate such
	events.  (#154163, Frederic Crozat)
2004-10-24 04:27:44 +00:00
Matthias Clasen
a811584d01 Use the new file DND api.
2004-10-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_drag_data_received)
	(gtk_file_chooser_button_init): Use the new file DND api.

	* gtk/gtkdnd.h:
	* gtk/gtkdnd.c (gtk_drag_dest_add_uri_targets)
	(gtk_drag_source_add_uri_targets):

	* gtk/gtkselection.h:
	* gtk/gtkselection.c (gtk_target_list_add_uri_targets):
	(gtk_selection_data_set_uris):
	(gtk_selection_data_get_uris): New functions to allow
	handling file DND "without knowing jack shit".

	* configure.in: Bump glib requirement to 2.5.4.

	* gtk/gtkfilechooserdefault.c (shortcuts_drop_uris): Use
	g_uri_list_extract_uris().
2004-10-22 22:50:32 +00:00
Matthias Clasen
98019f4880 (shortcuts_add_current_folder): Don't leak volume. (#155400,
Morten Welinder)
2004-10-14 19:42:31 +00:00
Matthias Clasen
47666976ca (gtk_file_chooser_default_finalize): Don't forget to
unref the tooltips.  (#155412, Morten Welinder)
2004-10-14 19:23:41 +00:00
Matthias Clasen
817f3b94a8 Don't get text unnecessarily. (#155384, Morten Welinder)
2004-10-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_remove_rows): Don't
	get text unnecessarily.  (#155384, Morten Welinder)
2004-10-14 14:14:12 +00:00
Matthias Clasen
356c249aab Set the cell renderer to inert mode to avoid bug #154921. This fixes a
* gtk/gtkfilechooserdefault.c (renderer_edited_cb): Set the cell
	renderer to inert mode to avoid bug #154921.  This fixes a crash
	which would otherwise occur if the editing is stopped for the second
	time.  (#154767, Manuel Baena García)
2004-10-08 17:09:18 +00:00
Matthias Clasen
205d5ce310 Include gtkeventbox.h. (#154798, Morten Welinder)
* gtk/gtkfilechooserdefault.c: Include gtkeventbox.h.
	(#154798, Morten Welinder)
2004-10-08 03:04:25 +00:00
Matthias Clasen
71fbbf8911 Don't free info too early. (#154703, Morten Welinder)
2004-10-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (check_is_folder): Don't free
	info too early.  (#154703, Morten Welinder)
2004-10-07 05:03:19 +00:00
Matthias Clasen
aa35a79d49 Remove debug spew. (bookmarks_check_remove_sensitivity): Don't free an
2004-09-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_remove_rows): Remove
	debug spew.
	(bookmarks_check_remove_sensitivity): Don't free an uninitialized
	pointer.
2004-09-26 05:39:34 +00:00