Ellipsize labels in the Save folder's combo so they don't grow too wide.
Ellipsize labels in normal directory buttons in the pathbar, and make
their requisition's width reasonably small. Use a tooltip for buttons
that got ellipsized.
Instead of placing the down-slider directly beside the last button in
the pathbar, use the remaining space in the pathbar for the last
button. Use a different method to find the first visible button.
Walk down from the end, adding buttons until we use all free space.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2008-08-12 Michael Natterer <mitch@imendio.com>
* gtk/*.c: consistently chain up using
GTK_FOO_CLASS(parent_class)->bar(instance) instead of
(*GTK_FOO_CLASS(parent_class))->bar(instance).
svn path=/trunk/; revision=21085
2008-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-03-03 Carlos Garnacho <carlos@imendio.com>
Fix http://bugzilla.gnome.org/show_bug.cgi?id=417389 - Make the
scrollwheel work in GtkPathBar.
* gtk/gtkpathbar.h (struct _GtkPathBar): New field event_window.
* gtk/gtkpathbar.c (gtk_path_bar_realize): New function. Create
an input-only window, event_window, which we'll use to capture
scroll events.
(gtk_path_bar_map): Show the event_window under the rest of the
windows, so it will be a catch-all for unhandled events.
Signed-off-by: Federico Mena Quintero <federico@gnu.org>
svn path=/trunk/; revision=19699
2007-06-04 Cody Russell <bratsche@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_scroll_down): Check
if down_button is NULL. This happens when the pathbar button
for the current directory is too large to fit in the
space, e.g. on Windows for directories named something like
"My Documents and Settings".
svn path=/trunk/; revision=18030
2007-05-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpathbar.c: Add ATK names to the Up, Down, and Root
buttons. Keep the focus from vanishing when Up or Down arrows
become insensitive or invisible. (#357005, Patrick Wade)
svn path=/trunk/; revision=17856
2006-11-08 Carlos Garnacho <carlosg@gnome.org>
* gtk/gtkpathbar.c (on_slider_unmap): added, do not leave the scroll
timeout running if the slider buttons are hidden. (#372527)
2006-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-04 Kristian Rietveld <kris@imendio.com>
* gtk/gtkpathbar.c (gtk_path_bar_dispose): don't cancel the
operations spawned by buttons here,
(set_button_image_get_info_cb): bail out if button is NULL, but
do free button_data,
(button_data_free): only free the data is non NULL (since this
function can be called multiple times for the same data), cancel
handle is pending but don't free button_data in this case (will
happen in the callback).
2006-05-16 Kristian Rietveld <kris@imendio.com>
* gtk/gtkpathbar.c (gtk_path_bar_dispose): cancel all pending handles
in the button list. (Fixes#341035, reported by William Jon McCann).
2006-05-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.
2005-11-22 Michael Natterer <mitch@imendio.com>
Made button-press timeouts which work like key repeat timeouts
configurable. Addresses bug #142582:
* gtk/gtksettings.c: added properties "gtk-timeout-initial" and
"gtk-timeout-repeat" which defalt to 200/20 (ms).
Use the values from GtkSettings instead of hardcoding them
(the repeat value is either taken as-is for fast repeat or
multiplied by 5 for slow repeat). Changed all places to use these
two standard initial/repeat timings:
* gtk/gtkcalendar.c (unchanged 200/20)
* gtk/gtknotebook.c (unchanged 200/100)
* gtk/gtkpathbar.c (changed from 300/150 to 200/100)
* gtk/gtkrange.c (changed from 250/100 to 200/100)
* gtk/gtkspinbutton.c (unchanged 200/20)
2005-11-18 Matthias Clasen <mclasen@redhat.com>
Fix crashes in connection with pathbar scrolling (#321560,
Bogdan Nicula)
* gtk/gtkpathbar.c (gtk_path_bar_update_slider_buttons):
Stop scrolling when desensitising slider buttons.
(gtk_path_bar_scroll_timeout, gtk_path_bar_slider_button_press):
And use it here.
* gtk/gtkpathbar.h (struct _GtkPathBar): Add a separate
scrolling_down flag.
2005-11-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-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpathbar.[hc]: Set focus-on-click to FALSE for all buttons.
Don't grab focus when a slider button is pressed, instead, use
a bit in the pathbar struct to determine whether to scroll up
or down. (#314486, Carlos Garnacho)
2005-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-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-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-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-06-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpathbar.[hc]: Rework the way in which rerooting of the
path bar is done, implementing the following principles:
(#137289, patch by Benjamin Otte)
1. Re-root only if $HOME is an ancestor of the current path.
2. When re-rooting, make sure the Left arrow appears in the path
bar, so that you can navigate up from $HOME to /. In that case,
make sure the Right arrow doesn't appear if the sub-hierarchy from
$HOME to the cwd fits in the window.
3. Make sure that hitting Alt-Up takes you always one folder up,
even when the path bar is re-rooted.
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.