Commit Graph

235 Commits

Author SHA1 Message Date
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
Matthias Clasen
3ef6c183e9 Remove debug spew.
2004-09-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_remove_rows): Remove
	debug spew.
2004-09-26 05:32:27 +00:00
Matthias Clasen
c09081f84c Add some tooltips.
2004-09-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: Add some tooltips.
2004-09-23 19:39:39 +00:00
Matthias Clasen
8a3d75dbc1 Don't use bitops on booleans. (gtk_file_chooser_default_should_respond):
2004-09-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
	bitops on booleans.
	(gtk_file_chooser_default_should_respond): Make it easier to
	select folders in SELECT_FOLDER mode.
2004-09-22 20:17:53 +00:00
Matthias Clasen
a642c62c57 Don't use bitops on booleans.
2004-09-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (selection_check_foreach_cb): Don't use
	bitops on booleans.
2004-09-22 19:32:13 +00:00
Matthias Clasen
34059cf293 Don't assert that current_focus != NULL, just return FALSE.
2004-09-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_should_respond):
	Don't assert that current_focus != NULL, just return FALSE.
2004-09-21 20:36:31 +00:00
Matthias Clasen
4531b37582 Don't return FALSE from a void function. (#153185, Joel Fredrikson)
Mon Sep 20 19:27:48 2004  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_activate_iter): Don't
	return FALSE from a void function.  (#153185, Joel Fredrikson)
2004-09-20 23:47:38 +00:00
Matthias Clasen
627dc11c98 Scroll to the selected row. (#143868, Christian Persch)
2004-09-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (select_func): Scroll to the selected
	row.  (#143868, Christian Persch)
2004-09-17 19:05:45 +00:00
Matthias Clasen
350559dea8 Remove leftover debug code.
2004-09-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render): Remove
	leftover debug code.

	Improve the behaviour of the file chooser in save mode. Fixes bugs
	#151031, #151608, #151994 reported by Owen Taylor and Alexander
	Larsson.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property):
	(location_entry_create): Propagate the action to the file
	chooser entries.
	(gtk_file_chooser_default_should_respond): Switch folders if
	the user enters a directory name in the entry and clear the entry
	after switching folders.
	(gtk_file_chooser_default_should_respond, shortcuts_row_activated_cb):
	Move focus to the file list when activating a shortcut.
	(gtk_file_chooser_default_should_respond): Handle the case where the
	user clicks on "Save" after selecting a folder in the file list.

	* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property):
	Propagate the action to the file chooser entries.

	* gtk/gtkfilechooserentry.h:
	* gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_set_action):
	(_gtk_file_chooser_entry_get_action): New functions to propagate
	the GtkFileChooserAction of the file chooser to the file chooser
	entry.
	(check_completion_callback): If we are in save mode, only do
	inline completion for directories.
2004-09-17 18:13:26 +00:00
Manish Singh
95674320d9 initialize path so we don't potentially use an undefined pointer.
Wed Aug 25 17:14:58 2004  Manish Singh  <yosh@gimp.org>

        * gtk/gtktreeview.c (gtk_tree_view_search_activate): initialize
        path so we don't potentially use an undefined pointer.

        * gtk/gtkfilechooserdefault.c (shortcuts_list_create): add G_CALLBACK
        cast for tree_view_keybinding_cb.

        * gtk/gtkfilechooserdefault.c (location_entry_create): cast to
        GTK_FILE_CHOOSER_ENTRY for _gtk_file_chooser_entry_set_file_part()
        calls.

        * gtk/gtkcellrenderercombo.c (gtk_cell_renderer_combo_start_editing):
        cast to GTK_COMBO_BOX for gtk_combo_box_set_active_iter() call.

        * gtk/gtkselection.c (selection_get_text_plain): make len a gsize,
        since that's what g_convert_with_fallback() expects.
2004-08-26 00:20:25 +00:00
Jonathan Blandford
8bc41273f6 Don't handle the event if we have no children.
Tue Aug 24 02:06:37 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtktreeview.c
        (gtk_tree_view_real_expand_collapse_cursor_row): Don't handle the
        event if we have no children.

        * gtk/gtkfilechooserdefault.c (trap_activate_cb):
        (tree_view_keybinding_cb):Since GtkTreeView has a keybinding
         attached to '/', we need to catch keypresses before the TreeView
         gets them.
        (gtk_file_chooser_default_class_init): add '/' to be a keybinding
        to the C-l dialog.
        (location_entry_create): Clear the text to "" when loading a file.
        This has a much better feel than putting the currently selected
        in.
        * #include <errno.h>
2004-08-25 19:10:38 +00:00
Matthias Clasen
e4ef01a7b4 Use get_file_info() rather than trying get_folder() and checking for an
2004-08-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (check_is_folder): Use get_file_info() rather
	than trying get_folder() and checking for an error directly because older
	versions of the gnome-vfs backend don't return an error
	immediately.  (#150852, Zack Cerza )
2004-08-25 16:59:57 +00:00
Manish Singh
ba6fc3ccd8 Initialize height from fixed_height before we do anything, so it always
Wed Aug 18 16:18:00 2004  Manish Singh  <yosh@gimp.org>

        * gtk/gtktreeview.c (gtk_tree_view_row_inserted): Initialize height
        from fixed_height before we do anything, so it always has a valid
        value.

        * gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): Fix call
        to gtk_tree_model_get (missing "," in param list).
2004-08-18 23:18:15 +00:00
Federico Mena Quintero
65ddedd1ae Merged from 2.4:
2004-08-18  Federico Mena Quintero  <federico@ximian.com>

	Merged from 2.4:

	Fixes #149251:

	* gtk/gtkfilechooserdefault.c: Renamed SHORTCUTS_COL_PATH to
	SHORTCUTS_COL_DATA.  Add SHORTCUTS_COL_IS_VOLUME, to determine
	easily whether the SHORTCUTS_COL_DATA points to a GtkFilePath or a
	GtkFileSystemVolume.
	(shortcuts_model_create): Create a boolean column for
	SHORTCUTS_COL_IS_VOLUME.
	(shortcuts_reload_icons): Simplify with the use of the
	SHORTCUTS_COL_IS_VOLUME column.  Don't leak the pixbuf.
	(shortcuts_insert_path): Add the SHORTCUTS_COL_IS_VOLUME data.
	(shortcuts_free_row_data): New helper function; frees the data
	columns for an iter.
	(shortcuts_remove_rows): Don't take a callback for freeing the
	data; free everything here instead.  Use
	shortcuts_free_row_data().
	(volume_remove_cb): Removed.
	(remove_bookmark_cb): Removed.
	(remove_row_cb): Make this a single generic function to delete
	rows.
	(shortcuts_add_volumes): Use remove_row_cb().
	(shortcuts_add_bookmarks): Likewise.
	(struct _GtkFileChooserDefault): Removed the
	shortcuts_current_folder_is_volume field.
	(shortcuts_add_current_folder): Oops, don't free the volume.
	(remove_current_folder_cb): Removed.
	(shortcut_find_position): Simplify through the use of the
	SHORTCUTS_COL_IS_VOLUME column.
	(remove_selected_bookmarks): Assert that we don't get a volume.
	(shortcuts_reorder): Likewise; also, plug a leak.
	(gtk_file_chooser_default_remove_shortcut_folder): Simplify
	through the use of shortcuts_remove_rows().
	(gtk_file_chooser_default_list_shortcut_folders): Assert that we
	don't get a volume.
	(shortcuts_activate_iter): Simplify.
	(home_folder_handler): Simplify by using
	shortcuts_activate_iter().
	(shortcuts_free): New function; frees all the data columns.
	(gtk_file_chooser_default_finalize): Unref the
	shortcuts_filter_model and the shortcuts model data first.
2004-08-18 16:30:58 +00:00
Matthias Clasen
a3aa10e5a6 New widget to go along with GtkFontButton and GtkColorButton for use in
2004-08-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.[hc]: New widget to go along with
	GtkFontButton and GtkColorButton for use in preference dialogs.
	Replaces GnomeFileEntry.  (#148108, James M. Cape)

	* gtk/gtk.h: Include gtkfilechooserbutton.h

	* gtk/Makefile.am (gtk_public_h_sources): Add gtkfilechooserbutton.h
	(gtk_c_sources): Add gtkfilechooserbutton.c

	* gtk/gtk.symbols: Add the GtkFileChooserButton symbols.

	* gtk/gtkfilechooserutils.[hc]: Make the delegate quark available.

	* gtk/gtkfilechooserentry.[hc] (_gtk_file_chooser_entry_new): Allow
	to suppress tab-eating using the new eat_tabs argument. Adjust all
	callers.

	* tests/testfilechooserbutton.c: Test for GtkFileChooserButton.

	* tests/Makefile.am (noinst_PROGRAMS): Add testfilechooserbutton
2004-08-17 16:06:39 +00:00
Tor Lillqvist
ae6d3a2214 gtk/gtkfilechooserdefault.c (shortcuts_append_home,
2004-08-14  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkfilechooserdefault.c (shortcuts_append_home,
	shortcuts_append_desktop, set_local_only)
	* gtk/gtkfilesystemwin32.c (gtk_file_system_win32_render_icon)
	* gtk/gtkpathbar.c (find_button_type, _gtk_path_bar_set_file_system):
	Guard against g_get_home_dir() returning NULL. (#150007)
2004-08-14 16:47:48 +00:00
Matthias Clasen
766d78659c Don't install the settings_notify_cb from here, since it may be called
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_style_set):
	Don't install the settings_notify_cb from here, since it
	may be called before the first screen_changed signal,
	confusing the logic in gtk_file_chooser_screen_changed().
	(#148803, Abel Daniel)
2004-08-13 18:09:29 +00:00
Matthias Clasen
e4ec4f3710 Underscore-prefix gtk_file_system_module_get_type(). Underscore-prefix
2004-08-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystem.c: Underscore-prefix gtk_file_system_module_get_type().
	* gtk/gtkfilechooserdefault.c: Underscore-prefix shortcuts_model_filter_get_type().

	* gtk/gtkimmodule.c: Make gtk_im_module_get_type() static.
	* gtk/gtk.symbols:
	* gtk/gtkinternals.h: Remove the no longer exported get_type functions.
2004-08-12 21:09:03 +00:00
Federico Mena Quintero
c710d479f1 Fix #149422, #143457:
2004-08-11  Federico Mena Quintero  <federico@ximian.com>

	Fix #149422, #143457:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_should_respond): Rewrite to take the
	current focus into account, the contents of the save entry, and
	the last focus for the shortcuts list.
	(switch_to_selected_folder): We don't need an assertion on the
	action here.
2004-08-12 03:07:01 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Matthias Clasen
fbc0b76739 Don't leak a reference to the pixbufs.
Sun Aug  8 23:46:20 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): Don't
	leak a reference to the pixbufs.
2004-08-09 03:55:00 +00:00