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.
2005-02-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpathbar.c (gtk_path_bar_finalize): Stop scrolling
when the pathbar goes away. (#167094, Rodney Dawes)
(change_icon_theme): Use GTK_ICON_SIZE_MENU here as
well (Vincent Noel)
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.
2004-11-19 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-4:
Fix#158475:
* gtk/gtkpathbar.c (make_directory_button): Make the button a drag
source.
(button_drag_data_get_cb): New callback to let us drag the
button's path as a text/uri-list.
2004-09-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpathbar.c (gtk_path_bar_check_parent_path): Scroll
to make the current folder visible. (#152921)
2004-09-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c: Revert the button state to !button_down,
if we're missing the release event due to grab shadowing
or insensitivation.
* gtk/gtkpathbar.c: Make the slider buttons scroll.
Wed Aug 25 15:15:56 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Change the Down
button to be end-justified, so that clicking on it is a stable
operation.
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
Tue Apr 13 16:19:23 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkpathbar.c (make_directory_button): patch from Owen to
make the buttons sized by a bold label. This makes the text
'swim' a little, but stops the buttons from resizign, #137210
2004-04-05 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Ref/sink the
buttons. Also, free them correctly upon failure. Based on a
patch by Morten Welinder, fixes#137956.
2004-04-01 Federico Mena Quintero <federico@ximian.com>
Fix#136077.
* gtk/gtkpathbar.h (struct _GtkPathBarClass): Add a
"child_is_hidden" boolean argument to the "path-clicked" signal.
* gtk/gtkpathbar.c (struct _ButtonData): Added a file_is_hidden
field.
(make_directory_button): Take a file_is_hidden argument; put it in
the ButtonData.
(_gtk_path_bar_set_path): See whether each path component path is
a hidden file.
(gtk_path_bar_class_init): Add the file_is_hidden argument to the
"path-clicked" signal.
(button_clicked_cb): See if the downwards button represents a
hidden file for the file_is_hidden argument in the signal
emission.
* gtk/gtkmarshalers.list: Added a signal type VOID:POINTER,BOOLEAN.
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_select_path): If we fail to switch
folders, don't try to select the path in the file system model.
Also, return the result from _gtk_file_system_model_path_do().
(gtk_file_chooser_default_select_path): Turn on show_hidden in the
file system model if we are asked to select a hidden file.
(path_bar_clicked): Show hidden files based on whether the
immediate downwards folder in the path bar is a hidden file
itself.
(struct _GtkFileChooserDefault): Added fields
browse_files_popup_menu and browse_files_popup_menu_hidden_files_item.
(create_file_list): Set an object data key of
"GtkFileChooserDefault" on the tree view so that we can find the
impl from the popup menu callbacks. Also, hook up to the
"button-press-event" and "popup-menu" signals in the file list to
bring up a popup menu.
(list_popup_menu_cb): New callback.
(list_button_press_event_cb): New callback.
Fix#138763:
* gtk/gtkfilesystemmodel.c
(_gtk_file_system_model_new): Oops, connect_object to
"finished-loading".
2004-03-17 Morten Welinder <terra@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_forall): Make this work when the
slider buttons have been destroyed.
(gtk_path_bar_remove): Make this work for slider buttons too.
Fixes http://bugzilla.gnome.org/show_bug.cgi?id=137257
Mon Mar 15 12:51:17 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (location_popup_handler): Only show
the title string in OPEN/SELECT_FOLDER mode as it's open-specific.
Put a blank title for SAVE/CREATE_FOLDER; we are in string freeze,
so we'll fix it for 2.4.1 as #137272.
* gtk/gtkpathbar.c (gtk_path_bar_scroll_down): calculate
space_available correctly for RTL mode. w/o this, you can't
scroll down again. Fixes#137021.
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkpathbar.c (gtk_path_bar_scroll_up): Queue a resize.
(gtk_path_bar_scroll_down): Likewise.
2004-03-14 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilesystem.c (gtk_file_folder_get_info): Allow the path
to be NULL, so that people can ask for information about a
parent-less file system root (e.g. get_info (get_folder ("/"), NULL)).
* gtk/gtkfilesystemunix.c (gtk_file_folder_unix_get_info): Allow
the condition describe above.
* gtk/gtkfilechooserdefault.c (get_file_info): Allow getting
information of root paths.
* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Handle root paths correctly.
Sun Mar 14 21:03:15 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpathbar.[ch]: Add _gtk_path_bar_up()/
_gtk_path_bar_down().
* gtk/gtkfilechooserdefault.c: Use _gtk_path_bar_up()/
_gtk_path_bar_down() as bindings for Alt-Up
and new Alt-Down. (Partly based on a patch by
Mark McLoughlin, #136987)
Wed Mar 10 02:41:05 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c: (gtk_path_bar_init), (gtk_path_bar_class_init),
(remove_settings_signal), (gtk_path_bar_dispose),
(gtk_path_bar_style_set), (gtk_path_bar_screen_changed),
(gtk_path_bar_scroll_up), (reload_icons), (change_icon_theme),
(settings_notify_cb), (gtk_path_bar_check_icon_theme),
(get_button_image), (gtk_path_bar_update_button_appearance),
(make_directory_button), (gtk_path_bar_check_parent_path): Support
changes in icon themes.
* gtk/gtkpathbar.h: add two elements
* tests/testfilechooser.c: (main): use gnome-vfs method again to
get more testing.
Wed Mar 10 01:17:40 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c: added 'Desktop' to the list of volumes. We
don't have any more untranlated strings in the dialog.
Tue Mar 9 16:19:09 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (struct _ButtonData): Encapsulate all of the
information about a button in a struct instead of ugly
g_object_set_data.
(gtk_path_bar_size_request): Use ButtonData.
(gtk_path_bar_update_slider_buttons): ditto
(gtk_path_bar_size_allocate): ditto
(gtk_path_bar_remove): ditto
(gtk_path_bar_forall): ditto
(gtk_path_bar_scroll_down): ditto
(gtk_path_bar_clear_buttons): ditto
(button_clicked_cb): ditto. Also, add an ignore_changes variable
(button_data_free): destroy ButtonData
(update_button_appearance): Use ButtonData
(make_directory_button): ditto
(gtk_path_bar_check_parent_path): ditto
(_gtk_path_bar_set_path): ditto
2004-03-08 Federico Mena Quintero <federico@ximian.com>
Patch "1a" from #136185, by Morten Welinder.
* gtk/gtkfilechooserdefault.c (get_file_info): Take in an argument
that says whether the caller just wants the display name.
(shortcuts_insert_path): We only want the name in the call to
get_file_info().
* gtk/gtkpathbar.c (_gtk_path_bar_set_path): Don't request more
info than needed from the file_folder.
Mon Mar 8 04:50:12 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (create_path_bar): new function to
consolidate creating the path_bar.
(gtk_file_chooser_default_set_current_folder): no longer need to
pass in the filesystem.
* gtk/gtkpathbar.h: Removed unused set_pixbuf functions in favor
of just setting the filesystem.
* gtk/gtkpathbar.c (gtk_path_bar_finalize): Free root path and
home_dir.
(get_button_image): Add images to path_bar.
(update_button_appearance): use images
(make_directory_button): Clasify buttons based upon location.
(_gtk_path_bar_set_path): no longer need a file-system. Also, add
rerooting, #135845, #135914
* tests/testfilechooser.c: Fix reused error handling.
2004-03-05 Federico Mena Quintero <federico@ximian.com>
Fixes#136082 and #135265, patch by Morten Welinder.
* configure.in: Use AC_SYS_LARGEFILE.
* */*.c: #include <config.h>
Thu Mar 4 01:32:19 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Modified patch from
muppet <scott@asofyet.org> to keep child directories around if we
change to a child.
* gtk/gtkpathbar.c (_gtk_path_bar_set_home_icon): Start of
icon-setting functions. Not used yet.
(_gtk_path_bar_set_root_icon): Ditto.
2004-03-02 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_set_current_folder): Handle errors in
setting the path bar's path. Fixes#136000, based on a patch by
Morten Welinder.
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_insert_bookmark):
Don't free our own propagated error.
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Likewise, and free the
parent_path upon error. Fixes#136006, patch by Morten Welinder.
(gtk_path_bar_set_path): Unref the file_folder upon error.
(gtk_path_bar_set_path): Return a boolean success code.
Wed Feb 25 03:52:58 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c: use gtk_widget_push/pop_composite_child around
internal buttons.
* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):
rename some widgets to make it clear where they are packed.
(update_appearance): New function to handle all the 'logic' of
layout in one place. We aren't trying to keep all our properties
in sync.
(gtk_file_chooser_default_set_property): use update_appearance()
Mon Feb 23 15:23:23 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Display the root a bit
more cleanly.
* gtk/gtkpathbar.h (struct _GtkPathBarClass): fix the signal.
Mon Feb 23 02:26:53 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_finalize):
for (i = 0; i < 10; i++)
g_print ("I will compile before committing.\n");
Mon Feb 23 02:08:42 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (file_pane_create): Use the
GtkPathBar by default now.
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Correctly set the
current path from the path.
(gtk_path_bar_class_init): new signal
(button_clicked_cb): emit the signal when we're selected.
(gtk_path_bar_clear_buttons): Fix a crasher when we weren't
clearing thr first_scrolled_button.
Fri Feb 20 18:20:22 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c: conditional compile for GtkPathBar
* gtk/gtkpathbar.c (gtk_path_bar_size_allocate): Clean up
allocation code. Works fully in RTL languages, I think.
(gtk_path_bar_scroll_up): Scroll up.
(gtk_path_bar_scroll_down): Scroll down.
Thu Feb 19 19:58:53 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.[ch]: New widget to handle the path in the
fileselector implementation. Not hooked up to anything yet.
* gtk/Makefile.am: support the path bar.