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-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-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-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-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.
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-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>
2004-03-01 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_model_create): Don't
unref an old model; there isn't one. This was a leftover from
when we recreated the model on every change.
(save_widgets_create): Create the save folder combo.
(shortcuts_model_create): Don't set the model on the tree view
here.
(gtk_file_chooser_default_constructor): Create the shortcuts model
here, before the rest of the widgets.
(shortcuts_list_create): Don't call shortcuts_model_create() here;
just set the model on the tree.
(save_folder_combo_create): New function, provided by Jonathan
Blandford.
(update_appearance): Set the sensitivity of the folder combo.
(shortcuts_activate_iter): New helper function; code moved from
shortcuts_row_activated_cb().
(shortcuts_activate_item): New helper function.
(shortcuts_row_activated_cb): Use shortcuts_activate_iter().
(ShortcutsIndex): Renamed SHORTCUTS_SEPARATOR to
SHORTCUTS_BOOKMARKS_SEPARATOR.
(struct _GtkFileChooserDefault): New field shortcuts_current_folder_active.
(shortcuts_insert_separator): Add a position argument.
(shortcuts_get_index): Handle the SHORTCUTS_CURRENT_FOLDER_SEPARATOR
and SHORTCUTS_CURRENT_FOLDER positions.
(shortcut_exists): Ignore the current folder row.
(struct _GtkFileChooserDefault): New field shortcuts_filter_model.
(shortcuts_model_create): Create a filter model for the shortcuts list.
(shortcuts_list_create): Set the model to the shortcuts_filter_model.
(remove_bookmark_button_clicked_cb): Use the shortcuts_filter_model.
(bookmarks_check_remove_sensitivity): Likewise.
(shortcuts_row_activated_cb): Likewise.
(gtk_file_chooser_default_set_current_folder): New function.
(gtk_file_chooser_default_set_current_folder): Update the current
folder row in the shortcuts list.
* gtk/gtkfilechooserwidget.c
(gtk_file_chooser_widget_constructor): Cast correctly for
_gtk_file_chooser_embed_set_delegate().
Mon Mar 1 16:32:52 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserwidget.c
(gtk_file_chooser_widget_new_with_backend): new function. Long
name.
Fri Feb 27 18:46:27 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooserembed.h: New private interface to help
negotiate the default size of the widget. Still a bit buggy, but
better than the old behavior.
* gtk/gtkfilechooserdefault.c: Implement the embed interface.
* gtk/gtkfilechooserwidget.c: Proxy the embed interface.
* gtk/gtkfilechooserdialog.c: Use the embed interface.
Thu Feb 26 18:25:57 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
modes to the enum.
* gtk/gtkfilechooser.c (gtk_file_chooser_set_folder_mode): Remove.
(gtk_file_chooser_get_folder_mode): Remove
2004-02-20 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfilechooserdefault.c: (shortcuts_append_desktop):
Desktop directory is not translated.
(set_tree_model):
There might not be volumes for all paths.
* gtk/gtkfilechooserwidget.c:
(gtk_file_chooser_widget_constructor):
Use gtk_file_chooser_set_current_folder to set cwd.
2003-12-14 Hans Breuer <hans@breuer.org>
* gtk/gtkprivate.h gtk/gtkmain.c : handle GTK_DATADIR
similar as the other filesystem placement 'constants' (dynamic
resolving on win32)
* gtk/gtkfilechooserwidget.c : handle file system to win32
renaming here as will
* gtk/gtkfilesystemwin32.c : implement render_icon
* gtk/gtk.def gdk/gdk.def : updated externals
* gdk/win32/gdkdisplay-win32.c : make it compile without
<multimon.h> - i.e. even older sdk
* gdk/win32/gdkevents-win32.c : match resize_timer_proc
with TIMERPROC prototype
* gdk/win32/gdkwindow-win32.c : older msvc does not know
BITMAPV5HEADER (from win xp) either
* gtk/gtkimmodule.c : make it compile even if GTK_LOCALEDIR is
not defined
* tests/testfilechooser.c : recent GLib crashes on
g_print ("%s", NULL) so avoid this
2003-11-15 Hans Breuer <hans@breuer.org>
* gdk/makefile.msc gdk/gdk.def
gtk/gtk.def gtk/makefile.msc.in : updated
* tests/makefile.msc : added all the new tests
* gtk/gtkfilefilter.c(finalize) : initialize filter
from object not from itself
* gtk/gtkfilesystemwin32.[hc] : copied from gtkfilesystemunix.[hc]
modified as less as posible to have aworking implementation
on win32. There maybe the desire to merge the unchanged pats into
a common base class.
Also implemented a simple glib based bookmark handling, which
is currently missing in gtkfilesystemunix.[hc] but can be copied
over there.
* gtk/gtkfilechooserwidget.c : conditional include gtkfilesystemwin32.h
* gdk/win32/gdkwindow-win32.c : implement
gdk_window_set_keep_above() and gdk_window_set_keep_below()
* tests/testmerge.c : don't include unistd.h unconditionally,
#define STDOUT_FILENO if it isn't defined
* tests/testfilechooser.c : make it compile on win32
Wed Oct 22 23:20:04 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilechooser.[ch] gtk/gtkfilefilter.[ch]
gtk/gtkfilechooserwidget.[ch] gtk/gtkfilechooserdialog.[ch]:
gtk/gtkfilechooserutils.c gtk/gtkfilechooserprivate.[ch]:
Basic framework for the new file selector widget.
* gtk/gtkfilechooserdefault.[ch] gtk/gtkcellrenderersep.[ch]
gtk/gtkfilechooserentry.[ch] gtk/gtkfilesystemmodel.[ch]:
Initial implementation of the GtkFileChooser user interface.
* gtk/gtkfilesystemunix.[ch]: GtkFileSystem implementation
for Unix files.
* configure.in gtk/Makefile.am gtk/xdgmime: Build code
for freedesktop.org MIME system on Unix.
* tests/testfilechooser.c: Test program for GtkFileChooser
* tests/prop-editor.c: Add support for properties on interfaces.
Wed Jul 16 16:50:31 2003 Owen Taylor <otaylor@redhat.com>
* configure.ac Makefile.am: auto-ize.
* xdgmime/: Add freedesktop.org MIME spec implementatin
by Jonathan Blandford.
* gtkfilesystem.[ch]: Add gtk_file_info_render_icon()
gtk_file_info_set/get_icon_type to do icon handling
based on MIME type. Add a simple icon caching system.
* gtkfilesystemgnomevfs.c: Implement ensure_types()
so that extending the set of types for a loaded
directory works. Set the MIME type to get the default
icon handling.
* gtkfilesystemunix.c: Look up the MIME type using
xdgmime.
* gtkfilechooserimpldefault.c: Display icons in the list.