diff options
| author | Ross Burton <ross@openedhand.com> | 2008-06-16 10:14:57 +0000 |
|---|---|---|
| committer | Ross Burton <ross@openedhand.com> | 2008-06-16 10:14:57 +0000 |
| commit | 0d007363d7ddebcd173cbc76d4fa6f03daa006ac (patch) | |
| tree | fb6868cbe015cdad05e3c10daa0cc17098ad1667 | |
| parent | 0a2c4cd9bdf972ce959d68150c175dfddf34eef2 (diff) | |
| download | openembedded-core-0d007363d7ddebcd173cbc76d4fa6f03daa006ac.tar.gz openembedded-core-0d007363d7ddebcd173cbc76d4fa6f03daa006ac.tar.bz2 openembedded-core-0d007363d7ddebcd173cbc76d4fa6f03daa006ac.zip | |
gtk+: remove 2.6.10
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4660 311d38ba-8fff-0310-9ca6-ca027cbcb966
17 files changed, 0 insertions, 5659 deletions
diff --git a/meta/packages/gtk+/gtk+-2.6.10/automake-lossage.patch b/meta/packages/gtk+/gtk+-2.6.10/automake-lossage.patch deleted file mode 100644 index 0d423ddbb9..0000000000 --- a/meta/packages/gtk+/gtk+-2.6.10/automake-lossage.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100 -+++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100 -@@ -52,21 +52,5 @@ - - dist-hook: html - cp -Rp $(srcdir)/html $(distdir) --else --html: -- echo "***" -- echo "*** Warning: Tutorial not built" -- echo "***" -- --pdf: -- echo "***" -- echo "*** Warning: Tutorial not built" -- echo "***" -- --dist-hook: -- echo "***" -- echo "*** Warning: Tutorial not built" -- echo "*** DISTRIBUTION IS INCOMPLETE" -- echo "***" - endif - diff --git a/meta/packages/gtk+/gtk+-2.6.10/combo-arrow-size.patch b/meta/packages/gtk+/gtk+-2.6.10/combo-arrow-size.patch deleted file mode 100644 index aecbd4366a..0000000000 --- a/meta/packages/gtk+/gtk+-2.6.10/combo-arrow-size.patch +++ /dev/null @@ -1,67 +0,0 @@ -Index: gtk/gtkcombobox.c -=================================================================== -RCS file: /cvs/gnome/gtk+/gtk/gtkcombobox.c,v -retrieving revision 1.185 -diff -u -p -r1.185 gtkcombobox.c ---- gtk/gtkcombobox.c 12 Oct 2006 13:48:07 -0000 1.185 -+++ gtk/gtkcombobox.c 1 Nov 2006 19:01:09 -0000 -@@ -756,6 +756,25 @@ gtk_combo_box_class_init (GtkComboBoxCla - FALSE, - GTK_PARAM_READABLE)); - -+ /** -+ * GtkComboBox:arrow-size: -+ * -+ * Sets the minimum size of the arrow in the combo box. Note -+ * that the arrow size is coupled to the font size, so in case -+ * a larger font is used, the arrow will be larger than set -+ * by arrow size. -+ * -+ * Since: 2.12 -+ */ -+ gtk_widget_class_install_style_property (widget_class, -+ g_param_spec_int ("arrow-size", -+ P_("Arrow Size"), -+ P_("The minimum size of the arrow in the combo box"), -+ 0, -+ G_MAXINT, -+ 15, -+ G_PARAM_READABLE)); -+ - g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate)); - } - -@@ -1897,7 +1916,12 @@ gtk_combo_box_size_request (GtkWidget - { - gint width, height; - gint focus_width, focus_pad; -+ gint font_size; -+ gint arrow_size; - GtkRequisition bin_req; -+ PangoContext *context; -+ PangoFontMetrics *metrics; -+ PangoFontDescription *font_desc; - - GtkComboBox *combo_box = GTK_COMBO_BOX (widget); - -@@ -1910,7 +1934,20 @@ gtk_combo_box_size_request (GtkWidget - gtk_widget_style_get (GTK_WIDGET (widget), - "focus-line-width", &focus_width, - "focus-padding", &focus_pad, -+ "arrow-size", &arrow_size, - NULL); -+ -+ font_desc = GTK_BIN (widget)->child->style->font_desc; -+ context = gtk_widget_get_pango_context (widget); -+ metrics = pango_context_get_metrics (context, font_desc, -+ pango_context_get_language (context)); -+ font_size = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + -+ pango_font_metrics_get_descent (metrics)); -+ pango_font_metrics_unref (metrics); -+ -+ arrow_size = MAX (arrow_size, font_size); -+ -+ gtk_widget_set_size_request (combo_box->priv->arrow, arrow_size, arrow_size); - - if (!combo_box->priv->tree_view) - { diff --git a/meta/packages/gtk+/gtk+-2.6.10/disable-tooltips.patch b/meta/packages/gtk+/gtk+-2.6.10/disable-tooltips.patch deleted file mode 100644 index d71d839c3c..0000000000 --- a/meta/packages/gtk+/gtk+-2.6.10/disable-tooltips.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100 -+++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100 -@@ -118,7 +118,7 @@ - tooltips->tips_data_list = NULL; - - tooltips->delay = DEFAULT_DELAY; -- tooltips->enabled = TRUE; -+ tooltips->enabled = FALSE; - tooltips->timer_tag = 0; - tooltips->use_sticky_delay = FALSE; - tooltips->last_popdown.tv_sec = -1; diff --git a/meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch b/meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch deleted file mode 100644 index 46931f7de9..0000000000 --- a/meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch +++ /dev/null @@ -1,4609 +0,0 @@ ---- - gtk/gtkfilechooserdefault.c | 3689 ++++---------------------------------------- - 1 file changed, 415 insertions(+), 3274 deletions(-) - -Index: gtk+-2.6.10/gtk/gtkfilechooserdefault.c -=================================================================== ---- gtk+-2.6.10.orig/gtk/gtkfilechooserdefault.c 2007-06-08 09:29:24.000000000 +0100 -+++ gtk+-2.6.10/gtk/gtkfilechooserdefault.c 2007-06-08 11:08:41.000000000 +0100 -@@ -31,7 +31,6 @@ - #include "gtkcombobox.h" - #include "gtkentry.h" - #include "gtkeventbox.h" --#include "gtkexpander.h" - #include "gtkfilechooserdefault.h" - #include "gtkfilechooserembed.h" - #include "gtkfilechooserentry.h" -@@ -50,7 +49,6 @@ - #include "gtkmarshalers.h" - #include "gtkmenuitem.h" - #include "gtkmessagedialog.h" --#include "gtkpathbar.h" - #include "gtkprivate.h" - #include "gtkscrolledwindow.h" - #include "gtkseparatormenuitem.h" -@@ -79,18 +77,23 @@ - #include <string.h> - #include <time.h> - -+#define DEFAULT_SPACING 5 -+ -+#define GTK26 - typedef struct _GtkFileChooserDefaultClass GtkFileChooserDefaultClass; - - #define GTK_FILE_CHOOSER_DEFAULT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_CHOOSER_DEFAULT, GtkFileChooserDefaultClass)) - #define GTK_IS_FILE_CHOOSER_DEFAULT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_CHOOSER_DEFAULT)) - #define GTK_FILE_CHOOSER_DEFAULT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FILE_CHOOSER_DEFAULT, GtkFileChooserDefaultClass)) - -+#ifdef GTK26 - typedef enum { - LOAD_EMPTY, /* There is no model */ - LOAD_PRELOAD, /* Model is loading and a timer is running; model isn't inserted into the tree yet */ - LOAD_LOADING, /* Timeout expired, model is inserted into the tree, but not fully loaded yet */ - LOAD_FINISHED /* Model is fully loaded and inserted into the tree */ - } LoadState; -+#endif - - #define MAX_LOADING_TIME 500 - -@@ -109,63 +112,38 @@ struct _GtkFileChooserDefault - - /* Save mode widgets */ - GtkWidget *save_widgets; -- - GtkWidget *save_file_name_entry; -- GtkWidget *save_folder_label; -- GtkWidget *save_folder_combo; -- GtkWidget *save_expander; - - /* The file browsing widgets */ - GtkWidget *browse_widgets; -- GtkWidget *browse_shortcuts_tree_view; -- GtkWidget *browse_shortcuts_add_button; -- GtkWidget *browse_shortcuts_remove_button; - GtkWidget *browse_files_tree_view; -- GtkWidget *browse_files_popup_menu; -- GtkWidget *browse_files_popup_menu_add_shortcut_item; -- GtkWidget *browse_files_popup_menu_hidden_files_item; - GtkWidget *browse_new_folder_button; -- GtkWidget *browse_path_bar; -- -+ GtkWidget *bar; -+ GtkWidget * up_button; -+ - GtkFileSystemModel *browse_files_model; - -- GtkWidget *filter_combo_hbox; - GtkWidget *filter_combo; -- GtkWidget *preview_box; -- GtkWidget *preview_label; -- GtkWidget *preview_widget; -- GtkWidget *extra_align; -- GtkWidget *extra_widget; -- -- GtkListStore *shortcuts_model; -- GtkTreeModel *shortcuts_filter_model; -- -+ - GtkTreeModelSort *sort_model; - - LoadState load_state; - guint load_timeout_id; - - GSList *pending_select_paths; -- -+ GSList * path_history; -+ - GtkFileFilter *current_filter; - GSList *filters; - - GtkTooltips *tooltips; - -- gboolean has_home; -- gboolean has_desktop; -- - int num_volumes; -- int num_shortcuts; -- int num_bookmarks; - - gulong volumes_changed_id; -- gulong bookmarks_changed_id; - - GtkFilePath *current_volume_path; - GtkFilePath *current_folder; -- GtkFilePath *preview_path; -- char *preview_display_name; - - GtkTreeViewColumn *list_name_column; - GtkCellRenderer *list_name_renderer; -@@ -179,25 +157,15 @@ struct _GtkFileChooserDefault - gulong toplevel_set_focus_id; - GtkWidget *toplevel_last_focus_widget; - --#if 0 -- GdkDragContext *shortcuts_drag_context; -- GSource *shortcuts_drag_outside_idle; --#endif -- -+ gchar * root_folder; -+ - /* Flags */ - - guint local_only : 1; -- guint preview_widget_active : 1; -- guint use_preview_label : 1; - guint select_multiple : 1; - guint show_hidden : 1; - guint list_sort_ascending : 1; - guint changing_folder : 1; -- guint shortcuts_current_folder_active : 1; -- --#if 0 -- guint shortcuts_drag_outside : 1; --#endif - }; - - /* Signal IDs */ -@@ -211,17 +179,6 @@ enum { - - static guint signals[LAST_SIGNAL] = { 0 }; - --/* Column numbers for the shortcuts tree. Keep these in sync with shortcuts_model_create() */ --enum { -- SHORTCUTS_COL_PIXBUF, -- SHORTCUTS_COL_NAME, -- SHORTCUTS_COL_DATA, -- SHORTCUTS_COL_IS_VOLUME, -- SHORTCUTS_COL_REMOVABLE, -- SHORTCUTS_COL_PIXBUF_VISIBLE, -- SHORTCUTS_COL_NUM_COLUMNS --}; -- - /* Column numbers for the file list */ - enum { - FILE_LIST_COL_NAME, -@@ -236,23 +193,6 @@ enum { - TEXT_URI_LIST - }; - --/* Target types for dragging from the shortcuts list */ --static const GtkTargetEntry shortcuts_source_targets[] = { -- { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW } --}; -- --static const int num_shortcuts_source_targets = (sizeof (shortcuts_source_targets) -- / sizeof (shortcuts_source_targets[0])); -- --/* Target types for dropping into the shortcuts list */ --static const GtkTargetEntry shortcuts_dest_targets[] = { -- { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW }, -- { "text/uri-list", 0, TEXT_URI_LIST } --}; -- --static const int num_shortcuts_dest_targets = (sizeof (shortcuts_dest_targets) -- / sizeof (shortcuts_dest_targets[0])); -- - /* Target types for DnD from the file list */ - static const GtkTargetEntry file_list_source_targets[] = { - { "text/uri-list", 0, TEXT_URI_LIST } -@@ -270,22 +210,10 @@ static const int num_file_list_dest_targ - / sizeof (file_list_dest_targets[0])); - - --/* Interesting places in the shortcuts bar */ --typedef enum { -- SHORTCUTS_HOME, -- SHORTCUTS_DESKTOP, -- SHORTCUTS_VOLUMES, -- SHORTCUTS_SHORTCUTS, -- SHORTCUTS_BOOKMARKS_SEPARATOR, -- SHORTCUTS_BOOKMARKS, -- SHORTCUTS_CURRENT_FOLDER_SEPARATOR, -- SHORTCUTS_CURRENT_FOLDER --} ShortcutsIndex; -- - /* Icon size for if we can't get it from the theme */ - #define FALLBACK_ICON_SIZE 16 - --#define PREVIEW_HBOX_SPACING 12 -+#define LIST_HBOX_SPACING DEFAULT_SPACING - #define NUM_LINES 40 - #define NUM_CHARS 60 - -@@ -348,7 +276,6 @@ static gboolean gtk_file_chooser_d - const GtkFilePath *path, - GError **error); - static GSList * gtk_file_chooser_default_list_shortcut_folders (GtkFileChooser *chooser); -- - static void gtk_file_chooser_default_get_default_size (GtkFileChooserEmbed *chooser_embed, - gint *default_width, - gint *default_height); -@@ -365,37 +292,11 @@ static void down_folder_handler (GtkF - static void home_folder_handler (GtkFileChooserDefault *impl); - static void update_appearance (GtkFileChooserDefault *impl); - --static void set_current_filter (GtkFileChooserDefault *impl, -- GtkFileFilter *filter); --static void check_preview_change (GtkFileChooserDefault *impl); -- - static void filter_combo_changed (GtkComboBox *combo_box, - GtkFileChooserDefault *impl); --static void shortcuts_row_activated_cb (GtkTreeView *tree_view, -- GtkTreePath *path, -- GtkTreeViewColumn *column, -- GtkFileChooserDefault *impl); -- --static gboolean shortcuts_key_press_event_cb (GtkWidget *widget, -- GdkEventKey *event, -- GtkFileChooserDefault *impl); -- --static gboolean shortcuts_select_func (GtkTreeSelection *selection, -- GtkTreeModel *model, -- GtkTreePath *path, -- gboolean path_currently_selected, -- gpointer data); --static gboolean shortcuts_get_selected (GtkFileChooserDefault *impl, -- GtkTreeIter *iter); --static void shortcuts_activate_iter (GtkFileChooserDefault *impl, -- GtkTreeIter *iter); --static int shortcuts_get_index (GtkFileChooserDefault *impl, -- ShortcutsIndex where); --static int shortcut_find_position (GtkFileChooserDefault *impl, -- const GtkFilePath *path); -- --static void bookmarks_check_add_sensitivity (GtkFileChooserDefault *impl); - -+static void set_current_filter (GtkFileChooserDefault *impl, -+ GtkFileFilter *filter); - static gboolean list_select_func (GtkTreeSelection *selection, - GtkTreeModel *model, - GtkTreePath *path, -@@ -414,16 +315,6 @@ static void select_func (GtkFileSystemMo - GtkTreeIter *iter, - gpointer user_data); - --static void path_bar_clicked (GtkPathBar *path_bar, -- GtkFilePath *file_path, -- gboolean child_is_hidden, -- GtkFileChooserDefault *impl); -- --static void add_bookmark_button_clicked_cb (GtkButton *button, -- GtkFileChooserDefault *impl); --static void remove_bookmark_button_clicked_cb (GtkButton *button, -- GtkFileChooserDefault *impl); -- - static void list_icon_data_func (GtkTreeViewColumn *tree_column, - GtkCellRenderer *cell, - GtkTreeModel *tree_model, -@@ -455,36 +346,6 @@ static void browse_files_center_selected - - static GObjectClass *parent_class; - -- -- --/* Drag and drop interface declarations */ -- --typedef struct { -- GtkTreeModelFilter parent; -- -- GtkFileChooserDefault *impl; --} ShortcutsModelFilter; -- --typedef struct { -- GtkTreeModelFilterClass parent_class; --} ShortcutsModelFilterClass; -- --#define SHORTCUTS_MODEL_FILTER_TYPE (_shortcuts_model_filter_get_type ()) --#define SHORTCUTS_MODEL_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHORTCUTS_MODEL_FILTER_TYPE, ShortcutsModelFilter)) -- --static void shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface); -- --G_DEFINE_TYPE_WITH_CODE (ShortcutsModelFilter, -- _shortcuts_model_filter, -- GTK_TYPE_TREE_MODEL_FILTER, -- G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE, -- shortcuts_model_filter_drag_source_iface_init)); -- --static GtkTreeModel *shortcuts_model_filter_new (GtkFileChooserDefault *impl, -- GtkTreeModel *child_model, -- GtkTreePath *root); -- -- - - GType - _gtk_file_chooser_default_get_type (void) -@@ -534,6 +395,11 @@ _gtk_file_chooser_default_get_type (void - return file_chooser_default_type; - } - -+enum -+{ -+ GTK_FILE_CHOOSER_PROP_ROOT_FOLDER = GTK_FILE_CHOOSER_PROP_LAST + 1, -+}; -+ - static void - gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class) - { -@@ -631,6 +497,14 @@ gtk_file_chooser_default_class_init (Gtk - "home-folder", - 0); - -+ g_object_class_install_property (gobject_class, -+ GTK_FILE_CHOOSER_PROP_ROOT_FOLDER, -+ g_param_spec_string ("root-folder", -+ P_("File System Root"), -+ P_("Root folder for the file system below which the user should not be able to switch"), -+ NULL, -+ G_PARAM_WRITABLE)); -+ - _gtk_file_chooser_install_properties (gobject_class); - - gtk_settings_install_property (g_param_spec_string ("gtk-file-chooser-backend", -@@ -648,7 +522,6 @@ gtk_file_chooser_default_iface_init (Gtk - iface->select_all = gtk_file_chooser_default_select_all; - iface->unselect_all = gtk_file_chooser_default_unselect_all; - iface->get_paths = gtk_file_chooser_default_get_paths; -- iface->get_preview_path = gtk_file_chooser_default_get_preview_path; - iface->get_file_system = gtk_file_chooser_default_get_file_system; - iface->set_current_folder = gtk_file_chooser_default_set_current_folder; - iface->get_current_folder = gtk_file_chooser_default_get_current_folder; -@@ -656,9 +529,12 @@ gtk_file_chooser_default_iface_init (Gtk - iface->add_filter = gtk_file_chooser_default_add_filter; - iface->remove_filter = gtk_file_chooser_default_remove_filter; - iface->list_filters = gtk_file_chooser_default_list_filters; -+ -+ /* these are only stubs */ -+ iface->get_preview_path = gtk_file_chooser_default_get_preview_path; - iface->add_shortcut_folder = gtk_file_chooser_default_add_shortcut_folder; - iface->remove_shortcut_folder = gtk_file_chooser_default_remove_shortcut_folder; -- iface->list_shortcut_folders = gtk_file_chooser_default_list_shortcut_folders; -+ - } - - static void -@@ -673,71 +549,22 @@ static void - gtk_file_chooser_default_init (GtkFileChooserDefault *impl) - { - impl->local_only = TRUE; -- impl->preview_widget_active = TRUE; -- impl->use_preview_label = TRUE; - impl->select_multiple = FALSE; - impl->show_hidden = FALSE; - impl->icon_size = FALLBACK_ICON_SIZE; - impl->load_state = LOAD_EMPTY; - impl->pending_select_paths = NULL; -- -+ impl->path_history = NULL; -+ - gtk_widget_set_redraw_on_allocate (GTK_WIDGET (impl), TRUE); -- gtk_box_set_spacing (GTK_BOX (impl), 12); -+ gtk_box_set_spacing (GTK_BOX (impl), DEFAULT_SPACING); - - impl->tooltips = gtk_tooltips_new (); - g_object_ref (impl->tooltips); - gtk_object_sink (GTK_OBJECT (impl->tooltips)); --} -- --/* Frees the data columns for the specified iter in the shortcuts model*/ --static void --shortcuts_free_row_data (GtkFileChooserDefault *impl, -- GtkTreeIter *iter) --{ -- gpointer col_data; -- gboolean is_volume; -- -- gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), iter, -- SHORTCUTS_COL_DATA, &col_data, -- SHORTCUTS_COL_IS_VOLUME, &is_volume, -- -1); -- if (!col_data) -- return; -- -- if (is_volume) -- { -- GtkFileSystemVolume *volume; -- -- volume = col_data; -- gtk_file_system_volume_free (impl->file_system, volume); -- } -- else -- { -- GtkFilePath *path; -- -- path = col_data; -- gtk_file_path_free (path); -- } --} -- --/* Frees all the data columns in the shortcuts model */ --static void --shortcuts_free (GtkFileChooserDefault *impl) --{ -- GtkTreeIter iter; - -- if (!impl->shortcuts_model) -- return; -- -- if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (impl->shortcuts_model), &iter)) -- do -- { -- shortcuts_free_row_data (impl, &iter); -- } -- while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model), &iter)); -- -- g_object_unref (impl->shortcuts_model); -- impl->shortcuts_model = NULL; -+ if (!impl->root_folder) -+ impl->root_folder = g_strdup ("/"); - } - - static void -@@ -757,6 +584,7 @@ pending_select_paths_free (GtkFileChoose - impl->pending_select_paths = NULL; - } - -+ - static void - pending_select_paths_add (GtkFileChooserDefault *impl, - const GtkFilePath *path) -@@ -796,20 +624,30 @@ pending_select_paths_store_selection (Gt - } - - static void --gtk_file_chooser_default_finalize (GObject *object) -+path_history_free (GtkFileChooserDefault *impl) - { -- GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (object); - GSList *l; - -- if (impl->shortcuts_filter_model) -- g_object_unref (impl->shortcuts_filter_model); -+ for (l = impl->path_history; l; l = l->next) -+ { -+ GtkFilePath *path; - -- shortcuts_free (impl); -+ path = l->data; -+ gtk_file_path_free (path); -+ } -+ -+ g_slist_free (impl->path_history); -+ impl->path_history = NULL; -+} -+ -+static void -+gtk_file_chooser_default_finalize (GObject *object) -+{ -+ GSList *l; -+ GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (object); - - g_signal_handler_disconnect (impl->file_system, impl->volumes_changed_id); - impl->volumes_changed_id = 0; -- g_signal_handler_disconnect (impl->file_system, impl->bookmarks_changed_id); -- impl->bookmarks_changed_id = 0; - g_object_unref (impl->file_system); - - for (l = impl->filters; l; l = l->next) -@@ -830,11 +668,9 @@ gtk_file_chooser_default_finalize (GObje - if (impl->current_folder) - gtk_file_path_free (impl->current_folder); - -- if (impl->preview_path) -- gtk_file_path_free (impl->preview_path); -- - pending_select_paths_free (impl); -- -+ path_history_free (impl); -+ - load_remove_timer (impl); - - /* Free all the Models we have */ -@@ -844,12 +680,12 @@ gtk_file_chooser_default_finalize (GObje - if (impl->sort_model) - g_object_unref (impl->sort_model); - -- g_free (impl->preview_display_name); -- - g_free (impl->edited_new_text); - - g_object_unref (impl->tooltips); - -+ g_free (impl->root_folder); -+ - G_OBJECT_CLASS (parent_class)->finalize (object); - } - -@@ -930,28 +766,6 @@ error_getting_info_dialog (GtkFileChoose - path, error); - } - --/* Shows an error dialog about not being able to add a bookmark */ --static void --error_adding_bookmark_dialog (GtkFileChooserDefault *impl, -- const GtkFilePath *path, -- GError *error) --{ -- error_dialog (impl, -- _("Could not add a bookmark"), -- path, error); --} -- --/* Shows an error dialog about not being able to remove a bookmark */ --static void --error_removing_bookmark_dialog (GtkFileChooserDefault *impl, -- const GtkFilePath *path, -- GError *error) --{ -- error_dialog (impl, -- _("Could not remove bookmark"), -- path, error); --} -- - /* Shows an error dialog about not being able to create a folder */ - static void - error_creating_folder_dialog (GtkFileChooserDefault *impl, -@@ -963,21 +777,6 @@ error_creating_folder_dialog (GtkFileCho - path, error); - } - --/* Shows an error about not being able to create a folder because a file with -- * the same name is already there. -- */ --static void --error_creating_folder_over_existing_file_dialog (GtkFileChooserDefault *impl, -- const GtkFilePath *path, -- GError *error) --{ -- error_dialog (impl, -- _("The folder could not be created, as a file with the same name " -- "already exists. Try using a different name for the folder, " -- "or rename the file first."), -- path, error); --} -- - /* Shows an error dialog about not being able to create a filename */ - static void - error_building_filename_dialog (GtkFileChooserDefault *impl, -@@ -1007,6 +806,7 @@ change_folder_and_display_error (GtkFile - GError *error; - gboolean result; - GtkFilePath *path_copy; -+ gchar * file_name; - - /* We copy the path because of this case: - * -@@ -1019,6 +819,29 @@ change_folder_and_display_error (GtkFile - - path_copy = gtk_file_path_copy (path); - -+ file_name = gtk_file_system_path_to_filename (impl->file_system, path_copy); -+ -+ /* refuse to change below the root */ -+ if (file_name && impl->root_folder && -+ strcmp (file_name, impl->root_folder) && -+ !strncmp (file_name, impl->root_folder, strlen (file_name))) -+ { -+ -+ gtk_file_path_free (path_copy); -+ g_free (file_name); -+ return 0; -+ } -+ else if (file_name && impl->root_folder && -+ !strcmp (file_name, impl->root_folder)) -+ { -+ gtk_widget_set_sensitive (impl->up_button, FALSE); -+ } -+ else -+ { -+ gtk_widget_set_sensitive (impl->up_button, TRUE); -+ } -+ -+ - error = NULL; - result = gtk_file_chooser_default_update_current_folder (GTK_FILE_CHOOSER (impl), path_copy, TRUE, &error); - -@@ -1026,189 +849,11 @@ change_folder_and_display_error (GtkFile - error_changing_folder_dialog (impl, path_copy, error); - - gtk_file_path_free (path_copy); -- -+ g_free (file_name); -+ - return result; - } - --static void --update_preview_widget_visibility (GtkFileChooserDefault *impl) --{ -- if (impl->use_preview_label) -- { -- if (!impl->preview_label) -- { -- impl->preview_label = gtk_label_new (impl->preview_display_name); -- gtk_box_pack_start (GTK_BOX (impl->preview_box), impl->preview_label, FALSE, FALSE, 0); -- gtk_box_reorder_child (GTK_BOX (impl->preview_box), impl->preview_label, 0); -- gtk_label_set_ellipsize (GTK_LABEL (impl->preview_label), PANGO_ELLIPSIZE_MIDDLE); -- gtk_widget_show (impl->preview_label); -- } -- } -- else -- { -- if (impl->preview_label) -- { -- gtk_widget_destroy (impl->preview_label); -- impl->preview_label = NULL; -- } -- } -- -- if (impl->preview_widget_active && impl->preview_widget) -- gtk_widget_show (impl->preview_box); -- else -- gtk_widget_hide (impl->preview_box); -- -- g_signal_emit_by_name (impl, "default-size-changed"); --} -- --static void --set_preview_widget (GtkFileChooserDefault *impl, -- GtkWidget *preview_widget) --{ -- if (preview_widget == impl->preview_widget) -- return; -- -- if (impl->preview_widget) -- gtk_container_remove (GTK_CONTAINER (impl->preview_box), -- impl->preview_widget); -- -- impl->preview_widget = preview_widget; -- if (impl->preview_widget) -- { -- gtk_widget_show (impl->preview_widget); -- gtk_box_pack_start (GTK_BOX (impl->preview_box), impl->preview_widget, TRUE, TRUE, 0); -- gtk_box_reorder_child (GTK_BOX (impl->preview_box), -- impl->preview_widget, -- (impl->use_preview_label && impl->preview_label) ? 1 : 0); -- } -- -- update_preview_widget_visibility (impl); --} -- --/* Re-reads all the icons for the shortcuts, used when the theme changes */ --static void --shortcuts_reload_icons (GtkFileChooserDefault *impl) --{ -- GtkTreeIter iter; -- -- if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (impl->shortcuts_model), &iter)) -- return; -- -- do { -- gpointer data; -- gboolean is_volume; -- gboolean pixbuf_visible; -- GdkPixbuf *pixbuf; -- -- gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), &iter, -- SHORTCUTS_COL_DATA, &data, -- SHORTCUTS_COL_IS_VOLUME, &is_volume, -- SHORTCUTS_COL_PIXBUF_VISIBLE, &pixbuf_visible, -- -1); -- -- if (pixbuf_visible && data) -- { -- if (is_volume) -- { -- GtkFileSystemVolume *volume; -- -- volume = data; -- pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl), -- impl->icon_size, NULL); -- } -- else -- { -- const GtkFilePath *path; -- -- path = data; -- pixbuf = gtk_file_system_render_icon (impl->file_system, path, GTK_WIDGET (impl), -- impl->icon_size, NULL); -- } -- -- gtk_list_store_set (impl->shortcuts_model, &iter, -- SHORTCUTS_COL_PIXBUF, pixbuf, -- -1); -- if (pixbuf) -- g_object_unref (pixbuf); -- } -- } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter)); --} -- --static void --shortcuts_find_folder (GtkFileChooserDefault *impl, -- GtkFilePath *folder) --{ -- GtkTreeSelection *selection; -- int pos; -- GtkTreePath *path; -- -- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view)); -- -- g_assert (folder != NULL); -- pos = shortcut_find_position (impl, folder); -- if (pos == -1) -- { -- gtk_tree_selection_unselect_all (selection); -- return; -- } -- -- path = gtk_tree_path_new_from_indices (pos, -1); -- gtk_tree_selection_select_path (selection, path); -- gtk_tree_path_free (path); --} -- --/* If a shortcut corresponds to the current folder, selects it */ --static void --shortcuts_find_current_folder (GtkFileChooserDefault *impl) --{ -- shortcuts_find_folder (impl, impl->current_folder); --} -- --/* Convenience function to get the display name and icon info for a path */ --static GtkFileInfo * --get_file_info (GtkFileSystem *file_system, -- const GtkFilePath *path, -- gboolean name_only, -- GError **error) --{ -- GtkFilePath *parent_path; -- GtkFileFolder *parent_folder; -- GtkFileInfo *info; -- GError *tmp = NULL; -- -- parent_path = NULL; -- info = NULL; -- -- if (!gtk_file_system_get_parent (file_system, path, &parent_path, &tmp)) -- goto out; -- -- parent_folder = gtk_file_system_get_folder (file_system, parent_path ? parent_path : path, -- GTK_FILE_INFO_DISPLAY_NAME -- | (name_only ? 0 : GTK_FILE_INFO_IS_FOLDER), -- &tmp); -- if (!parent_folder) -- goto out; -- -- info = gtk_file_folder_get_info (parent_folder, parent_path ? path : NULL, &tmp); -- g_object_unref (parent_folder); -- -- out: -- if (parent_path) -- gtk_file_path_free (parent_path); -- -- if (tmp) -- { -- g_set_error (error, -- GTK_FILE_CHOOSER_ERROR, -- GTK_FILE_CHOOSER_ERROR_BAD_FILENAME, -- _("Could not get information about '%s': %s"), -- gtk_file_path_get_string (path), -- tmp->message); -- g_error_free (tmp); -- } -- -- return info; --} - - /* Returns whether a path is a folder */ - static gboolean -@@ -1217,8 +862,11 @@ check_is_folder (GtkFileSystem *fil - GError **error) - { - GtkFileFolder *folder; - |
