diff options
| author | Tomas Frydrych <tf@openedhand.com> | 2007-08-30 14:15:47 +0000 |
|---|---|---|
| committer | Tomas Frydrych <tf@openedhand.com> | 2007-08-30 14:15:47 +0000 |
| commit | 1c87082989bd7afb92d48673851116c95d0cb746 (patch) | |
| tree | 770be16a072bf8640937419b26f5c3d217a96dab | |
| parent | 5ee5800fae29d5665472c73c5ce67157f77acb90 (diff) | |
| download | poky-1c87082989bd7afb92d48673851116c95d0cb746.tar.gz | |
added current location to filechooser dialog
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2608 311d38ba-8fff-0310-9ca6-ca027cbcb966
| -rw-r--r-- | meta/packages/gtk+/gtk+-2.10.14/filechooser-default.patch | 420 | ||||
| -rw-r--r-- | meta/packages/gtk+/gtk+_2.10.14.bb | 2 |
2 files changed, 218 insertions, 204 deletions
diff --git a/meta/packages/gtk+/gtk+-2.10.14/filechooser-default.patch b/meta/packages/gtk+/gtk+-2.10.14/filechooser-default.patch index 0495cc9a85..5e68c48739 100644 --- a/meta/packages/gtk+/gtk+-2.10.14/filechooser-default.patch +++ b/meta/packages/gtk+/gtk+-2.10.14/filechooser-default.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | 1 | Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c |
| 2 | =================================================================== | 2 | =================================================================== |
| 3 | --- gtk+-2.10.14.orig/gtk/gtkfilechooserdefault.c 2007-07-16 20:44:17.000000000 +0100 | 3 | --- gtk+-2.10.14.orig/gtk/gtkfilechooserdefault.c 2007-07-16 20:44:17.000000000 +0100 |
| 4 | +++ gtk+-2.10.14/gtk/gtkfilechooserdefault.c 2007-08-29 18:03:50.000000000 +0100 | 4 | +++ gtk+-2.10.14/gtk/gtkfilechooserdefault.c 2007-08-30 15:23:54.000000000 +0100 |
| 5 | @@ -33,7 +33,6 @@ | 5 | @@ -33,7 +33,6 @@ |
| 6 | #include "gtkcombobox.h" | 6 | #include "gtkcombobox.h" |
| 7 | #include "gtkentry.h" | 7 | #include "gtkentry.h" |
| @@ -561,7 +561,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 561 | /* Shows an error dialog about not being able to create a folder */ | 561 | /* Shows an error dialog about not being able to create a folder */ |
| 562 | static void | 562 | static void |
| 563 | error_creating_folder_dialog (GtkFileChooserDefault *impl, | 563 | error_creating_folder_dialog (GtkFileChooserDefault *impl, |
| 564 | @@ -1015,2637 +776,387 @@ | 564 | @@ -1015,2637 +776,389 @@ |
| 565 | 565 | ||
| 566 | /* Changes folders, displaying an error dialog if this fails */ | 566 | /* Changes folders, displaying an error dialog if this fails */ |
| 567 | static gboolean | 567 | static gboolean |
| @@ -664,9 +664,11 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 664 | + if (errormsg && !result) | 664 | + if (errormsg && !result) |
| 665 | error_changing_folder_dialog (impl, path_copy, error); | 665 | error_changing_folder_dialog (impl, path_copy, error); |
| 666 | 666 | ||
| 667 | gtk_file_path_free (path_copy); | 667 | - gtk_file_path_free (path_copy); |
| 668 | - | 668 | + gtk_label_set_text (GTK_LABEL (impl->location_label), file_name); |
| 669 | |||
| 669 | - profile_end ("end", (char *) path); | 670 | - profile_end ("end", (char *) path); |
| 671 | + gtk_file_path_free (path_copy); | ||
| 670 | + g_free (file_name); | 672 | + g_free (file_name); |
| 671 | 673 | ||
| 672 | return result; | 674 | return result; |
| @@ -795,9 +797,9 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 795 | - | 797 | - |
| 796 | - if (!g_slist_find (data->impl->reload_icon_handles, handle)) | 798 | - if (!g_slist_find (data->impl->reload_icon_handles, handle)) |
| 797 | - goto out; | 799 | - goto out; |
| 798 | - | ||
| 799 | - data->impl->reload_icon_handles = g_slist_remove (data->impl->reload_icon_handles, handle); | ||
| 800 | 800 | ||
| 801 | - data->impl->reload_icon_handles = g_slist_remove (data->impl->reload_icon_handles, handle); | ||
| 802 | - | ||
| 801 | - if (cancelled || error) | 803 | - if (cancelled || error) |
| 802 | - goto out; | 804 | - goto out; |
| 803 | + if (!impl->browse_files_model) | 805 | + if (!impl->browse_files_model) |
| @@ -862,32 +864,36 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 862 | - } | 864 | - } |
| 863 | - g_slist_free (impl->reload_icon_handles); | 865 | - g_slist_free (impl->reload_icon_handles); |
| 864 | - impl->reload_icon_handles = NULL; | 866 | - impl->reload_icon_handles = NULL; |
| 865 | - | 867 | + impl->pending_handles = g_slist_remove (impl->pending_handles, handle); |
| 868 | |||
| 866 | - do | 869 | - do |
| 867 | - { | 870 | - { |
| 868 | - gpointer data; | 871 | - gpointer data; |
| 869 | - gboolean is_volume; | 872 | - gboolean is_volume; |
| 870 | - gboolean pixbuf_visible; | 873 | - gboolean pixbuf_visible; |
| 871 | - GdkPixbuf *pixbuf; | 874 | - GdkPixbuf *pixbuf; |
| 872 | + impl->pending_handles = g_slist_remove (impl->pending_handles, handle); | 875 | + if (cancelled) |
| 876 | + goto out; | ||
| 873 | 877 | ||
| 874 | - gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), &iter, | 878 | - gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), &iter, |
| 875 | - SHORTCUTS_COL_DATA, &data, | 879 | - SHORTCUTS_COL_DATA, &data, |
| 876 | - SHORTCUTS_COL_IS_VOLUME, &is_volume, | 880 | - SHORTCUTS_COL_IS_VOLUME, &is_volume, |
| 877 | - SHORTCUTS_COL_PIXBUF_VISIBLE, &pixbuf_visible, | 881 | - SHORTCUTS_COL_PIXBUF_VISIBLE, &pixbuf_visible, |
| 878 | - -1); | 882 | - -1); |
| 879 | + if (cancelled) | 883 | + if (!error) |
| 880 | + goto out; | 884 | + change_folder_and_display_error (impl, path); |
| 885 | + else | ||
| 886 | + error_creating_folder_dialog (impl, path, g_error_copy (error)); | ||
| 881 | 887 | ||
| 882 | - if (pixbuf_visible && data) | 888 | - if (pixbuf_visible && data) |
| 883 | - { | 889 | - { |
| 884 | - if (is_volume) | 890 | - if (is_volume) |
| 885 | - { | 891 | - { |
| 886 | - GtkFileSystemVolume *volume; | 892 | - GtkFileSystemVolume *volume; |
| 887 | + if (!error) | 893 | + out: |
| 888 | + change_folder_and_display_error (impl, path); | 894 | + g_object_unref (impl); |
| 889 | + else | 895 | + g_object_unref (handle); |
| 890 | + error_creating_folder_dialog (impl, path, g_error_copy (error)); | 896 | +} |
| 891 | 897 | ||
| 892 | - volume = data; | 898 | - volume = data; |
| 893 | - pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl), | 899 | - pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl), |
| @@ -896,11 +902,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 896 | - gtk_list_store_set (impl->shortcuts_model, &iter, | 902 | - gtk_list_store_set (impl->shortcuts_model, &iter, |
| 897 | - SHORTCUTS_COL_PIXBUF, pixbuf, | 903 | - SHORTCUTS_COL_PIXBUF, pixbuf, |
| 898 | - -1); | 904 | - -1); |
| 899 | + out: | 905 | - |
| 900 | + g_object_unref (impl); | ||
| 901 | + g_object_unref (handle); | ||
| 902 | +} | ||
| 903 | |||
| 904 | - if (pixbuf) | 906 | - if (pixbuf) |
| 905 | - g_object_unref (pixbuf); | 907 | - g_object_unref (pixbuf); |
| 906 | - } | 908 | - } |
| @@ -2995,12 +2997,12 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 2995 | - | 2997 | - |
| 2996 | - if (!text) | 2998 | - if (!text) |
| 2997 | - return TRUE; | 2999 | - return TRUE; |
| 2998 | - | 3000 | |
| 2999 | - g_free (text); | 3001 | - g_free (text); |
| 3000 | - | 3002 | - |
| 3001 | - return FALSE; | 3003 | - return FALSE; |
| 3002 | -} | 3004 | -} |
| 3003 | 3005 | - | |
| 3004 | -/* Since GtkTreeView has a keybinding attached to '/', we need to catch | 3006 | -/* Since GtkTreeView has a keybinding attached to '/', we need to catch |
| 3005 | - * keypresses before the TreeView gets them. | 3007 | - * keypresses before the TreeView gets them. |
| 3006 | - */ | 3008 | - */ |
| @@ -3078,7 +3080,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3078 | -} | 3080 | -} |
| 3079 | - | 3081 | - |
| 3080 | -/* Constructs the popup menu for the file list if needed */ | 3082 | -/* Constructs the popup menu for the file list if needed */ |
| 3081 | -static void | 3083 | static void |
| 3082 | -shortcuts_build_popup_menu (GtkFileChooserDefault *impl) | 3084 | -shortcuts_build_popup_menu (GtkFileChooserDefault *impl) |
| 3083 | -{ | 3085 | -{ |
| 3084 | - GtkWidget *item; | 3086 | - GtkWidget *item; |
| @@ -3110,7 +3112,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3110 | - shortcuts_check_popup_sensitivity (impl); | 3112 | - shortcuts_check_popup_sensitivity (impl); |
| 3111 | -} | 3113 | -} |
| 3112 | - | 3114 | - |
| 3113 | static void | 3115 | -static void |
| 3114 | -shortcuts_update_popup_menu (GtkFileChooserDefault *impl) | 3116 | -shortcuts_update_popup_menu (GtkFileChooserDefault *impl) |
| 3115 | +queue_edited_idle (GtkFileChooserDefault *impl, | 3117 | +queue_edited_idle (GtkFileChooserDefault *impl, |
| 3116 | + const gchar *new_text) | 3118 | + const gchar *new_text) |
| @@ -3183,10 +3185,10 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3183 | - in_press = TRUE; | 3185 | - in_press = TRUE; |
| 3184 | - handled = gtk_widget_event (impl->browse_shortcuts_tree_view, (GdkEvent *) event); | 3186 | - handled = gtk_widget_event (impl->browse_shortcuts_tree_view, (GdkEvent *) event); |
| 3185 | - in_press = FALSE; | 3187 | - in_press = FALSE; |
| 3186 | 3188 | - | |
| 3187 | - if (!handled) | 3189 | - if (!handled) |
| 3188 | - return FALSE; | 3190 | - return FALSE; |
| 3189 | - | 3191 | |
| 3190 | - shortcuts_popup_menu (impl, event); | 3192 | - shortcuts_popup_menu (impl, event); |
| 3191 | - return TRUE; | 3193 | - return TRUE; |
| 3192 | + g_free (impl->edited_new_text); | 3194 | + g_free (impl->edited_new_text); |
| @@ -3199,7 +3201,11 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3199 | - gchar *path_string, | 3201 | - gchar *path_string, |
| 3200 | - gchar *new_text, | 3202 | - gchar *new_text, |
| 3201 | - GtkFileChooserDefault *impl) | 3203 | - GtkFileChooserDefault *impl) |
| 3202 | -{ | 3204 | +renderer_edited_cb (GtkCellRendererText *cell_renderer_text, |
| 3205 | + const gchar *path, | ||
| 3206 | + const gchar *new_text, | ||
| 3207 | + GtkFileChooserDefault *impl) | ||
| 3208 | { | ||
| 3203 | - GtkTreePath *path; | 3209 | - GtkTreePath *path; |
| 3204 | - GtkTreeIter iter; | 3210 | - GtkTreeIter iter; |
| 3205 | - GtkFilePath *shortcut; | 3211 | - GtkFilePath *shortcut; |
| @@ -3216,11 +3222,6 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3216 | - gtk_tree_path_free (path); | 3222 | - gtk_tree_path_free (path); |
| 3217 | - | 3223 | - |
| 3218 | - gtk_file_system_set_bookmark_label (impl->file_system, shortcut, new_text); | 3224 | - gtk_file_system_set_bookmark_label (impl->file_system, shortcut, new_text); |
| 3219 | +renderer_edited_cb (GtkCellRendererText *cell_renderer_text, | ||
| 3220 | + const gchar *path, | ||
| 3221 | + const gchar *new_text, | ||
| 3222 | + GtkFileChooserDefault *impl) | ||
| 3223 | +{ | ||
| 3224 | + /* work around bug #154921 */ | 3225 | + /* work around bug #154921 */ |
| 3225 | + g_object_set (cell_renderer_text, | 3226 | + g_object_set (cell_renderer_text, |
| 3226 | + "mode", GTK_CELL_RENDERER_MODE_INERT, NULL); | 3227 | + "mode", GTK_CELL_RENDERER_MODE_INERT, NULL); |
| @@ -3471,7 +3472,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3471 | /* Handles key press events on the file list, so that we can trap Enter to | 3472 | /* Handles key press events on the file list, so that we can trap Enter to |
| 3472 | * activate the default button on our own. Also, checks to see if '/' has been | 3473 | * activate the default button on our own. Also, checks to see if '/' has been |
| 3473 | * pressed. See comment by tree_view_keybinding_cb() for more details. | 3474 | * pressed. See comment by tree_view_keybinding_cb() for more details. |
| 3474 | @@ -3662,17 +1173,6 @@ | 3475 | @@ -3662,17 +1175,6 @@ |
| 3475 | 3476 | ||
| 3476 | modifiers = gtk_accelerator_get_default_mod_mask (); | 3477 | modifiers = gtk_accelerator_get_default_mod_mask (); |
| 3477 | 3478 | ||
| @@ -3489,15 +3490,10 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3489 | if ((event->keyval == GDK_Return | 3490 | if ((event->keyval == GDK_Return |
| 3490 | || event->keyval == GDK_ISO_Enter | 3491 | || event->keyval == GDK_ISO_Enter |
| 3491 | || event->keyval == GDK_KP_Enter | 3492 | || event->keyval == GDK_KP_Enter |
| 3492 | @@ -3692,372 +1192,71 @@ | 3493 | @@ -3697,367 +1199,66 @@ |
| 3493 | gtk_window_activate_default (window); | 3494 | return FALSE; |
| 3494 | return TRUE; | 3495 | } |
| 3495 | } | 3496 | |
| 3496 | - } | ||
| 3497 | - | ||
| 3498 | - return FALSE; | ||
| 3499 | -} | ||
| 3500 | - | ||
| 3501 | -/* Callback used when the file list's popup menu is detached */ | 3497 | -/* Callback used when the file list's popup menu is detached */ |
| 3502 | -static void | 3498 | -static void |
| 3503 | -popup_menu_detach_cb (GtkWidget *attach_widget, | 3499 | -popup_menu_detach_cb (GtkWidget *attach_widget, |
| @@ -3706,7 +3702,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3706 | - | 3702 | - |
| 3707 | -/* Disable the normal tree drag motion handler, it makes it look like you're | 3703 | -/* Disable the normal tree drag motion handler, it makes it look like you're |
| 3708 | - dropping the dragged item onto a tree item */ | 3704 | - dropping the dragged item onto a tree item */ |
| 3709 | -static gboolean | 3705 | static gboolean |
| 3710 | -file_list_drag_motion_cb (GtkWidget *widget, | 3706 | -file_list_drag_motion_cb (GtkWidget *widget, |
| 3711 | - GdkDragContext *context, | 3707 | - GdkDragContext *context, |
| 3712 | - gint x, | 3708 | - gint x, |
| @@ -3778,7 +3774,8 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3778 | - gint *y, | 3774 | - gint *y, |
| 3779 | - gboolean *push_in, | 3775 | - gboolean *push_in, |
| 3780 | - gpointer user_data) | 3776 | - gpointer user_data) |
| 3781 | -{ | 3777 | +list_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data) |
| 3778 | { | ||
| 3782 | - GtkWidget *widget = GTK_WIDGET (user_data); | 3779 | - GtkWidget *widget = GTK_WIDGET (user_data); |
| 3783 | - GdkScreen *screen = gtk_widget_get_screen (widget); | 3780 | - GdkScreen *screen = gtk_widget_get_screen (widget); |
| 3784 | - GtkRequisition req; | 3781 | - GtkRequisition req; |
| @@ -3800,28 +3797,23 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3800 | - | 3797 | - |
| 3801 | - *x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width)); | 3798 | - *x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width)); |
| 3802 | - *y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height)); | 3799 | - *y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height)); |
| 3803 | + } | 3800 | - |
| 3804 | |||
| 3805 | - *push_in = FALSE; | 3801 | - *push_in = FALSE; |
| 3806 | + return FALSE; | 3802 | -} |
| 3807 | } | 3803 | + GtkTreeView * tree = GTK_TREE_VIEW (widget); |
| 3804 | + GtkFileChooserDefault *impl = data; | ||
| 3805 | + GtkTreePath *path; | ||
| 3808 | 3806 | ||
| 3809 | -static void | 3807 | -static void |
| 3810 | -file_list_popup_menu (GtkFileChooserDefault *impl, | 3808 | -file_list_popup_menu (GtkFileChooserDefault *impl, |
| 3811 | - GdkEventButton *event) | 3809 | - GdkEventButton *event) |
| 3812 | +static gboolean | 3810 | -{ |
| 3813 | +list_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data) | ||
| 3814 | { | ||
| 3815 | - file_list_update_popup_menu (impl); | 3811 | - file_list_update_popup_menu (impl); |
| 3816 | - if (event) | 3812 | - if (event) |
| 3817 | - gtk_menu_popup (GTK_MENU (impl->browse_files_popup_menu), | 3813 | - gtk_menu_popup (GTK_MENU (impl->browse_files_popup_menu), |
| 3818 | - NULL, NULL, NULL, NULL, | 3814 | - NULL, NULL, NULL, NULL, |
| 3819 | - event->button, event->time); | 3815 | - event->button, event->time); |
| 3820 | - else | 3816 | - else |
| 3821 | + GtkTreeView * tree = GTK_TREE_VIEW (widget); | ||
| 3822 | + GtkFileChooserDefault *impl = data; | ||
| 3823 | + GtkTreePath *path; | ||
| 3824 | + | ||
| 3825 | + if (event->type != GDK_BUTTON_PRESS || | 3817 | + if (event->type != GDK_BUTTON_PRESS || |
| 3826 | + !gtk_tree_view_get_path_at_pos (tree, (gint)event->x, (gint)event->y, | 3818 | + !gtk_tree_view_get_path_at_pos (tree, (gint)event->x, (gint)event->y, |
| 3827 | + &path, NULL, NULL, NULL)) | 3819 | + &path, NULL, NULL, NULL)) |
| @@ -3834,11 +3826,9 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3834 | - FALSE); | 3826 | - FALSE); |
| 3835 | + return FALSE; | 3827 | + return FALSE; |
| 3836 | } | 3828 | } |
| 3837 | 3829 | - | |
| 3838 | -} | 3830 | -} |
| 3839 | + impl->list_press_time = event->time; | 3831 | - |
| 3840 | + impl->list_press_path = path; | ||
| 3841 | |||
| 3842 | -/* Callback used for the GtkWidget::popup-menu signal of the file list */ | 3832 | -/* Callback used for the GtkWidget::popup-menu signal of the file list */ |
| 3843 | -static gboolean | 3833 | -static gboolean |
| 3844 | -list_popup_menu_cb (GtkWidget *widget, | 3834 | -list_popup_menu_cb (GtkWidget *widget, |
| @@ -3846,6 +3836,10 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3846 | -{ | 3836 | -{ |
| 3847 | - file_list_popup_menu (impl, NULL); | 3837 | - file_list_popup_menu (impl, NULL); |
| 3848 | - return TRUE; | 3838 | - return TRUE; |
| 3839 | + | ||
| 3840 | + impl->list_press_time = event->time; | ||
| 3841 | + impl->list_press_path = path; | ||
| 3842 | + | ||
| 3849 | + return FALSE; | 3843 | + return FALSE; |
| 3850 | } | 3844 | } |
| 3851 | 3845 | ||
| @@ -3909,7 +3903,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3909 | /* Creates the widgets for the file list */ | 3903 | /* Creates the widgets for the file list */ |
| 3910 | static GtkWidget * | 3904 | static GtkWidget * |
| 3911 | create_file_list (GtkFileChooserDefault *impl) | 3905 | create_file_list (GtkFileChooserDefault *impl) |
| 3912 | @@ -4087,37 +1286,19 @@ | 3906 | @@ -4087,37 +1288,19 @@ |
| 3913 | gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (impl->browse_files_tree_view), TRUE); | 3907 | gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (impl->browse_files_tree_view), TRUE); |
| 3914 | gtk_container_add (GTK_CONTAINER (swin), impl->browse_files_tree_view); | 3908 | gtk_container_add (GTK_CONTAINER (swin), impl->browse_files_tree_view); |
| 3915 | 3909 | ||
| @@ -3950,7 +3944,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 3950 | 3944 | ||
| 3951 | g_signal_connect (selection, "changed", | 3945 | g_signal_connect (selection, "changed", |
| 3952 | G_CALLBACK (list_selection_changed), impl); | 3946 | G_CALLBACK (list_selection_changed), impl); |
| 3953 | @@ -4178,230 +1359,206 @@ | 3947 | @@ -4178,230 +1361,214 @@ |
| 3954 | return swin; | 3948 | return swin; |
| 3955 | } | 3949 | } |
| 3956 | 3950 | ||
| @@ -4008,9 +4002,8 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4008 | + int n; | 4002 | + int n; |
| 4009 | + GtkWidget *bar = gtk_hbox_new (FALSE, DEFAULT_SPACING); | 4003 | + GtkWidget *bar = gtk_hbox_new (FALSE, DEFAULT_SPACING); |
| 4010 | + GtkWidget *img; | 4004 | + GtkWidget *img; |
| 4011 | 4005 | + GtkWidget *label; | |
| 4012 | - vbox = gtk_vbox_new (FALSE, 6); | 4006 | + |
| 4013 | - gtk_widget_show (vbox); | ||
| 4014 | + /* first the Up button */ | 4007 | + /* first the Up button */ |
| 4015 | + img = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_BUTTON); | 4008 | + img = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_BUTTON); |
| 4016 | + gtk_widget_show (img); | 4009 | + gtk_widget_show (img); |
| @@ -4024,7 +4017,9 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4024 | + g_signal_connect (impl->up_button, "clicked", | 4017 | + g_signal_connect (impl->up_button, "clicked", |
| 4025 | + G_CALLBACK (up_button_clicked_cb), impl); | 4018 | + G_CALLBACK (up_button_clicked_cb), impl); |
| 4026 | + gtk_box_pack_start (GTK_BOX(bar), impl->up_button, FALSE, FALSE, 0); | 4019 | + gtk_box_pack_start (GTK_BOX(bar), impl->up_button, FALSE, FALSE, 0); |
| 4027 | + | 4020 | |
| 4021 | - vbox = gtk_vbox_new (FALSE, 6); | ||
| 4022 | - gtk_widget_show (vbox); | ||
| 4028 | + impl->num_volumes = 0; | 4023 | + impl->num_volumes = 0; |
| 4029 | + list = gtk_file_system_list_volumes (impl->file_system); | 4024 | + list = gtk_file_system_list_volumes (impl->file_system); |
| 4030 | 4025 | ||
| @@ -4054,7 +4049,8 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4054 | + { | 4049 | + { |
| 4055 | + gboolean is_local = | 4050 | + gboolean is_local = |
| 4056 | + gtk_file_system_path_is_local (impl->file_system, base_path); | 4051 | + gtk_file_system_path_is_local (impl->file_system, base_path); |
| 4057 | + | 4052 | |
| 4053 | - /* Preview */ | ||
| 4058 | + if (!is_local) | 4054 | + if (!is_local) |
| 4059 | + { | 4055 | + { |
| 4060 | + gtk_file_path_free (base_path); | 4056 | + gtk_file_path_free (base_path); |
| @@ -4063,7 +4059,9 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4063 | + } | 4059 | + } |
| 4064 | + } | 4060 | + } |
| 4065 | 4061 | ||
| 4066 | - /* Preview */ | 4062 | - impl->preview_box = gtk_vbox_new (FALSE, 12); |
| 4063 | - gtk_box_pack_start (GTK_BOX (hbox), impl->preview_box, FALSE, FALSE, 0); | ||
| 4064 | - /* Don't show preview box initially */ | ||
| 4067 | +#if 0 | 4065 | +#if 0 |
| 4068 | + label_copy = | 4066 | + label_copy = |
| 4069 | + gtk_file_system_volume_get_display_name (impl->file_system, volume); | 4067 | + gtk_file_system_volume_get_display_name (impl->file_system, volume); |
| @@ -4073,9 +4071,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4073 | + GTK_WIDGET (impl), | 4071 | + GTK_WIDGET (impl), |
| 4074 | + impl->icon_size, NULL); | 4072 | + impl->icon_size, NULL); |
| 4075 | 4073 | ||
| 4076 | - impl->preview_box = gtk_vbox_new (FALSE, 12); | 4074 | - /* Filter combo */ |
| 4077 | - gtk_box_pack_start (GTK_BOX (hbox), impl->preview_box, FALSE, FALSE, 0); | ||
| 4078 | - /* Don't show preview box initially */ | ||
| 4079 | + button = gtk_button_new (); | 4075 | + button = gtk_button_new (); |
| 4080 | + image = gtk_image_new_from_pixbuf (pixbuf); | 4076 | + image = gtk_image_new_from_pixbuf (pixbuf); |
| 4081 | + g_object_unref (G_OBJECT (pixbuf)); | 4077 | + g_object_unref (G_OBJECT (pixbuf)); |
| @@ -4097,59 +4093,67 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4097 | + impl->root_folder); | 4093 | + impl->root_folder); |
| 4098 | + } | 4094 | + } |
| 4099 | 4095 | ||
| 4100 | - /* Filter combo */ | 4096 | - impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12); |
| 4101 | + g_free (file_name); | 4097 | + g_free (file_name); |
| 4102 | + gtk_widget_show_all (button); | 4098 | + gtk_widget_show_all (button); |
| 4103 | 4099 | ||
| 4104 | - impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12); | ||
| 4105 | + g_object_set_data (G_OBJECT (button), "file-path", base_path); | ||
| 4106 | |||
| 4107 | - widget = filter_create (impl); | 4100 | - widget = filter_create (impl); |
| 4108 | + g_signal_connect (button, "clicked", | 4101 | + g_object_set_data (G_OBJECT (button), "file-path", base_path); |
| 4109 | + G_CALLBACK (volume_button_clicked_cb), impl); | ||
| 4110 | 4102 | ||
| 4111 | - g_signal_connect (widget, "realize", | 4103 | - g_signal_connect (widget, "realize", |
| 4112 | - G_CALLBACK (realize_filter_combo), impl); | 4104 | - G_CALLBACK (realize_filter_combo), impl); |
| 4113 | + gtk_box_pack_start (GTK_BOX(bar), button, FALSE, FALSE, 0); | 4105 | + g_signal_connect (button, "clicked", |
| 4114 | + } | 4106 | + G_CALLBACK (volume_button_clicked_cb), impl); |
| 4115 | 4107 | ||
| 4116 | - gtk_widget_show (widget); | 4108 | - gtk_widget_show (widget); |
| 4117 | - gtk_box_pack_end (GTK_BOX (impl->filter_combo_hbox), widget, FALSE, FALSE, 0); | 4109 | - gtk_box_pack_end (GTK_BOX (impl->filter_combo_hbox), widget, FALSE, FALSE, 0); |
| 4118 | + impl->num_volumes = n; | 4110 | + gtk_box_pack_start (GTK_BOX(bar), button, FALSE, FALSE, 0); |
| 4119 | + g_slist_free (list); | 4111 | + } |
| 4120 | 4112 | ||
| 4121 | - gtk_size_group_add_widget (size_group, impl->filter_combo_hbox); | 4113 | - gtk_size_group_add_widget (size_group, impl->filter_combo_hbox); |
| 4122 | - gtk_box_pack_end (GTK_BOX (vbox), impl->filter_combo_hbox, FALSE, FALSE, 0); | 4114 | - gtk_box_pack_end (GTK_BOX (vbox), impl->filter_combo_hbox, FALSE, FALSE, 0); |
| 4123 | + gtk_widget_show (bar); | 4115 | + impl->num_volumes = n; |
| 4116 | + g_slist_free (list); | ||
| 4124 | 4117 | ||
| 4125 | - return vbox; | 4118 | - return vbox; |
| 4126 | + return bar; | 4119 | -} |
| 4127 | } | 4120 | + label = impl->location_label = gtk_label_new (NULL); |
| 4121 | + gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_START); | ||
| 4122 | + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); | ||
| 4123 | + gtk_label_set_text (GTK_LABEL (label), impl->root_folder); | ||
| 4124 | + gtk_widget_show (label); | ||
| 4125 | + gtk_box_pack_start (GTK_BOX(bar), label, TRUE, TRUE, 0); | ||
| 4128 | 4126 | ||
| 4129 | -/* Callback used when the "Browse for more folders" expander is toggled */ | 4127 | -/* Callback used when the "Browse for more folders" expander is toggled */ |
| 4130 | -static void | 4128 | -static void |
| 4131 | -expander_changed_cb (GtkExpander *expander, | 4129 | -expander_changed_cb (GtkExpander *expander, |
| 4132 | - GParamSpec *pspec, | 4130 | - GParamSpec *pspec, |
| 4133 | - GtkFileChooserDefault *impl) | 4131 | - GtkFileChooserDefault *impl) |
| 4132 | -{ | ||
| 4133 | - impl->expand_folders = gtk_expander_get_expanded(GTK_EXPANDER (impl->save_expander)); | ||
| 4134 | - update_appearance (impl); | ||
| 4135 | + gtk_widget_show (bar); | ||
| 4136 | + | ||
| 4137 | + return bar; | ||
| 4138 | } | ||
| 4139 | |||
| 4140 | -/* Callback used when the selection changes in the save folder combo box */ | ||
| 4141 | -static void | ||
| 4142 | -save_folder_combo_changed_cb (GtkComboBox *combo, | ||
| 4143 | - GtkFileChooserDefault *impl) | ||
| 4134 | +/* Creates the widgets for the files/folders pane */ | 4144 | +/* Creates the widgets for the files/folders pane */ |
| 4135 | +static GtkWidget * | 4145 | +static GtkWidget * |
| 4136 | +file_pane_create (GtkFileChooserDefault *impl) | 4146 | +file_pane_create (GtkFileChooserDefault *impl) |
| 4137 | { | 4147 | { |
| 4138 | - impl->expand_folders = gtk_expander_get_expanded(GTK_EXPANDER (impl->save_expander)); | 4148 | - GtkTreeIter iter; |
| 4139 | - update_appearance (impl); | ||
| 4140 | -} | ||
| 4141 | + GtkWidget *vbox; | 4149 | + GtkWidget *vbox; |
| 4142 | + GtkWidget *hbox; | 4150 | + GtkWidget *hbox; |
| 4143 | + GtkWidget *widget; | 4151 | + GtkWidget *widget; |
| 4144 | + vbox = gtk_vbox_new (FALSE, DEFAULT_SPACING); | 4152 | + vbox = gtk_vbox_new (FALSE, DEFAULT_SPACING); |
| 4145 | + gtk_widget_show (vbox); | 4153 | + gtk_widget_show (vbox); |
| 4146 | 4154 | ||
| 4147 | -/* Callback used when the selection changes in the save folder combo box */ | 4155 | - if (impl->changing_folder) |
| 4148 | -static void | 4156 | - return; |
| 4149 | -save_folder_combo_changed_cb (GtkComboBox *combo, | ||
| 4150 | - GtkFileChooserDefault *impl) | ||
| 4151 | -{ | ||
| 4152 | - GtkTreeIter iter; | ||
| 4153 | + /* The volume bar and 'Create Folder' button */ | 4157 | + /* The volume bar and 'Create Folder' button */ |
| 4154 | + hbox = gtk_hbox_new (FALSE, DEFAULT_SPACING); | 4158 | + hbox = gtk_hbox_new (FALSE, DEFAULT_SPACING); |
| 4155 | + gtk_widget_show (hbox); | 4159 | + gtk_widget_show (hbox); |
| @@ -4157,8 +4161,9 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4157 | + gtk_widget_show_all (impl->bar); | 4161 | + gtk_widget_show_all (impl->bar); |
| 4158 | + gtk_box_pack_start (GTK_BOX (hbox), impl->bar, TRUE, TRUE, 0); | 4162 | + gtk_box_pack_start (GTK_BOX (hbox), impl->bar, TRUE, TRUE, 0); |
| 4159 | 4163 | ||
| 4160 | - if (impl->changing_folder) | 4164 | - if (gtk_combo_box_get_active_iter (combo, &iter)) |
| 4161 | - return; | 4165 | - shortcuts_activate_iter (impl, &iter); |
| 4166 | -} | ||
| 4162 | + /* Create Folder */ | 4167 | + /* Create Folder */ |
| 4163 | + widget = gtk_image_new_from_icon_name ("folder-new", GTK_ICON_SIZE_BUTTON); | 4168 | + widget = gtk_image_new_from_icon_name ("folder-new", GTK_ICON_SIZE_BUTTON); |
| 4164 | + gtk_widget_show (widget); | 4169 | + gtk_widget_show (widget); |
| @@ -4167,29 +4172,19 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4167 | + gtk_button_set_focus_on_click (GTK_BUTTON (impl->browse_new_folder_button), | 4172 | + gtk_button_set_focus_on_click (GTK_BUTTON (impl->browse_new_folder_button), |
| 4168 | + FALSE); | 4173 | + FALSE); |
| 4169 | 4174 | ||
| 4170 | - if (gtk_combo_box_get_active_iter (combo, &iter)) | ||
| 4171 | - shortcuts_activate_iter (impl, &iter); | ||
| 4172 | -} | ||
| 4173 | + g_signal_connect (impl->browse_new_folder_button, "clicked", | ||
| 4174 | + G_CALLBACK (new_folder_button_clicked), impl); | ||
| 4175 | + gtk_box_pack_end (GTK_BOX (hbox), impl->browse_new_folder_button, FALSE, FALSE, 0); | ||
| 4176 | |||
| 4177 | -/* Creates the combo box with the save folders */ | 4175 | -/* Creates the combo box with the save folders */ |
| 4178 | -static GtkWidget * | 4176 | -static GtkWidget * |
| 4179 | -save_folder_combo_create (GtkFileChooserDefault *impl) | 4177 | -save_folder_combo_create (GtkFileChooserDefault *impl) |
| 4180 | -{ | 4178 | -{ |
| 4181 | - GtkWidget *combo; | 4179 | - GtkWidget *combo; |
| 4182 | - GtkCellRenderer *cell; | 4180 | - GtkCellRenderer *cell; |
| 4181 | + g_signal_connect (impl->browse_new_folder_button, "clicked", | ||
| 4182 | + G_CALLBACK (new_folder_button_clicked), impl); | ||
| 4183 | + gtk_box_pack_end (GTK_BOX (hbox), impl->browse_new_folder_button, FALSE, FALSE, 0); | ||
| 4184 | + | ||
| 4183 | + widget = filter_create (impl); | 4185 | + widget = filter_create (impl); |
| 4184 | + gtk_widget_hide (widget); | 4186 | + gtk_widget_hide (widget); |
| 4185 | + gtk_box_pack_end (GTK_BOX (hbox), widget, FALSE, FALSE, 0); | 4187 | + gtk_box_pack_end (GTK_BOX (hbox), widget, FALSE, FALSE, 0); |
| 4186 | + | ||
| 4187 | + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); | ||
| 4188 | + | ||
| 4189 | + /* Box for lists */ | ||
| 4190 | + hbox = gtk_hbox_new (FALSE, LIST_HBOX_SPACING); | ||
| 4191 | + gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); | ||
| 4192 | + gtk_widget_show (hbox); | ||
| 4193 | 4188 | ||
| 4194 | - combo = g_object_new (GTK_TYPE_COMBO_BOX, | 4189 | - combo = g_object_new (GTK_TYPE_COMBO_BOX, |
| 4195 | - "model", impl->shortcuts_model, | 4190 | - "model", impl->shortcuts_model, |
| @@ -4216,10 +4211,17 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4216 | - shortcuts_row_separator_func, | 4211 | - shortcuts_row_separator_func, |
| 4217 | - GINT_TO_POINTER (SHORTCUTS_COL_NAME), | 4212 | - GINT_TO_POINTER (SHORTCUTS_COL_NAME), |
| 4218 | - NULL); | 4213 | - NULL); |
| 4219 | + /* File list */ | 4214 | + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); |
| 4215 | + | ||
| 4216 | + /* Box for lists */ | ||
| 4217 | + hbox = gtk_hbox_new (FALSE, LIST_HBOX_SPACING); | ||
| 4218 | + gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); | ||
| 4219 | + gtk_widget_show (hbox); | ||
| 4220 | 4220 | ||
| 4221 | - g_signal_connect (combo, "changed", | 4221 | - g_signal_connect (combo, "changed", |
| 4222 | - G_CALLBACK (save_folder_combo_changed_cb), impl); | 4222 | - G_CALLBACK (save_folder_combo_changed_cb), impl); |
| 4223 | + /* File list */ | ||
| 4224 | + | ||
| 4223 | + widget = create_file_list (impl); | 4225 | + widget = create_file_list (impl); |
| 4224 | + gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0); | 4226 | + gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0); |
| 4225 | 4227 | ||
| @@ -4237,14 +4239,14 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4237 | + GtkWidget *hbox; | 4239 | + GtkWidget *hbox; |
| 4238 | GtkWidget *widget; | 4240 | GtkWidget *widget; |
| 4239 | - GtkWidget *alignment; | 4241 | - GtkWidget *alignment; |
| 4240 | 4242 | - | |
| 4241 | - if (impl->save_widgets != NULL) | 4243 | - if (impl->save_widgets != NULL) |
| 4242 | - return; | 4244 | - return; |
| 4243 | - | 4245 | - |
| 4244 | - location_switch_to_path_bar (impl); | 4246 | - location_switch_to_path_bar (impl); |
| 4245 | - | 4247 | - |
| 4246 | - vbox = gtk_vbox_new (FALSE, 12); | 4248 | - vbox = gtk_vbox_new (FALSE, 12); |
| 4247 | - | 4249 | |
| 4248 | - table = gtk_table_new (2, 2, FALSE); | 4250 | - table = gtk_table_new (2, 2, FALSE); |
| 4249 | - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); | 4251 | - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); |
| 4250 | - gtk_widget_show (table); | 4252 | - gtk_widget_show (table); |
| @@ -4324,7 +4326,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4324 | static void | 4326 | static void |
| 4325 | save_widgets_destroy (GtkFileChooserDefault *impl) | 4327 | save_widgets_destroy (GtkFileChooserDefault *impl) |
| 4326 | { | 4328 | { |
| 4327 | @@ -4411,293 +1568,17 @@ | 4329 | @@ -4411,293 +1578,17 @@ |
| 4328 | gtk_widget_destroy (impl->save_widgets); | 4330 | gtk_widget_destroy (impl->save_widgets); |
| 4329 | impl->save_widgets = NULL; | 4331 | impl->save_widgets = NULL; |
| 4330 | impl->location_entry = NULL; | 4332 | impl->location_entry = NULL; |
| @@ -4558,14 +4560,14 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4558 | - atk_object_set_name (gtk_widget_get_accessible (impl->location_button), str); | 4560 | - atk_object_set_name (gtk_widget_get_accessible (impl->location_button), str); |
| 4559 | } | 4561 | } |
| 4560 | 4562 | ||
| 4561 | -/* Creates the main hpaned with the widgets shared by Open and Save mode */ | 4563 | /* Creates the main hpaned with the widgets shared by Open and Save mode */ |
| 4562 | -static GtkWidget * | 4564 | static GtkWidget * |
| 4563 | -browse_widgets_create (GtkFileChooserDefault *impl) | 4565 | browse_widgets_create (GtkFileChooserDefault *impl) |
| 4564 | -{ | 4566 | { |
| 4565 | - GtkWidget *vbox; | 4567 | - GtkWidget *vbox; |
| 4566 | - GtkWidget *hbox; | 4568 | - GtkWidget *hbox; |
| 4567 | - GtkWidget *hpaned; | 4569 | - GtkWidget *hpaned; |
| 4568 | - GtkWidget *widget; | 4570 | GtkWidget *widget; |
| 4569 | - GtkSizeGroup *size_group; | 4571 | - GtkSizeGroup *size_group; |
| 4570 | - | 4572 | - |
| 4571 | - /* size group is used by the [+][-] buttons and the filter combo */ | 4573 | - /* size group is used by the [+][-] buttons and the filter combo */ |
| @@ -4586,7 +4588,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4586 | - g_signal_connect (impl->browse_path_bar, "path-clicked", G_CALLBACK (path_bar_clicked), impl); | 4588 | - g_signal_connect (impl->browse_path_bar, "path-clicked", G_CALLBACK (path_bar_clicked), impl); |
| 4587 | - gtk_widget_show_all (impl->browse_path_bar); | 4589 | - gtk_widget_show_all (impl->browse_path_bar); |
| 4588 | - gtk_box_pack_start (GTK_BOX (hbox), impl->browse_path_bar, TRUE, TRUE, 0); | 4590 | - gtk_box_pack_start (GTK_BOX (hbox), impl->browse_path_bar, TRUE, TRUE, 0); |
| 4589 | - | 4591 | |
| 4590 | - /* Create Folder */ | 4592 | - /* Create Folder */ |
| 4591 | - impl->browse_new_folder_button = gtk_button_new_with_mnemonic (_("Create Fo_lder")); | 4593 | - impl->browse_new_folder_button = gtk_button_new_with_mnemonic (_("Create Fo_lder")); |
| 4592 | - g_signal_connect (impl->browse_new_folder_button, "clicked", | 4594 | - g_signal_connect (impl->browse_new_folder_button, "clicked", |
| @@ -4594,7 +4596,8 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4594 | - gtk_box_pack_end (GTK_BOX (hbox), impl->browse_new_folder_button, FALSE, FALSE, 0); | 4596 | - gtk_box_pack_end (GTK_BOX (hbox), impl->browse_new_folder_button, FALSE, FALSE, 0); |
| 4595 | - | 4597 | - |
| 4596 | - /* Box for the location label and entry */ | 4598 | - /* Box for the location label and entry */ |
| 4597 | - | 4599 | + widget = file_pane_create (impl); |
| 4600 | |||
| 4598 | - impl->location_entry_box = gtk_hbox_new (FALSE, 12); | 4601 | - impl->location_entry_box = gtk_hbox_new (FALSE, 12); |
| 4599 | - gtk_box_pack_start (GTK_BOX (vbox), impl->location_entry_box, FALSE, FALSE, 0); | 4602 | - gtk_box_pack_start (GTK_BOX (vbox), impl->location_entry_box, FALSE, FALSE, 0); |
| 4600 | - | 4603 | - |
| @@ -4611,21 +4614,15 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4611 | - gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, FALSE); | 4614 | - gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, FALSE); |
| 4612 | - widget = file_pane_create (impl, size_group); | 4615 | - widget = file_pane_create (impl, size_group); |
| 4613 | - gtk_paned_pack2 (GTK_PANED (hpaned), widget, TRUE, FALSE); | 4616 | - gtk_paned_pack2 (GTK_PANED (hpaned), widget, TRUE, FALSE); |
| 4614 | +/* Creates the main hpaned with the widgets shared by Open and Save mode */ | 4617 | - |
| 4615 | +static GtkWidget * | ||
| 4616 | +browse_widgets_create (GtkFileChooserDefault *impl) | ||
| 4617 | +{ | ||
| 4618 | + GtkWidget *widget; | ||
| 4619 | |||
| 4620 | - g_object_unref (size_group); | 4618 | - g_object_unref (size_group); |
| 4621 | + widget = file_pane_create (impl); | 4619 | - |
| 4622 | |||
| 4623 | - return vbox; | 4620 | - return vbox; |
| 4624 | + return widget; | 4621 | + return widget; |
| 4625 | } | 4622 | } |
| 4626 | 4623 | ||
| 4627 | static GObject* | 4624 | static GObject* |
| 4628 | @@ -4719,18 +1600,14 @@ | 4625 | @@ -4719,52 +1610,20 @@ |
| 4629 | 4626 | ||
| 4630 | gtk_widget_push_composite_child (); | 4627 | gtk_widget_push_composite_child (); |
| 4631 | 4628 | ||
| @@ -4644,13 +4641,14 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4644 | - impl->extra_align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0); | 4641 | - impl->extra_align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0); |
| 4645 | - gtk_box_pack_start (GTK_BOX (impl), impl->extra_align, FALSE, FALSE, 0); | 4642 | - gtk_box_pack_start (GTK_BOX (impl), impl->extra_align, FALSE, FALSE, 0); |
| 4646 | - | 4643 | - |
| 4647 | gtk_widget_pop_composite_child (); | 4644 | - gtk_widget_pop_composite_child (); |
| 4648 | update_appearance (impl); | 4645 | - update_appearance (impl); |
| 4649 | 4646 | - | |
| 4650 | @@ -4739,34 +1616,6 @@ | 4647 | - profile_end ("end", NULL); |
| 4651 | return object; | 4648 | - |
| 4652 | } | 4649 | - return object; |
| 4653 | 4650 | -} | |
| 4651 | - | ||
| 4654 | -/* Sets the extra_widget by packing it in the appropriate place */ | 4652 | -/* Sets the extra_widget by packing it in the appropriate place */ |
| 4655 | -static void | 4653 | -static void |
| 4656 | -set_extra_widget (GtkFileChooserDefault *impl, | 4654 | -set_extra_widget (GtkFileChooserDefault *impl, |
| @@ -4668,7 +4666,9 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4668 | - gtk_container_remove (GTK_CONTAINER (impl->extra_align), impl->extra_widget); | 4666 | - gtk_container_remove (GTK_CONTAINER (impl->extra_align), impl->extra_widget); |
| 4669 | - g_object_unref (impl->extra_widget); | 4667 | - g_object_unref (impl->extra_widget); |
| 4670 | - } | 4668 | - } |
| 4671 | - | 4669 | + gtk_widget_pop_composite_child (); |
| 4670 | + update_appearance (impl); | ||
| 4671 | |||
| 4672 | - impl->extra_widget = extra_widget; | 4672 | - impl->extra_widget = extra_widget; |
| 4673 | - if (impl->extra_widget) | 4673 | - if (impl->extra_widget) |
| 4674 | - { | 4674 | - { |
| @@ -4677,12 +4677,13 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4677 | - } | 4677 | - } |
| 4678 | - else | 4678 | - else |
| 4679 | - gtk_widget_hide (impl->extra_align); | 4679 | - gtk_widget_hide (impl->extra_align); |
| 4680 | -} | 4680 | + profile_end ("end", NULL); |
| 4681 | - | 4681 | + |
| 4682 | + return object; | ||
| 4683 | } | ||
| 4684 | |||
| 4682 | static void | 4685 | static void |
| 4683 | set_local_only (GtkFileChooserDefault *impl, | 4686 | @@ -4775,12 +1634,6 @@ |
| 4684 | gboolean local_only) | ||
| 4685 | @@ -4775,12 +1624,6 @@ | ||
| 4686 | { | 4687 | { |
| 4687 | impl->local_only = local_only; | 4688 | impl->local_only = local_only; |
| 4688 | 4689 | ||
| @@ -4695,7 +4696,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4695 | if (local_only && | 4696 | if (local_only && |
| 4696 | !gtk_file_system_path_is_local (impl->file_system, impl->current_folder)) | 4697 | !gtk_file_system_path_is_local (impl->file_system, impl->current_folder)) |
| 4697 | { | 4698 | { |
| 4698 | @@ -4807,19 +1650,7 @@ | 4699 | @@ -4807,19 +1660,7 @@ |
| 4699 | volumes_changed_cb (GtkFileSystem *file_system, | 4700 | volumes_changed_cb (GtkFileSystem *file_system, |
| 4700 | GtkFileChooserDefault *impl) | 4701 | GtkFileChooserDefault *impl) |
| 4701 | { | 4702 | { |
| @@ -4716,7 +4717,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4716 | } | 4717 | } |
| 4717 | 4718 | ||
| 4718 | /* Sets the file chooser to multiple selection mode */ | 4719 | /* Sets the file chooser to multiple selection mode */ |
| 4719 | @@ -4841,8 +1672,6 @@ | 4720 | @@ -4841,8 +1682,6 @@ |
| 4720 | 4721 | ||
| 4721 | impl->select_multiple = select_multiple; | 4722 | impl->select_multiple = select_multiple; |
| 4722 | g_object_notify (G_OBJECT (impl), "select-multiple"); | 4723 | g_object_notify (G_OBJECT (impl), "select-multiple"); |
| @@ -4725,7 +4726,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4725 | } | 4726 | } |
| 4726 | 4727 | ||
| 4727 | static void | 4728 | static void |
| 4728 | @@ -4855,8 +1684,6 @@ | 4729 | @@ -4855,8 +1694,6 @@ |
| 4729 | { | 4730 | { |
| 4730 | g_signal_handler_disconnect (impl->file_system, impl->volumes_changed_id); | 4731 | g_signal_handler_disconnect (impl->file_system, impl->volumes_changed_id); |
| 4731 | impl->volumes_changed_id = 0; | 4732 | impl->volumes_changed_id = 0; |
| @@ -4734,7 +4735,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4734 | g_object_unref (impl->file_system); | 4735 | g_object_unref (impl->file_system); |
| 4735 | } | 4736 | } |
| 4736 | 4737 | ||
| 4737 | @@ -4892,9 +1719,6 @@ | 4738 | @@ -4892,14 +1729,28 @@ |
| 4738 | impl->volumes_changed_id = g_signal_connect (impl->file_system, "volumes-changed", | 4739 | impl->volumes_changed_id = g_signal_connect (impl->file_system, "volumes-changed", |
| 4739 | G_CALLBACK (volumes_changed_cb), | 4740 | G_CALLBACK (volumes_changed_cb), |
| 4740 | impl); | 4741 | impl); |
| @@ -4744,7 +4745,29 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4744 | } | 4745 | } |
| 4745 | 4746 | ||
| 4746 | profile_end ("end", NULL); | 4747 | profile_end ("end", NULL); |
| 4747 | @@ -4911,32 +1735,13 @@ | 4748 | } |
| 4749 | |||
| 4750 | +static void | ||
| 4751 | +show_new_folder_button (GtkFileChooserDefault *impl) | ||
| 4752 | +{ | ||
| 4753 | + if ((impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || | ||
| 4754 | + impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) && | ||
| 4755 | + impl->show_create_folder) | ||
| 4756 | + { | ||
| 4757 | + gtk_widget_show (impl->browse_new_folder_button); | ||
| 4758 | + gtk_misc_set_alignment (GTK_MISC (impl->location_label), 0.5, 0.5); | ||
| 4759 | + } | ||
| 4760 | + else | ||
| 4761 | + { | ||
| 4762 | + gtk_widget_hide (impl->browse_new_folder_button); | ||
| 4763 | + gtk_misc_set_alignment (GTK_MISC (impl->location_label), 1.0, 0.5); | ||
| 4764 | + } | ||
| 4765 | +} | ||
| 4766 | + | ||
| 4767 | /* This function is basically a do_all function. | ||
| 4768 | * | ||
| 4769 | * It sets the visibility on all the widgets based on the current state, and | ||
| 4770 | @@ -4911,32 +1762,8 @@ | ||
| 4748 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || | 4771 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || |
| 4749 | impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) | 4772 | impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) |
| 4750 | { | 4773 | { |
| @@ -4759,18 +4782,14 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4759 | - text = _("Create in _folder:"); | 4782 | - text = _("Create in _folder:"); |
| 4760 | - | 4783 | - |
| 4761 | - gtk_label_set_text_with_mnemonic (GTK_LABEL (impl->save_folder_label), text); | 4784 | - gtk_label_set_text_with_mnemonic (GTK_LABEL (impl->save_folder_label), text); |
| 4762 | + gtk_widget_show (impl->save_widgets); | 4785 | - |
| 4763 | + gtk_widget_show (impl->browse_widgets); | ||
| 4764 | |||
| 4765 | - if (gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander))) | 4786 | - if (gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander))) |
| 4766 | - { | 4787 | - { |
| 4767 | - gtk_widget_set_sensitive (impl->save_folder_label, FALSE); | 4788 | - gtk_widget_set_sensitive (impl->save_folder_label, FALSE); |
| 4768 | - gtk_widget_set_sensitive (impl->save_folder_combo, FALSE); | 4789 | - gtk_widget_set_sensitive (impl->save_folder_combo, FALSE); |
| 4769 | - gtk_widget_show (impl->browse_widgets); | 4790 | - gtk_widget_show (impl->browse_widgets); |
| 4770 | - } | 4791 | - } |
| 4771 | + if (impl->show_create_folder) | 4792 | - else |
| 4772 | + gtk_widget_show (impl->browse_new_folder_button); | ||
| 4773 | else | ||
| 4774 | - { | 4793 | - { |
| 4775 | - gtk_widget_set_sensitive (impl->save_folder_label, TRUE); | 4794 | - gtk_widget_set_sensitive (impl->save_folder_label, TRUE); |
| 4776 | - gtk_widget_set_sensitive (impl->save_folder_combo, TRUE); | 4795 | - gtk_widget_set_sensitive (impl->save_folder_combo, TRUE); |
| @@ -4778,18 +4797,18 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4778 | - } | 4797 | - } |
| 4779 | - | 4798 | - |
| 4780 | - gtk_widget_show (impl->browse_new_folder_button); | 4799 | - gtk_widget_show (impl->browse_new_folder_button); |
| 4781 | + gtk_widget_hide (impl->browse_new_folder_button); | 4800 | + gtk_widget_show (impl->save_widgets); |
| 4801 | + gtk_widget_show (impl->browse_widgets); | ||
| 4782 | 4802 | ||
| 4783 | if (impl->select_multiple) | 4803 | if (impl->select_multiple) |
| 4784 | { | 4804 | { |
| 4785 | @@ -4948,23 +1753,17 @@ | 4805 | @@ -4948,23 +1775,12 @@ |
| 4786 | else if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN || | 4806 | else if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN || |
| 4787 | impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) | 4807 | impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) |
| 4788 | { | 4808 | { |
| 4789 | - gtk_widget_show (impl->location_button); | 4809 | - gtk_widget_show (impl->location_button); |
| 4790 | - save_widgets_destroy (impl); | 4810 | - save_widgets_destroy (impl); |
| 4791 | + gtk_widget_hide (impl->save_widgets); | 4811 | + gtk_widget_hide (impl->save_widgets); |
| 4792 | + gtk_widget_hide (impl->browse_new_folder_button); | ||
| 4793 | gtk_widget_show (impl->browse_widgets); | 4812 | gtk_widget_show (impl->browse_widgets); |
| 4794 | - location_mode_set (impl, impl->location_mode, TRUE); | 4813 | - location_mode_set (impl, impl->location_mode, TRUE); |
| 4795 | } | 4814 | } |
| @@ -4798,11 +4817,10 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4798 | - _gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), impl->action); | 4817 | - _gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), impl->action); |
| 4799 | - | 4818 | - |
| 4800 | - if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN) | 4819 | - if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN) |
| 4801 | + if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN || | 4820 | - gtk_widget_hide (impl->browse_new_folder_button); |
| 4802 | + !impl->show_create_folder) | 4821 | - else |
| 4803 | gtk_widget_hide (impl->browse_new_folder_button); | 4822 | - gtk_widget_show (impl->browse_new_folder_button); |
| 4804 | else | 4823 | + show_new_folder_button (impl); |
| 4805 | gtk_widget_show (impl->browse_new_folder_button); | ||
| 4806 | 4824 | ||
| 4807 | - /* This *is* needed; we need to redraw the file list because the "sensitivity" | 4825 | - /* This *is* needed; we need to redraw the file list because the "sensitivity" |
| 4808 | - * of files may change depending whether we are in a file or folder-only mode. | 4826 | - * of files may change depending whether we are in a file or folder-only mode. |
| @@ -4810,7 +4828,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4810 | gtk_widget_queue_draw (impl->browse_files_tree_view); | 4828 | gtk_widget_queue_draw (impl->browse_files_tree_view); |
| 4811 | 4829 | ||
| 4812 | g_signal_emit_by_name (impl, "default-size-changed"); | 4830 | g_signal_emit_by_name (impl, "default-size-changed"); |
| 4813 | @@ -5016,24 +1815,6 @@ | 4831 | @@ -5016,24 +1832,6 @@ |
| 4814 | set_local_only (impl, g_value_get_boolean (value)); | 4832 | set_local_only (impl, g_value_get_boolean (value)); |
| 4815 | break; | 4833 | break; |
| 4816 | 4834 | ||
| @@ -4835,7 +4853,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4835 | case GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE: | 4853 | case GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE: |
| 4836 | { | 4854 | { |
| 4837 | gboolean select_multiple = g_value_get_boolean (value); | 4855 | gboolean select_multiple = g_value_get_boolean (value); |
| 4838 | @@ -5070,6 +1851,55 @@ | 4856 | @@ -5070,6 +1868,51 @@ |
| 4839 | } | 4857 | } |
| 4840 | break; | 4858 | break; |
| 4841 | 4859 | ||
| @@ -4872,11 +4890,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4872 | + if (show != impl->show_create_folder) | 4890 | + if (show != impl->show_create_folder) |
| 4873 | + { | 4891 | + { |
| 4874 | + impl->show_create_folder = show; | 4892 | + impl->show_create_folder = show; |
| 4875 | + | 4893 | + show_new_folder_button (impl); |
| 4876 | + if (show) | ||
| 4877 | + gtk_widget_show (impl->browse_new_folder_button); | ||
| 4878 | + else | ||
| 4879 | + gtk_widget_hide (impl->browse_new_folder_button); | ||
| 4880 | + } | 4894 | + } |
| 4881 | + } | 4895 | + } |
| 4882 | + break; | 4896 | + break; |
| @@ -4891,7 +4905,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4891 | default: | 4905 | default: |
| 4892 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | 4906 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
| 4893 | break; | 4907 | break; |
| 4894 | @@ -5098,28 +1928,32 @@ | 4908 | @@ -5098,28 +1941,32 @@ |
| 4895 | g_value_set_boolean (value, impl->local_only); | 4909 | g_value_set_boolean (value, impl->local_only); |
| 4896 | break; | 4910 | break; |
| 4897 | 4911 | ||
| @@ -4936,7 +4950,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4936 | break; | 4950 | break; |
| 4937 | 4951 | ||
| 4938 | case GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION: | 4952 | case GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION: |
| 4939 | @@ -5154,24 +1988,12 @@ | 4953 | @@ -5154,24 +2001,12 @@ |
| 4940 | GSList *l; | 4954 | GSList *l; |
| 4941 | GtkFileChooserDefault *impl = (GtkFileChooserDefault *) object; | 4955 | GtkFileChooserDefault *impl = (GtkFileChooserDefault *) object; |
| 4942 | 4956 | ||
| @@ -4961,7 +4975,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4961 | pending_select_paths_free (impl); | 4975 | pending_select_paths_free (impl); |
| 4962 | 4976 | ||
| 4963 | /* cancel all pending operations */ | 4977 | /* cancel all pending operations */ |
| 4964 | @@ -5197,23 +2019,6 @@ | 4978 | @@ -5197,23 +2032,6 @@ |
| 4965 | impl->reload_icon_handles = NULL; | 4979 | impl->reload_icon_handles = NULL; |
| 4966 | } | 4980 | } |
| 4967 | 4981 | ||
| @@ -4985,7 +4999,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4985 | if (impl->update_current_folder_handle) | 4999 | if (impl->update_current_folder_handle) |
| 4986 | { | 5000 | { |
| 4987 | gtk_file_system_cancel_operation (impl->update_current_folder_handle); | 5001 | gtk_file_system_cancel_operation (impl->update_current_folder_handle); |
| 4988 | @@ -5238,12 +2043,6 @@ | 5002 | @@ -5238,12 +2056,6 @@ |
| 4989 | impl->update_from_entry_handle = NULL; | 5003 | impl->update_from_entry_handle = NULL; |
| 4990 | } | 5004 | } |
| 4991 | 5005 | ||
| @@ -4998,7 +5012,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 4998 | remove_settings_signal (impl, gtk_widget_get_screen (GTK_WIDGET (impl))); | 5012 | remove_settings_signal (impl, gtk_widget_get_screen (GTK_WIDGET (impl))); |
| 4999 | 5013 | ||
| 5000 | G_OBJECT_CLASS (_gtk_file_chooser_default_parent_class)->dispose (object); | 5014 | G_OBJECT_CLASS (_gtk_file_chooser_default_parent_class)->dispose (object); |
| 5001 | @@ -5256,12 +2055,7 @@ | 5015 | @@ -5256,12 +2068,7 @@ |
| 5002 | static void | 5016 | static void |
| 5003 | gtk_file_chooser_default_show_all (GtkWidget *widget) | 5017 | gtk_file_chooser_default_show_all (GtkWidget *widget) |
| 5004 | { | 5018 | { |
| @@ -5011,7 +5025,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5011 | } | 5025 | } |
| 5012 | 5026 | ||
| 5013 | /* Handler for GtkWindow::set-focus; this is where we save the last-focused | 5027 | /* Handler for GtkWindow::set-focus; this is where we save the last-focused |
| 5014 | @@ -5322,7 +2116,6 @@ | 5028 | @@ -5322,7 +2129,6 @@ |
| 5015 | else | 5029 | else |
| 5016 | impl->icon_size = FALLBACK_ICON_SIZE; | 5030 | impl->icon_size = FALLBACK_ICON_SIZE; |
| 5017 | 5031 | ||
| @@ -5019,7 +5033,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5019 | gtk_widget_queue_resize (impl->browse_files_tree_view); | 5033 | gtk_widget_queue_resize (impl->browse_files_tree_view); |
| 5020 | 5034 | ||
| 5021 | profile_end ("end", NULL); | 5035 | profile_end ("end", NULL); |
| 5022 | @@ -5441,15 +2234,6 @@ | 5036 | @@ -5441,15 +2247,6 @@ |
| 5023 | 5037 | ||
| 5024 | impl->default_width = allocation->width; | 5038 | impl->default_width = allocation->width; |
| 5025 | impl->default_height = allocation->height; | 5039 | impl->default_height = allocation->height; |
| @@ -5035,7 +5049,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5035 | } | 5049 | } |
| 5036 | 5050 | ||
| 5037 | static gboolean | 5051 | static gboolean |
| 5038 | @@ -5503,23 +2287,18 @@ | 5052 | @@ -5503,23 +2300,18 @@ |
| 5039 | settings_load (GtkFileChooserDefault *impl) | 5053 | settings_load (GtkFileChooserDefault *impl) |
| 5040 | { | 5054 | { |
| 5041 | GtkFileChooserSettings *settings; | 5055 | GtkFileChooserSettings *settings; |
| @@ -5059,7 +5073,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5059 | } | 5073 | } |
| 5060 | 5074 | ||
| 5061 | static void | 5075 | static void |
| 5062 | @@ -5529,7 +2308,6 @@ | 5076 | @@ -5529,7 +2321,6 @@ |
| 5063 | 5077 | ||
| 5064 | settings = _gtk_file_chooser_settings_new (); | 5078 | settings = _gtk_file_chooser_settings_new (); |
| 5065 | 5079 | ||
| @@ -5067,7 +5081,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5067 | _gtk_file_chooser_settings_set_show_hidden (settings, gtk_file_chooser_get_show_hidden (GTK_FILE_CHOOSER (impl))); | 5081 | _gtk_file_chooser_settings_set_show_hidden (settings, gtk_file_chooser_get_show_hidden (GTK_FILE_CHOOSER (impl))); |
| 5068 | _gtk_file_chooser_settings_set_expand_folders (settings, impl->expand_folders); | 5082 | _gtk_file_chooser_settings_set_expand_folders (settings, impl->expand_folders); |
| 5069 | 5083 | ||
| 5070 | @@ -5570,7 +2348,7 @@ | 5084 | @@ -5570,7 +2361,7 @@ |
| 5071 | if (impl->current_folder) | 5085 | if (impl->current_folder) |
| 5072 | { | 5086 | { |
| 5073 | pending_select_paths_store_selection (impl); | 5087 | pending_select_paths_store_selection (impl); |
| @@ -5076,7 +5090,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5076 | } | 5090 | } |
| 5077 | break; | 5091 | break; |
| 5078 | 5092 | ||
| 5079 | @@ -5578,8 +2356,6 @@ | 5093 | @@ -5578,8 +2369,6 @@ |
| 5080 | g_assert_not_reached (); | 5094 | g_assert_not_reached (); |
| 5081 | } | 5095 | } |
| 5082 | 5096 | ||
| @@ -5085,7 +5099,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5085 | settings_load (impl); | 5099 | settings_load (impl); |
| 5086 | 5100 | ||
| 5087 | profile_end ("end", NULL); | 5101 | profile_end ("end", NULL); |
| 5088 | @@ -5897,12 +2673,10 @@ | 5102 | @@ -5897,12 +2686,10 @@ |
| 5089 | gpointer user_data) | 5103 | gpointer user_data) |
| 5090 | { | 5104 | { |
| 5091 | gboolean have_hidden; | 5105 | gboolean have_hidden; |
| @@ -5098,7 +5112,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5098 | 5112 | ||
| 5099 | for (l = data->paths; l; l = l->next) | 5113 | for (l = data->paths; l; l = l->next) |
| 5100 | { | 5114 | { |
| 5101 | @@ -5918,12 +2692,9 @@ | 5115 | @@ -5918,12 +2705,9 @@ |
| 5102 | if (!have_hidden) | 5116 | if (!have_hidden) |
| 5103 | have_hidden = gtk_file_info_get_is_hidden (info); | 5117 | have_hidden = gtk_file_info_get_is_hidden (info); |
| 5104 | 5118 | ||
| @@ -5112,7 +5126,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5112 | break; /* we now have all the information we need */ | 5126 | break; /* we now have all the information we need */ |
| 5113 | } | 5127 | } |
| 5114 | } | 5128 | } |
| 5115 | @@ -5937,9 +2708,6 @@ | 5129 | @@ -5937,9 +2721,6 @@ |
| 5116 | if (have_hidden) | 5130 | if (have_hidden) |
| 5117 | g_object_set (data->impl, "show-hidden", TRUE, NULL); | 5131 | g_object_set (data->impl, "show-hidden", TRUE, NULL); |
| 5118 | 5132 | ||
| @@ -5122,7 +5136,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5122 | for (l = data->paths; l; l = l->next) | 5136 | for (l = data->paths; l; l = l->next) |
| 5123 | { | 5137 | { |
| 5124 | const GtkFilePath *path; | 5138 | const GtkFilePath *path; |
| 5125 | @@ -6197,9 +2965,8 @@ | 5139 | @@ -6197,9 +2978,8 @@ |
| 5126 | 5140 | ||
| 5127 | if (!(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE | 5141 | if (!(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE |
| 5128 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER | 5142 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER |
| @@ -5134,7 +5148,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5134 | return; | 5148 | return; |
| 5135 | 5149 | ||
| 5136 | g_assert (impl->location_entry != NULL); | 5150 | g_assert (impl->location_entry != NULL); |
| 5137 | @@ -6387,9 +3154,6 @@ | 5151 | @@ -6387,9 +3167,6 @@ |
| 5138 | if (!gtk_file_info_get_is_folder (info)) | 5152 | if (!gtk_file_info_get_is_folder (info)) |
| 5139 | goto out; | 5153 | goto out; |
| 5140 | 5154 | ||
| @@ -5144,7 +5158,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5144 | if (impl->current_folder != data->path) | 5158 | if (impl->current_folder != data->path) |
| 5145 | { | 5159 | { |
| 5146 | if (impl->current_folder) | 5160 | if (impl->current_folder) |
| 5147 | @@ -6400,17 +3164,6 @@ | 5161 | @@ -6400,17 +3177,6 @@ |
| 5148 | impl->reload_state = RELOAD_HAS_FOLDER; | 5162 | impl->reload_state = RELOAD_HAS_FOLDER; |
| 5149 | } | 5163 | } |
| 5150 | 5164 | ||
| @@ -5162,7 +5176,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5162 | /* Set the folder on the save entry */ | 5176 | /* Set the folder on the save entry */ |
| 5163 | 5177 | ||
| 5164 | if (impl->location_entry) | 5178 | if (impl->location_entry) |
| 5165 | @@ -6430,13 +3183,7 @@ | 5179 | @@ -6430,13 +3196,7 @@ |
| 5166 | 5180 | ||
| 5167 | /* Refresh controls */ | 5181 | /* Refresh controls */ |
| 5168 | 5182 | ||
| @@ -5176,7 +5190,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5176 | g_signal_emit_by_name (impl, "selection-changed", 0); | 5190 | g_signal_emit_by_name (impl, "selection-changed", 0); |
| 5177 | 5191 | ||
| 5178 | out: | 5192 | out: |
| 5179 | @@ -6698,9 +3445,8 @@ | 5193 | @@ -6698,9 +3458,8 @@ |
| 5180 | 5194 | ||
| 5181 | g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE | 5195 | g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE |
| 5182 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER | 5196 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER |
| @@ -5188,7 +5202,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5188 | 5202 | ||
| 5189 | chooser_entry = GTK_FILE_CHOOSER_ENTRY (impl->location_entry); | 5203 | chooser_entry = GTK_FILE_CHOOSER_ENTRY (impl->location_entry); |
| 5190 | 5204 | ||
| 5191 | @@ -6878,17 +3624,6 @@ | 5205 | @@ -6878,17 +3637,6 @@ |
| 5192 | return g_slist_reverse (info.result); | 5206 | return g_slist_reverse (info.result); |
| 5193 | } | 5207 | } |
| 5194 | 5208 | ||
| @@ -5206,7 +5220,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5206 | static GtkFileSystem * | 5220 | static GtkFileSystem * |
| 5207 | gtk_file_chooser_default_get_file_system (GtkFileChooser *chooser) | 5221 | gtk_file_chooser_default_get_file_system (GtkFileChooser *chooser) |
| 5208 | { | 5222 | { |
| 5209 | @@ -6903,9 +3638,9 @@ | 5223 | @@ -6903,9 +3651,9 @@ |
| 5210 | gboolean show) | 5224 | gboolean show) |
| 5211 | { | 5225 | { |
| 5212 | if (show) | 5226 | if (show) |
| @@ -5218,7 +5232,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5218 | } | 5232 | } |
| 5219 | 5233 | ||
| 5220 | static void | 5234 | static void |
| 5221 | @@ -6915,6 +3650,8 @@ | 5235 | @@ -6915,6 +3663,8 @@ |
| 5222 | GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); | 5236 | GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); |
| 5223 | const gchar *name; | 5237 | const gchar *name; |
| 5224 | 5238 | ||
| @@ -5227,7 +5241,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5227 | if (g_slist_find (impl->filters, filter)) | 5241 | if (g_slist_find (impl->filters, filter)) |
| 5228 | { | 5242 | { |
| 5229 | g_warning ("gtk_file_chooser_add_filter() called on filter already in list\n"); | 5243 | g_warning ("gtk_file_chooser_add_filter() called on filter already in list\n"); |
| 5230 | @@ -6925,291 +3662,62 @@ | 5244 | @@ -6925,291 +3675,62 @@ |
| 5231 | impl->filters = g_slist_append (impl->filters, filter); | 5245 | impl->filters = g_slist_append (impl->filters, filter); |
| 5232 | 5246 | ||
| 5233 | name = gtk_file_filter_get_name (filter); | 5247 | name = gtk_file_filter_get_name (filter); |
| @@ -5551,7 +5565,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5551 | } | 5565 | } |
| 5552 | 5566 | ||
| 5553 | /* Guesses a size based upon font sizes */ | 5567 | /* Guesses a size based upon font sizes */ |
| 5554 | @@ -7256,25 +3764,9 @@ | 5568 | @@ -7256,25 +3777,9 @@ |
| 5555 | gint *default_height) | 5569 | gint *default_height) |
| 5556 | { | 5570 | { |
| 5557 | GtkFileChooserDefault *impl; | 5571 | GtkFileChooserDefault *impl; |
| @@ -5577,7 +5591,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5577 | } | 5591 | } |
| 5578 | 5592 | ||
| 5579 | static gboolean | 5593 | static gboolean |
| 5580 | @@ -7285,8 +3777,7 @@ | 5594 | @@ -7285,8 +3790,7 @@ |
| 5581 | impl = GTK_FILE_CHOOSER_DEFAULT (chooser_embed); | 5595 | impl = GTK_FILE_CHOOSER_DEFAULT (chooser_embed); |
| 5582 | 5596 | ||
| 5583 | return (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN || | 5597 | return (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN || |
| @@ -5587,7 +5601,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5587 | } | 5601 | } |
| 5588 | 5602 | ||
| 5589 | struct switch_folder_closure { | 5603 | struct switch_folder_closure { |
| 5590 | @@ -7333,7 +3824,7 @@ | 5604 | @@ -7333,7 +3837,7 @@ |
| 5591 | 5605 | ||
| 5592 | g_assert (closure.path && closure.num_selected == 1); | 5606 | g_assert (closure.path && closure.num_selected == 1); |
| 5593 | 5607 | ||
| @@ -5596,7 +5610,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5596 | } | 5610 | } |
| 5597 | 5611 | ||
| 5598 | /* Gets the GtkFileInfo for the selected row in the file list; assumes single | 5612 | /* Gets the GtkFileInfo for the selected row in the file list; assumes single |
| 5599 | @@ -7628,7 +4119,7 @@ | 5613 | @@ -7628,7 +4132,7 @@ |
| 5600 | else | 5614 | else |
| 5601 | { | 5615 | { |
| 5602 | /* This will display an error, which is what we want */ | 5616 | /* This will display an error, which is what we want */ |
| @@ -5605,7 +5619,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5605 | } | 5619 | } |
| 5606 | 5620 | ||
| 5607 | out: | 5621 | out: |
| 5608 | @@ -7706,50 +4197,6 @@ | 5622 | @@ -7706,50 +4210,6 @@ |
| 5609 | g_object_unref (handle); | 5623 | g_object_unref (handle); |
| 5610 | } | 5624 | } |
| 5611 | 5625 | ||
| @@ -5656,7 +5670,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5656 | 5670 | ||
| 5657 | /* Implementation for GtkFileChooserEmbed::should_respond() */ | 5671 | /* Implementation for GtkFileChooserEmbed::should_respond() */ |
| 5658 | static gboolean | 5672 | static gboolean |
| 5659 | @@ -7855,9 +4302,8 @@ | 5673 | @@ -7855,9 +4315,8 @@ |
| 5660 | 5674 | ||
| 5661 | g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE | 5675 | g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE |
| 5662 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER | 5676 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER |
| @@ -5668,7 +5682,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5668 | 5682 | ||
| 5669 | entry = GTK_FILE_CHOOSER_ENTRY (impl->location_entry); | 5683 | entry = GTK_FILE_CHOOSER_ENTRY (impl->location_entry); |
| 5670 | check_save_entry (impl, &path, &is_well_formed, &is_empty, &is_file_part_empty, &is_folder); | 5684 | check_save_entry (impl, &path, &is_well_formed, &is_empty, &is_file_part_empty, &is_folder); |
| 5671 | @@ -7873,7 +4319,7 @@ | 5685 | @@ -7873,7 +4332,7 @@ |
| 5672 | if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN | 5686 | if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN |
| 5673 | || impl->action == GTK_FILE_CHOOSER_ACTION_SAVE) | 5687 | || impl->action == GTK_FILE_CHOOSER_ACTION_SAVE) |
| 5674 | { | 5688 | { |
| @@ -5677,7 +5691,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 5677 | retval = FALSE; | 5691 | retval = FALSE; |
| 5678 | } | 5692 | } |
| 5679 | else if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER | 5693 | else if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER |
| 5680 | @@ -7896,430 +4342,126 @@ | 5694 | @@ -7896,430 +4355,126 @@ |
| 5681 | 5695 | ||
| 5682 | /* We need to check whether path exists and is not a folder */ | 5696 | /* We need to check whether path exists and is not a folder */ |
| 5683 | 5697 | ||
| @@ -6188,7 +6202,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 6188 | } | 6202 | } |
| 6189 | 6203 | ||
| 6190 | static gboolean | 6204 | static gboolean |
| 6191 | @@ -8373,8 +4515,6 @@ | 6205 | @@ -8373,8 +4528,6 @@ |
| 6192 | 6206 | ||
| 6193 | if (impl->location_entry) | 6207 | if (impl->location_entry) |
| 6194 | update_chooser_entry (impl); | 6208 | update_chooser_entry (impl); |
| @@ -6197,7 +6211,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 6197 | 6211 | ||
| 6198 | g_signal_emit_by_name (impl, "selection-changed", 0); | 6212 | g_signal_emit_by_name (impl, "selection-changed", 0); |
| 6199 | } | 6213 | } |
| 6200 | @@ -8401,7 +4541,8 @@ | 6214 | @@ -8401,7 +4554,8 @@ |
| 6201 | const GtkFilePath *file_path; | 6215 | const GtkFilePath *file_path; |
| 6202 | 6216 | ||
| 6203 | file_path = _gtk_file_system_model_get_path (impl->browse_files_model, &child_iter); | 6217 | file_path = _gtk_file_system_model_get_path (impl->browse_files_model, &child_iter); |
| @@ -6207,7 +6221,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 6207 | 6221 | ||
| 6208 | return; | 6222 | return; |
| 6209 | } | 6223 | } |
| 6210 | @@ -8411,27 +4552,6 @@ | 6224 | @@ -8411,27 +4565,6 @@ |
| 6211 | g_signal_emit_by_name (impl, "file-activated"); | 6225 | g_signal_emit_by_name (impl, "file-activated"); |
| 6212 | } | 6226 | } |
| 6213 | 6227 | ||
| @@ -6235,7 +6249,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 6235 | static const GtkFileInfo * | 6249 | static const GtkFileInfo * |
| 6236 | get_list_file_info (GtkFileChooserDefault *impl, | 6250 | get_list_file_info (GtkFileChooserDefault *impl, |
| 6237 | GtkTreeIter *iter) | 6251 | GtkTreeIter *iter) |
| 6238 | @@ -8659,210 +4779,73 @@ | 6252 | @@ -8659,210 +4792,73 @@ |
| 6239 | NULL); | 6253 | NULL); |
| 6240 | } | 6254 | } |
| 6241 | 6255 | ||
| @@ -6483,7 +6497,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserdefault.c | |||
| 6483 | Index: gtk+-2.10.14/gtk/gtkfilechooserprivate.h | 6497 | Index: gtk+-2.10.14/gtk/gtkfilechooserprivate.h |
| 6484 | =================================================================== | 6498 | =================================================================== |
| 6485 | --- gtk+-2.10.14.orig/gtk/gtkfilechooserprivate.h 2007-07-16 20:44:17.000000000 +0100 | 6499 | --- gtk+-2.10.14.orig/gtk/gtkfilechooserprivate.h 2007-07-16 20:44:17.000000000 +0100 |
| 6486 | +++ gtk+-2.10.14/gtk/gtkfilechooserprivate.h 2007-08-29 18:02:50.000000000 +0100 | 6500 | +++ gtk+-2.10.14/gtk/gtkfilechooserprivate.h 2007-08-29 18:12:02.000000000 +0100 |
| 6487 | @@ -153,36 +153,19 @@ | 6501 | @@ -153,36 +153,19 @@ |
| 6488 | 6502 | ||
| 6489 | /* Save mode widgets */ | 6503 | /* Save mode widgets */ |
| @@ -6602,7 +6616,7 @@ Index: gtk+-2.10.14/gtk/gtkfilechooserprivate.h | |||
| 6602 | Index: gtk+-2.10.14/tests/autotestfilechooser.c | 6616 | Index: gtk+-2.10.14/tests/autotestfilechooser.c |
| 6603 | =================================================================== | 6617 | =================================================================== |
| 6604 | --- gtk+-2.10.14.orig/tests/autotestfilechooser.c 2007-07-16 20:45:12.000000000 +0100 | 6618 | --- gtk+-2.10.14.orig/tests/autotestfilechooser.c 2007-07-16 20:45:12.000000000 +0100 |
| 6605 | +++ gtk+-2.10.14/tests/autotestfilechooser.c 2007-08-28 15:19:31.000000000 +0100 | 6619 | +++ gtk+-2.10.14/tests/autotestfilechooser.c 2007-08-29 18:12:02.000000000 +0100 |
| 6606 | @@ -452,9 +452,6 @@ | 6620 | @@ -452,9 +452,6 @@ |
| 6607 | && (impl->location_mode == LOCATION_MODE_PATH_BAR | 6621 | && (impl->location_mode == LOCATION_MODE_PATH_BAR |
| 6608 | ? impl->location_entry == NULL | 6622 | ? impl->location_entry == NULL |
diff --git a/meta/packages/gtk+/gtk+_2.10.14.bb b/meta/packages/gtk+/gtk+_2.10.14.bb index 6ef8253491..8790765c36 100644 --- a/meta/packages/gtk+/gtk+_2.10.14.bb +++ b/meta/packages/gtk+/gtk+_2.10.14.bb | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | require gtk+.inc | 1 | require gtk+.inc |
| 2 | 2 | ||
| 3 | DEPENDS += "cairo" | 3 | DEPENDS += "cairo" |
| 4 | PR = "r13" | 4 | PR = "r14" |
| 5 | 5 | ||
| 6 | # disable per default - untested and not all patches included. | 6 | # disable per default - untested and not all patches included. |
| 7 | DEFAULT_PREFERENCE = "-1" | 7 | DEFAULT_PREFERENCE = "-1" |
