diff options
author | Richard Purdie <richard@openedhand.com> | 2007-06-08 10:58:17 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-06-08 10:58:17 +0000 |
commit | 1cdbacbc75d7d4abb0b1f8a6df2e734c7e4755a6 (patch) | |
tree | 8b7b7915229648b4f8b08ee8fd4fd17ffd82b830 /meta/packages/gtk+ | |
parent | b6795bdabfe19972f97a1cbb9478a333a86ccdfa (diff) | |
download | poky-1cdbacbc75d7d4abb0b1f8a6df2e734c7e4755a6.tar.gz |
gtk+: Fix 2.6.10 patch, fix RRECOMEMMENDS
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1896 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gtk+')
-rw-r--r-- | meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch | 887 | ||||
-rw-r--r-- | meta/packages/gtk+/gtk+_2.6.10.bb | 4 | ||||
-rw-r--r-- | meta/packages/gtk+/gtk+_2.6.8.bb | 2 |
3 files changed, 261 insertions, 632 deletions
diff --git a/meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch b/meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch index fa2dfb4843..46931f7de9 100644 --- a/meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch +++ b/meta/packages/gtk+/gtk+-2.6.10/filechooser-default.patch | |||
@@ -1,5 +1,11 @@ | |||
1 | --- gtk+-2.6.8/gtk/gtkfilechooserdefault.c.orig 2007-02-09 18:37:47.000000000 +0000 | 1 | --- |
2 | +++ gtk+-2.6.8/gtk/gtkfilechooserdefault.c 2007-02-09 18:37:47.000000000 +0000 | 2 | gtk/gtkfilechooserdefault.c | 3689 ++++---------------------------------------- |
3 | 1 file changed, 415 insertions(+), 3274 deletions(-) | ||
4 | |||
5 | Index: gtk+-2.6.10/gtk/gtkfilechooserdefault.c | ||
6 | =================================================================== | ||
7 | --- gtk+-2.6.10.orig/gtk/gtkfilechooserdefault.c 2007-06-08 09:29:24.000000000 +0100 | ||
8 | +++ gtk+-2.6.10/gtk/gtkfilechooserdefault.c 2007-06-08 11:08:41.000000000 +0100 | ||
3 | @@ -31,7 +31,6 @@ | 9 | @@ -31,7 +31,6 @@ |
4 | #include "gtkcombobox.h" | 10 | #include "gtkcombobox.h" |
5 | #include "gtkentry.h" | 11 | #include "gtkentry.h" |
@@ -40,7 +46,7 @@ | |||
40 | 46 | ||
41 | #define MAX_LOADING_TIME 500 | 47 | #define MAX_LOADING_TIME 500 |
42 | 48 | ||
43 | @@ -109,63 +112,38 @@ | 49 | @@ -109,63 +112,38 @@ struct _GtkFileChooserDefault |
44 | 50 | ||
45 | /* Save mode widgets */ | 51 | /* Save mode widgets */ |
46 | GtkWidget *save_widgets; | 52 | GtkWidget *save_widgets; |
@@ -110,7 +116,7 @@ | |||
110 | 116 | ||
111 | GtkTreeViewColumn *list_name_column; | 117 | GtkTreeViewColumn *list_name_column; |
112 | GtkCellRenderer *list_name_renderer; | 118 | GtkCellRenderer *list_name_renderer; |
113 | @@ -179,25 +157,15 @@ | 119 | @@ -179,25 +157,15 @@ struct _GtkFileChooserDefault |
114 | gulong toplevel_set_focus_id; | 120 | gulong toplevel_set_focus_id; |
115 | GtkWidget *toplevel_last_focus_widget; | 121 | GtkWidget *toplevel_last_focus_widget; |
116 | 122 | ||
@@ -138,7 +144,7 @@ | |||
138 | }; | 144 | }; |
139 | 145 | ||
140 | /* Signal IDs */ | 146 | /* Signal IDs */ |
141 | @@ -211,17 +179,6 @@ | 147 | @@ -211,17 +179,6 @@ enum { |
142 | 148 | ||
143 | static guint signals[LAST_SIGNAL] = { 0 }; | 149 | static guint signals[LAST_SIGNAL] = { 0 }; |
144 | 150 | ||
@@ -156,7 +162,7 @@ | |||
156 | /* Column numbers for the file list */ | 162 | /* Column numbers for the file list */ |
157 | enum { | 163 | enum { |
158 | FILE_LIST_COL_NAME, | 164 | FILE_LIST_COL_NAME, |
159 | @@ -236,23 +193,6 @@ | 165 | @@ -236,23 +193,6 @@ enum { |
160 | TEXT_URI_LIST | 166 | TEXT_URI_LIST |
161 | }; | 167 | }; |
162 | 168 | ||
@@ -180,9 +186,9 @@ | |||
180 | /* Target types for DnD from the file list */ | 186 | /* Target types for DnD from the file list */ |
181 | static const GtkTargetEntry file_list_source_targets[] = { | 187 | static const GtkTargetEntry file_list_source_targets[] = { |
182 | { "text/uri-list", 0, TEXT_URI_LIST } | 188 | { "text/uri-list", 0, TEXT_URI_LIST } |
183 | @@ -261,22 +201,10 @@ | 189 | @@ -270,22 +210,10 @@ static const int num_file_list_dest_targ |
184 | static const int num_file_list_source_targets = (sizeof (file_list_source_targets) | 190 | / sizeof (file_list_dest_targets[0])); |
185 | / sizeof (file_list_source_targets[0])); | 191 | |
186 | 192 | ||
187 | -/* Interesting places in the shortcuts bar */ | 193 | -/* Interesting places in the shortcuts bar */ |
188 | -typedef enum { | 194 | -typedef enum { |
@@ -204,7 +210,7 @@ | |||
204 | #define NUM_LINES 40 | 210 | #define NUM_LINES 40 |
205 | #define NUM_CHARS 60 | 211 | #define NUM_CHARS 60 |
206 | 212 | ||
207 | @@ -335,7 +263,6 @@ | 213 | @@ -348,7 +276,6 @@ static gboolean gtk_file_chooser_d |
208 | const GtkFilePath *path, | 214 | const GtkFilePath *path, |
209 | GError **error); | 215 | GError **error); |
210 | static GSList * gtk_file_chooser_default_list_shortcut_folders (GtkFileChooser *chooser); | 216 | static GSList * gtk_file_chooser_default_list_shortcut_folders (GtkFileChooser *chooser); |
@@ -212,7 +218,7 @@ | |||
212 | static void gtk_file_chooser_default_get_default_size (GtkFileChooserEmbed *chooser_embed, | 218 | static void gtk_file_chooser_default_get_default_size (GtkFileChooserEmbed *chooser_embed, |
213 | gint *default_width, | 219 | gint *default_width, |
214 | gint *default_height); | 220 | gint *default_height); |
215 | @@ -352,37 +279,11 @@ | 221 | @@ -365,37 +292,11 @@ static void down_folder_handler (GtkF |
216 | static void home_folder_handler (GtkFileChooserDefault *impl); | 222 | static void home_folder_handler (GtkFileChooserDefault *impl); |
217 | static void update_appearance (GtkFileChooserDefault *impl); | 223 | static void update_appearance (GtkFileChooserDefault *impl); |
218 | 224 | ||
@@ -252,7 +258,7 @@ | |||
252 | static gboolean list_select_func (GtkTreeSelection *selection, | 258 | static gboolean list_select_func (GtkTreeSelection *selection, |
253 | GtkTreeModel *model, | 259 | GtkTreeModel *model, |
254 | GtkTreePath *path, | 260 | GtkTreePath *path, |
255 | @@ -401,16 +302,6 @@ | 261 | @@ -414,16 +315,6 @@ static void select_func (GtkFileSystemMo |
256 | GtkTreeIter *iter, | 262 | GtkTreeIter *iter, |
257 | gpointer user_data); | 263 | gpointer user_data); |
258 | 264 | ||
@@ -269,7 +275,7 @@ | |||
269 | static void list_icon_data_func (GtkTreeViewColumn *tree_column, | 275 | static void list_icon_data_func (GtkTreeViewColumn *tree_column, |
270 | GtkCellRenderer *cell, | 276 | GtkCellRenderer *cell, |
271 | GtkTreeModel *tree_model, | 277 | GtkTreeModel *tree_model, |
272 | @@ -441,36 +332,6 @@ | 278 | @@ -455,36 +346,6 @@ static void browse_files_center_selected |
273 | 279 | ||
274 | static GObjectClass *parent_class; | 280 | static GObjectClass *parent_class; |
275 | 281 | ||
@@ -306,7 +312,7 @@ | |||
306 | 312 | ||
307 | GType | 313 | GType |
308 | _gtk_file_chooser_default_get_type (void) | 314 | _gtk_file_chooser_default_get_type (void) |
309 | @@ -520,6 +381,11 @@ | 315 | @@ -534,6 +395,11 @@ _gtk_file_chooser_default_get_type (void |
310 | return file_chooser_default_type; | 316 | return file_chooser_default_type; |
311 | } | 317 | } |
312 | 318 | ||
@@ -318,7 +324,7 @@ | |||
318 | static void | 324 | static void |
319 | gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class) | 325 | gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class) |
320 | { | 326 | { |
321 | @@ -617,6 +483,14 @@ | 327 | @@ -631,6 +497,14 @@ gtk_file_chooser_default_class_init (Gtk |
322 | "home-folder", | 328 | "home-folder", |
323 | 0); | 329 | 0); |
324 | 330 | ||
@@ -333,7 +339,7 @@ | |||
333 | _gtk_file_chooser_install_properties (gobject_class); | 339 | _gtk_file_chooser_install_properties (gobject_class); |
334 | 340 | ||
335 | gtk_settings_install_property (g_param_spec_string ("gtk-file-chooser-backend", | 341 | gtk_settings_install_property (g_param_spec_string ("gtk-file-chooser-backend", |
336 | @@ -634,7 +508,6 @@ | 342 | @@ -648,7 +522,6 @@ gtk_file_chooser_default_iface_init (Gtk |
337 | iface->select_all = gtk_file_chooser_default_select_all; | 343 | iface->select_all = gtk_file_chooser_default_select_all; |
338 | iface->unselect_all = gtk_file_chooser_default_unselect_all; | 344 | iface->unselect_all = gtk_file_chooser_default_unselect_all; |
339 | iface->get_paths = gtk_file_chooser_default_get_paths; | 345 | iface->get_paths = gtk_file_chooser_default_get_paths; |
@@ -341,7 +347,7 @@ | |||
341 | iface->get_file_system = gtk_file_chooser_default_get_file_system; | 347 | iface->get_file_system = gtk_file_chooser_default_get_file_system; |
342 | iface->set_current_folder = gtk_file_chooser_default_set_current_folder; | 348 | iface->set_current_folder = gtk_file_chooser_default_set_current_folder; |
343 | iface->get_current_folder = gtk_file_chooser_default_get_current_folder; | 349 | iface->get_current_folder = gtk_file_chooser_default_get_current_folder; |
344 | @@ -642,9 +515,12 @@ | 350 | @@ -656,9 +529,12 @@ gtk_file_chooser_default_iface_init (Gtk |
345 | iface->add_filter = gtk_file_chooser_default_add_filter; | 351 | iface->add_filter = gtk_file_chooser_default_add_filter; |
346 | iface->remove_filter = gtk_file_chooser_default_remove_filter; | 352 | iface->remove_filter = gtk_file_chooser_default_remove_filter; |
347 | iface->list_filters = gtk_file_chooser_default_list_filters; | 353 | iface->list_filters = gtk_file_chooser_default_list_filters; |
@@ -355,7 +361,7 @@ | |||
355 | } | 361 | } |
356 | 362 | ||
357 | static void | 363 | static void |
358 | @@ -659,71 +535,22 @@ | 364 | @@ -673,71 +549,22 @@ static void |
359 | gtk_file_chooser_default_init (GtkFileChooserDefault *impl) | 365 | gtk_file_chooser_default_init (GtkFileChooserDefault *impl) |
360 | { | 366 | { |
361 | impl->local_only = TRUE; | 367 | impl->local_only = TRUE; |
@@ -377,7 +383,7 @@ | |||
377 | g_object_ref (impl->tooltips); | 383 | g_object_ref (impl->tooltips); |
378 | gtk_object_sink (GTK_OBJECT (impl->tooltips)); | 384 | gtk_object_sink (GTK_OBJECT (impl->tooltips)); |
379 | -} | 385 | -} |
380 | 386 | - | |
381 | -/* Frees the data columns for the specified iter in the shortcuts model*/ | 387 | -/* Frees the data columns for the specified iter in the shortcuts model*/ |
382 | -static void | 388 | -static void |
383 | -shortcuts_free_row_data (GtkFileChooserDefault *impl, | 389 | -shortcuts_free_row_data (GtkFileChooserDefault *impl, |
@@ -414,7 +420,7 @@ | |||
414 | -shortcuts_free (GtkFileChooserDefault *impl) | 420 | -shortcuts_free (GtkFileChooserDefault *impl) |
415 | -{ | 421 | -{ |
416 | - GtkTreeIter iter; | 422 | - GtkTreeIter iter; |
417 | - | 423 | |
418 | - if (!impl->shortcuts_model) | 424 | - if (!impl->shortcuts_model) |
419 | - return; | 425 | - return; |
420 | - | 426 | - |
@@ -432,7 +438,7 @@ | |||
432 | } | 438 | } |
433 | 439 | ||
434 | static void | 440 | static void |
435 | @@ -743,6 +570,7 @@ | 441 | @@ -757,6 +584,7 @@ pending_select_paths_free (GtkFileChoose |
436 | impl->pending_select_paths = NULL; | 442 | impl->pending_select_paths = NULL; |
437 | } | 443 | } |
438 | 444 | ||
@@ -440,7 +446,7 @@ | |||
440 | static void | 446 | static void |
441 | pending_select_paths_add (GtkFileChooserDefault *impl, | 447 | pending_select_paths_add (GtkFileChooserDefault *impl, |
442 | const GtkFilePath *path) | 448 | const GtkFilePath *path) |
443 | @@ -782,20 +610,30 @@ | 449 | @@ -796,20 +624,30 @@ pending_select_paths_store_selection (Gt |
444 | } | 450 | } |
445 | 451 | ||
446 | static void | 452 | static void |
@@ -455,7 +461,8 @@ | |||
455 | + for (l = impl->path_history; l; l = l->next) | 461 | + for (l = impl->path_history; l; l = l->next) |
456 | + { | 462 | + { |
457 | + GtkFilePath *path; | 463 | + GtkFilePath *path; |
458 | + | 464 | |
465 | - shortcuts_free (impl); | ||
459 | + path = l->data; | 466 | + path = l->data; |
460 | + gtk_file_path_free (path); | 467 | + gtk_file_path_free (path); |
461 | + } | 468 | + } |
@@ -463,8 +470,7 @@ | |||
463 | + g_slist_free (impl->path_history); | 470 | + g_slist_free (impl->path_history); |
464 | + impl->path_history = NULL; | 471 | + impl->path_history = NULL; |
465 | +} | 472 | +} |
466 | 473 | + | |
467 | - shortcuts_free (impl); | ||
468 | +static void | 474 | +static void |
469 | +gtk_file_chooser_default_finalize (GObject *object) | 475 | +gtk_file_chooser_default_finalize (GObject *object) |
470 | +{ | 476 | +{ |
@@ -478,7 +484,7 @@ | |||
478 | g_object_unref (impl->file_system); | 484 | g_object_unref (impl->file_system); |
479 | 485 | ||
480 | for (l = impl->filters; l; l = l->next) | 486 | for (l = impl->filters; l; l = l->next) |
481 | @@ -816,11 +654,9 @@ | 487 | @@ -830,11 +668,9 @@ gtk_file_chooser_default_finalize (GObje |
482 | if (impl->current_folder) | 488 | if (impl->current_folder) |
483 | gtk_file_path_free (impl->current_folder); | 489 | gtk_file_path_free (impl->current_folder); |
484 | 490 | ||
@@ -492,7 +498,7 @@ | |||
492 | load_remove_timer (impl); | 498 | load_remove_timer (impl); |
493 | 499 | ||
494 | /* Free all the Models we have */ | 500 | /* Free all the Models we have */ |
495 | @@ -830,12 +666,12 @@ | 501 | @@ -844,12 +680,12 @@ gtk_file_chooser_default_finalize (GObje |
496 | if (impl->sort_model) | 502 | if (impl->sort_model) |
497 | g_object_unref (impl->sort_model); | 503 | g_object_unref (impl->sort_model); |
498 | 504 | ||
@@ -507,7 +513,7 @@ | |||
507 | G_OBJECT_CLASS (parent_class)->finalize (object); | 513 | G_OBJECT_CLASS (parent_class)->finalize (object); |
508 | } | 514 | } |
509 | 515 | ||
510 | @@ -916,28 +752,6 @@ | 516 | @@ -930,28 +766,6 @@ error_getting_info_dialog (GtkFileChoose |
511 | path, error); | 517 | path, error); |
512 | } | 518 | } |
513 | 519 | ||
@@ -536,7 +542,7 @@ | |||
536 | /* Shows an error dialog about not being able to create a folder */ | 542 | /* Shows an error dialog about not being able to create a folder */ |
537 | static void | 543 | static void |
538 | error_creating_folder_dialog (GtkFileChooserDefault *impl, | 544 | error_creating_folder_dialog (GtkFileChooserDefault *impl, |
539 | @@ -949,21 +763,6 @@ | 545 | @@ -963,21 +777,6 @@ error_creating_folder_dialog (GtkFileCho |
540 | path, error); | 546 | path, error); |
541 | } | 547 | } |
542 | 548 | ||
@@ -558,7 +564,7 @@ | |||
558 | /* Shows an error dialog about not being able to create a filename */ | 564 | /* Shows an error dialog about not being able to create a filename */ |
559 | static void | 565 | static void |
560 | error_building_filename_dialog (GtkFileChooserDefault *impl, | 566 | error_building_filename_dialog (GtkFileChooserDefault *impl, |
561 | @@ -993,6 +792,7 @@ | 567 | @@ -1007,6 +806,7 @@ change_folder_and_display_error (GtkFile |
562 | GError *error; | 568 | GError *error; |
563 | gboolean result; | 569 | gboolean result; |
564 | GtkFilePath *path_copy; | 570 | GtkFilePath *path_copy; |
@@ -566,7 +572,7 @@ | |||
566 | 572 | ||
567 | /* We copy the path because of this case: | 573 | /* We copy the path because of this case: |
568 | * | 574 | * |
569 | @@ -1005,6 +805,29 @@ | 575 | @@ -1019,6 +819,29 @@ change_folder_and_display_error (GtkFile |
570 | 576 | ||
571 | path_copy = gtk_file_path_copy (path); | 577 | path_copy = gtk_file_path_copy (path); |
572 | 578 | ||
@@ -594,9 +600,9 @@ | |||
594 | + | 600 | + |
595 | + | 601 | + |
596 | error = NULL; | 602 | error = NULL; |
597 | result = _gtk_file_chooser_set_current_folder_path (GTK_FILE_CHOOSER (impl), path_copy, &error); | 603 | result = gtk_file_chooser_default_update_current_folder (GTK_FILE_CHOOSER (impl), path_copy, TRUE, &error); |
598 | 604 | ||
599 | @@ -1012,2009 +835,245 @@ | 605 | @@ -1026,189 +849,11 @@ change_folder_and_display_error (GtkFile |
600 | error_changing_folder_dialog (impl, path_copy, error); | 606 | error_changing_folder_dialog (impl, path_copy, error); |
601 | 607 | ||
602 | gtk_file_path_free (path_copy); | 608 | gtk_file_path_free (path_copy); |
@@ -636,16 +642,11 @@ | |||
636 | - | 642 | - |
637 | - g_signal_emit_by_name (impl, "default-size-changed"); | 643 | - g_signal_emit_by_name (impl, "default-size-changed"); |
638 | -} | 644 | -} |
639 | 645 | - | |
640 | -static void | 646 | -static void |
641 | -set_preview_widget (GtkFileChooserDefault *impl, | 647 | -set_preview_widget (GtkFileChooserDefault *impl, |
642 | - GtkWidget *preview_widget) | 648 | - GtkWidget *preview_widget) |
643 | +/* Returns whether a path is a folder */ | 649 | -{ |
644 | +static gboolean | ||
645 | +check_is_folder (GtkFileSystem *file_system, | ||
646 | + const GtkFilePath *path, | ||
647 | + GError **error) | ||
648 | { | ||
649 | - if (preview_widget == impl->preview_widget) | 650 | - if (preview_widget == impl->preview_widget) |
650 | - return; | 651 | - return; |
651 | - | 652 | - |
@@ -662,36 +663,19 @@ | |||
662 | - impl->preview_widget, | 663 | - impl->preview_widget, |
663 | - (impl->use_preview_label && impl->preview_label) ? 1 : 0); | 664 | - (impl->use_preview_label && impl->preview_label) ? 1 : 0); |
664 | - } | 665 | - } |
665 | + GtkFileFolder *folder; | 666 | - |
666 | +#ifdef GTK26 | ||
667 | + folder = gtk_file_system_get_folder (file_system, path, 0, error); | ||
668 | +#else | ||
669 | + folder = gtk_file_system_get_folder (file_system, path, 0, NULL, NULL); | ||
670 | +#endif | ||
671 | + if (!folder) | ||
672 | + return FALSE; | ||
673 | |||
674 | - update_preview_widget_visibility (impl); | 667 | - update_preview_widget_visibility (impl); |
675 | + g_object_unref (folder); | 668 | -} |
676 | + return TRUE; | 669 | - |
677 | } | ||
678 | |||
679 | -/* Re-reads all the icons for the shortcuts, used when the theme changes */ | 670 | -/* Re-reads all the icons for the shortcuts, used when the theme changes */ |
680 | + | 671 | -static void |
681 | +/* Callback used when the "New Folder" button is clicked */ | ||
682 | static void | ||
683 | -shortcuts_reload_icons (GtkFileChooserDefault *impl) | 672 | -shortcuts_reload_icons (GtkFileChooserDefault *impl) |
684 | +new_folder_button_clicked (GtkButton *button, | 673 | -{ |
685 | + GtkFileChooserDefault *impl) | 674 | - GtkTreeIter iter; |
686 | { | 675 | - |
687 | GtkTreeIter iter; | ||
688 | + GtkTreePath *path; | ||
689 | |||
690 | - if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (impl->shortcuts_model), &iter)) | 676 | - if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (impl->shortcuts_model), &iter)) |
691 | - return; | 677 | - return; |
692 | + if (!impl->browse_files_model) | 678 | - |
693 | + return; /* FIXME: this sucks. Disable the New Folder button or something. */ | ||
694 | |||
695 | - do { | 679 | - do { |
696 | - gpointer data; | 680 | - gpointer data; |
697 | - gboolean is_volume; | 681 | - gboolean is_volume; |
@@ -703,16 +687,13 @@ | |||
703 | - SHORTCUTS_COL_IS_VOLUME, &is_volume, | 687 | - SHORTCUTS_COL_IS_VOLUME, &is_volume, |
704 | - SHORTCUTS_COL_PIXBUF_VISIBLE, &pixbuf_visible, | 688 | - SHORTCUTS_COL_PIXBUF_VISIBLE, &pixbuf_visible, |
705 | - -1); | 689 | - -1); |
706 | + /* Prevent button from being clicked twice */ | 690 | - |
707 | + gtk_widget_set_sensitive (impl->browse_new_folder_button, FALSE); | ||
708 | |||
709 | - if (pixbuf_visible && data) | 691 | - if (pixbuf_visible && data) |
710 | - { | 692 | - { |
711 | - if (is_volume) | 693 | - if (is_volume) |
712 | - { | 694 | - { |
713 | - GtkFileSystemVolume *volume; | 695 | - GtkFileSystemVolume *volume; |
714 | + _gtk_file_system_model_add_editable (impl->browse_files_model, &iter); | 696 | - |
715 | |||
716 | - volume = data; | 697 | - volume = data; |
717 | - pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl), | 698 | - pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl), |
718 | - impl->icon_size, NULL); | 699 | - impl->icon_size, NULL); |
@@ -720,21 +701,12 @@ | |||
720 | - else | 701 | - else |
721 | - { | 702 | - { |
722 | - const GtkFilePath *path; | 703 | - const GtkFilePath *path; |
723 | + path = gtk_tree_model_get_path (GTK_TREE_MODEL (impl->browse_files_model), &iter); | 704 | - |
724 | + gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (impl->browse_files_tree_view), | ||
725 | + path, impl->list_name_column, | ||
726 | + FALSE, 0.0, 0.0); | ||
727 | |||
728 | - path = data; | 705 | - path = data; |
729 | - pixbuf = gtk_file_system_render_icon (impl->file_system, path, GTK_WIDGET (impl), | 706 | - pixbuf = gtk_file_system_render_icon (impl->file_system, path, GTK_WIDGET (impl), |
730 | - impl->icon_size, NULL); | 707 | - impl->icon_size, NULL); |
731 | - } | 708 | - } |
732 | + g_object_set (impl->list_name_renderer, "editable", TRUE, NULL); | 709 | - |
733 | + gtk_tree_view_set_cursor (GTK_TREE_VIEW (impl->browse_files_tree_view), | ||
734 | + path, | ||
735 | + impl->list_name_column, | ||
736 | + TRUE); | ||
737 | |||
738 | - gtk_list_store_set (impl->shortcuts_model, &iter, | 710 | - gtk_list_store_set (impl->shortcuts_model, &iter, |
739 | - SHORTCUTS_COL_PIXBUF, pixbuf, | 711 | - SHORTCUTS_COL_PIXBUF, pixbuf, |
740 | - -1); | 712 | - -1); |
@@ -742,86 +714,38 @@ | |||
742 | - g_object_unref (pixbuf); | 714 | - g_object_unref (pixbuf); |
743 | - } | 715 | - } |
744 | - } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter)); | 716 | - } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter)); |
745 | + gtk_tree_path_free (path); | 717 | -} |
746 | } | 718 | - |
747 | |||
748 | -static void | 719 | -static void |
749 | -shortcuts_find_folder (GtkFileChooserDefault *impl, | 720 | -shortcuts_find_folder (GtkFileChooserDefault *impl, |
750 | - GtkFilePath *folder) | 721 | - GtkFilePath *folder) |
751 | +/* Idle handler for creating a new folder after editing its name cell, or for | 722 | -{ |
752 | + * canceling the editing. | ||
753 | + */ | ||
754 | +static gboolean | ||
755 | +edited_idle_cb (GtkFileChooserDefault *impl) | ||
756 | { | ||
757 | - GtkTreeSelection *selection; | 723 | - GtkTreeSelection *selection; |
758 | - int pos; | 724 | - int pos; |
759 | - GtkTreePath *path; | 725 | - GtkTreePath *path; |
760 | + GDK_THREADS_ENTER (); | 726 | - |
761 | + | ||
762 | + g_source_destroy (impl->edited_idle); | ||
763 | + impl->edited_idle = NULL; | ||
764 | |||
765 | - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view)); | 727 | - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view)); |
766 | + _gtk_file_system_model_remove_editable (impl->browse_files_model); | 728 | - |
767 | + g_object_set (impl->list_name_renderer, "editable", FALSE, NULL); | ||
768 | + | ||
769 | + gtk_widget_set_sensitive (impl->browse_new_folder_button, TRUE); | ||
770 | |||
771 | - g_assert (folder != NULL); | 729 | - g_assert (folder != NULL); |
772 | - pos = shortcut_find_position (impl, folder); | 730 | - pos = shortcut_find_position (impl, folder); |
773 | - if (pos == -1) | 731 | - if (pos == -1) |
774 | + if (impl->edited_new_text) /* not cancelled? */ | 732 | - { |
775 | { | ||
776 | - gtk_tree_selection_unselect_all (selection); | 733 | - gtk_tree_selection_unselect_all (selection); |
777 | - return; | 734 | - return; |
778 | + GError *error; | 735 | - } |
779 | + GtkFilePath *file_path; | 736 | - |
780 | + | ||
781 | + error = NULL; | ||
782 | + file_path = gtk_file_system_make_path (impl->file_system, impl->current_folder, impl->edited_new_text, | ||
783 | + &error); | ||
784 | + if (file_path) | ||
785 | + { | ||
786 | + error = NULL; | ||
787 | +#ifdef GTK26 | ||
788 | + if (gtk_file_system_create_folder (impl->file_system, file_path, &error)) | ||
789 | +#else | ||
790 | + if (gtk_file_system_create_folder (impl->file_system, file_path, NULL, NULL)) | ||
791 | +#endif | ||
792 | + change_folder_and_display_error (impl, file_path); | ||
793 | + else | ||
794 | + error_creating_folder_dialog (impl, file_path, error); | ||
795 | + | ||
796 | + gtk_file_path_free (file_path); | ||
797 | + } | ||
798 | + else | ||
799 | + error_creating_folder_dialog (impl, file_path, error); | ||
800 | + | ||
801 | + g_free (impl->edited_new_text); | ||
802 | + impl->edited_new_text = NULL; | ||
803 | } | ||
804 | |||
805 | - path = gtk_tree_path_new_from_indices (pos, -1); | 737 | - path = gtk_tree_path_new_from_indices (pos, -1); |
806 | - gtk_tree_selection_select_path (selection, path); | 738 | - gtk_tree_selection_select_path (selection, path); |
807 | - gtk_tree_path_free (path); | 739 | - gtk_tree_path_free (path); |
808 | + GDK_THREADS_LEAVE (); | 740 | -} |
809 | + | 741 | - |
810 | + return FALSE; | ||
811 | } | ||
812 | |||
813 | -/* If a shortcut corresponds to the current folder, selects it */ | 742 | -/* If a shortcut corresponds to the current folder, selects it */ |
814 | static void | 743 | -static void |
815 | -shortcuts_find_current_folder (GtkFileChooserDefault *impl) | 744 | -shortcuts_find_current_folder (GtkFileChooserDefault *impl) |
816 | +queue_edited_idle (GtkFileChooserDefault *impl, | 745 | -{ |
817 | + const gchar *new_text) | ||
818 | { | ||
819 | - shortcuts_find_folder (impl, impl->current_folder); | 746 | - shortcuts_find_folder (impl, impl->current_folder); |
820 | -} | 747 | -} |
821 | + /* We create the folder in an idle handler so that we don't modify the tree | 748 | - |
822 | + * just now. | ||
823 | + */ | ||
824 | |||
825 | -/* Convenience function to get the display name and icon info for a path */ | 749 | -/* Convenience function to get the display name and icon info for a path */ |
826 | -static GtkFileInfo * | 750 | -static GtkFileInfo * |
827 | -get_file_info (GtkFileSystem *file_system, | 751 | -get_file_info (GtkFileSystem *file_system, |
@@ -853,9 +777,7 @@ | |||
853 | - out: | 777 | - out: |
854 | - if (parent_path) | 778 | - if (parent_path) |
855 | - gtk_file_path_free (parent_path); | 779 | - gtk_file_path_free (parent_path); |
856 | + g_assert (!impl->edited_idle); | 780 | - |
857 | + g_assert (!impl->edited_new_text); | ||
858 | |||
859 | - if (tmp) | 781 | - if (tmp) |
860 | - { | 782 | - { |
861 | - g_set_error (error, | 783 | - g_set_error (error, |
@@ -869,23 +791,26 @@ | |||
869 | - | 791 | - |
870 | - return info; | 792 | - return info; |
871 | -} | 793 | -} |
794 | |||
795 | /* Returns whether a path is a folder */ | ||
796 | static gboolean | ||
797 | @@ -1217,8 +862,11 @@ check_is_folder (GtkFileSystem *fil | ||
798 | GError **error) | ||
799 | { | ||
800 | GtkFileFolder *folder; | ||
872 | - | 801 | - |
873 | -/* Returns whether a path is a folder */ | 802 | +#ifdef GTK26 |
874 | -static gboolean | 803 | folder = gtk_file_system_get_folder (file_system, path, 0, error); |
875 | -check_is_folder (GtkFileSystem *file_system, | 804 | +#else |
876 | - const GtkFilePath *path, | 805 | + folder = gtk_file_system_get_folder (file_system, path, 0, NULL, NULL); |
877 | - GError **error) | 806 | +#endif |
878 | -{ | 807 | if (!folder) |
879 | - GtkFileFolder *folder; | 808 | return FALSE; |
880 | - | 809 | |
881 | - folder = gtk_file_system_get_folder (file_system, path, 0, error); | 810 | @@ -1226,515 +874,6 @@ check_is_folder (GtkFileSystem *fil |
882 | - if (!folder) | 811 | return TRUE; |
883 | - return FALSE; | 812 | } |
884 | - | 813 | |
885 | - g_object_unref (folder); | ||
886 | - return TRUE; | ||
887 | -} | ||
888 | - | ||
889 | -/* Inserts a path in the shortcuts tree, making a copy of it; alternatively, | 814 | -/* Inserts a path in the shortcuts tree, making a copy of it; alternatively, |
890 | - * inserts a volume. A position of -1 indicates the end of the tree. | 815 | - * inserts a volume. A position of -1 indicates the end of the tree. |
891 | - */ | 816 | - */ |
@@ -1395,143 +1320,33 @@ | |||
1395 | - impl, | 1320 | - impl, |
1396 | - NULL); | 1321 | - NULL); |
1397 | -} | 1322 | -} |
1398 | - | 1323 | |
1399 | -/* Callback used when the "New Folder" button is clicked */ | 1324 | /* Callback used when the "New Folder" button is clicked */ |
1400 | -static void | 1325 | static void |
1401 | -new_folder_button_clicked (GtkButton *button, | 1326 | @@ -1793,7 +932,11 @@ edited_idle_cb (GtkFileChooserDefault *i |
1402 | - GtkFileChooserDefault *impl) | 1327 | if (file_path) |
1403 | -{ | 1328 | { |
1404 | - GtkTreeIter iter; | 1329 | error = NULL; |
1405 | - GtkTreePath *path; | 1330 | +#ifdef GTK26 |
1406 | - | 1331 | if (gtk_file_system_create_folder (impl->file_system, file_path, &error)) |
1407 | - if (!impl->browse_files_model) | 1332 | +#else |
1408 | - return; /* FIXME: this sucks. Disable the New Folder button or something. */ | 1333 | + if (gtk_file_system_create_folder (impl->file_system, file_path, NULL, NULL)) |
1409 | - | 1334 | +#endif |
1410 | - /* Prevent button from being clicked twice */ | 1335 | change_folder_and_display_error (impl, file_path); |
1411 | - gtk_widget_set_sensitive (impl->browse_new_folder_button, FALSE); | 1336 | else |
1412 | - | 1337 | error_creating_folder_dialog (impl, file_path, error); |
1413 | - _gtk_file_system_model_add_editable (impl->browse_files_model, &iter); | 1338 | @@ -1864,245 +1007,12 @@ static GtkWidget * |
1414 | - | 1339 | filter_create (GtkFileChooserDefault *impl) |
1415 | - path = gtk_tree_model_get_path (GTK_TREE_MODEL (impl->browse_files_model), &iter); | 1340 | { |
1416 | - gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (impl->browse_files_tree_view), | 1341 | impl->filter_combo = gtk_combo_box_new_text (); |
1417 | - path, impl->list_name_column, | ||
1418 | - FALSE, 0.0, 0.0); | ||
1419 | - | ||
1420 | - g_object_set (impl->list_name_renderer, "editable", TRUE, NULL); | ||
1421 | - gtk_tree_view_set_cursor (GTK_TREE_VIEW (impl->browse_files_tree_view), | ||
1422 | - path, | ||
1423 | - impl->list_name_column, | ||
1424 | - TRUE); | ||
1425 | - | ||
1426 | - gtk_tree_path_free (path); | ||
1427 | -} | ||
1428 | - | ||
1429 | -/* Idle handler for creating a new folder after editing its name cell, or for | ||
1430 | - * canceling the editing. | ||
1431 | - */ | ||
1432 | -static gboolean | ||
1433 | -edited_idle_cb (GtkFileChooserDefault *impl) | ||
1434 | -{ | ||
1435 | - GDK_THREADS_ENTER (); | ||
1436 | - | ||
1437 | - g_source_destroy (impl->edited_idle); | ||
1438 | - impl->edited_idle = NULL; | ||
1439 | - | ||
1440 | - _gtk_file_system_model_remove_editable (impl->browse_files_model); | ||
1441 | - g_object_set (impl->list_name_renderer, "editable", FALSE, NULL); | ||
1442 | - | ||
1443 | - gtk_widget_set_sensitive (impl->browse_new_folder_button, TRUE); | ||
1444 | - | ||
1445 | - if (impl->edited_new_text) /* not cancelled? */ | ||
1446 | - { | ||
1447 | - GError *error; | ||
1448 | - GtkFilePath *file_path; | ||
1449 | - | ||
1450 | - error = NULL; | ||
1451 | - file_path = gtk_file_system_make_path (impl->file_system, impl->current_folder, impl->edited_new_text, | ||
1452 | - &error); | ||
1453 | - if (file_path) | ||
1454 | - { | ||
1455 | - error = NULL; | ||
1456 | - if (gtk_file_system_create_folder (impl->file_system, file_path, &error)) | ||
1457 | - change_folder_and_display_error (impl, file_path); | ||
1458 | - else | ||
1459 | - error_creating_folder_dialog (impl, file_path, error); | ||
1460 | - | ||
1461 | - gtk_file_path_free (file_path); | ||
1462 | - } | ||
1463 | - else | ||
1464 | - error_creating_folder_dialog (impl, file_path, error); | ||
1465 | - | ||
1466 | - g_free (impl->edited_new_text); | ||
1467 | - impl->edited_new_text = NULL; | ||
1468 | - } | ||
1469 | - | ||
1470 | - GDK_THREADS_LEAVE (); | ||
1471 | - | ||
1472 | - return FALSE; | ||
1473 | -} | ||
1474 | - | ||
1475 | -static void | ||
1476 | -queue_edited_idle (GtkFileChooserDefault *impl, | ||
1477 | - const gchar *new_text) | ||
1478 | -{ | ||
1479 | - /* We create the folder in an idle handler so that we don't modify the tree | ||
1480 | - * just now. | ||
1481 | - */ | ||
1482 | - | ||
1483 | - g_assert (!impl->edited_idle); | ||
1484 | - g_assert (!impl->edited_new_text); | ||
1485 | - | ||
1486 | - impl->edited_idle = g_idle_source_new (); | ||
1487 | - g_source_set_closure (impl->edited_idle, | ||
1488 | - g_cclosure_new_object (G_CALLBACK (edited_idle_cb), | ||
1489 | - G_OBJECT (impl))); | ||
1490 | - g_source_attach (impl->edited_idle, NULL); | ||
1491 | - | ||
1492 | - if (new_text) | ||
1493 | - impl->edited_new_text = g_strdup (new_text); | ||
1494 | -} | ||
1495 | - | ||
1496 | -/* Callback used from the text cell renderer when the new folder is named */ | ||
1497 | -static void | ||
1498 | -renderer_edited_cb (GtkCellRendererText *cell_renderer_text, | ||
1499 | - const gchar *path, | ||
1500 | - const gchar *new_text, | ||
1501 | - GtkFileChooserDefault *impl) | ||
1502 | -{ | ||
1503 | - /* work around bug #154921 */ | ||
1504 | - g_object_set (cell_renderer_text, | ||
1505 | - "mode", GTK_CELL_RENDERER_MODE_INERT, NULL); | ||
1506 | - queue_edited_idle (impl, new_text); | ||
1507 | -} | ||
1508 | - | ||
1509 | -/* Callback used from the text cell renderer when the new folder edition gets | ||
1510 | - * canceled. | ||
1511 | - */ | ||
1512 | -static void | ||
1513 | -renderer_editing_canceled_cb (GtkCellRendererText *cell_renderer_text, | ||
1514 | - GtkFileChooserDefault *impl) | ||
1515 | -{ | ||
1516 | - /* work around bug #154921 */ | ||
1517 | - g_object_set (cell_renderer_text, | ||
1518 | - "mode", GTK_CELL_RENDERER_MODE_INERT, NULL); | ||
1519 | - queue_edited_idle (impl, NULL); | ||
1520 | -} | ||
1521 | - | ||
1522 | -/* Creates the widgets for the filter combo box */ | ||
1523 | -static GtkWidget * | ||
1524 | -filter_create (GtkFileChooserDefault *impl) | ||
1525 | -{ | ||
1526 | - impl->filter_combo = gtk_combo_box_new_text (); | ||
1527 | - gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (impl->filter_combo), FALSE); | 1342 | - gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (impl->filter_combo), FALSE); |
1528 | - | 1343 | - |
1529 | - g_signal_connect (impl->filter_combo, "changed", | 1344 | g_signal_connect (impl->filter_combo, "changed", |
1530 | - G_CALLBACK (filter_combo_changed), impl); | 1345 | G_CALLBACK (filter_combo_changed), impl); |
1531 | - | 1346 | |
1532 | - return impl->filter_combo; | 1347 | return impl->filter_combo; |
1533 | -} | 1348 | } |
1534 | - | 1349 | |
1535 | -static GtkWidget * | 1350 | -static GtkWidget * |
1536 | -button_new (GtkFileChooserDefault *impl, | 1351 | -button_new (GtkFileChooserDefault *impl, |
1537 | - const char *text, | 1352 | - const char *text, |
@@ -1763,74 +1578,13 @@ | |||
1763 | - remove_selected_bookmarks (impl); | 1578 | - remove_selected_bookmarks (impl); |
1764 | -} | 1579 | -} |
1765 | - | 1580 | - |
1766 | -struct selection_check_closure { | 1581 | struct selection_check_closure { |
1767 | - GtkFileChooserDefault *impl; | 1582 | GtkFileChooserDefault *impl; |
1768 | - int num_selected; | 1583 | int num_selected; |
1769 | - gboolean all_files; | 1584 | @@ -2171,864 +1081,13 @@ struct get_selected_path_closure { |
1770 | - gboolean all_folders; | 1585 | const GtkFilePath *path; |
1771 | -}; | 1586 | }; |
1772 | - | 1587 | |
1773 | -/* Used from gtk_tree_selection_selected_foreach() */ | ||
1774 | -static void | ||
1775 | -selection_check_foreach_cb (GtkTreeModel *model, | ||
1776 | - GtkTreePath *path, | ||
1777 | - GtkTreeIter *iter, | ||
1778 | - gpointer data) | ||
1779 | -{ | ||
1780 | - struct selection_check_closure *closure; | ||
1781 | - GtkTreeIter child_iter; | ||
1782 | - const GtkFileInfo *info; | ||
1783 | - gboolean is_folder; | ||
1784 | - | ||
1785 | - closure = data; | ||
1786 | - closure->num_selected++; | ||
1787 | - | ||
1788 | - gtk_tree_model_sort_convert_iter_to_child_iter (closure->impl->sort_model, &child_iter, iter); | ||
1789 | - | ||
1790 | - info = _gtk_file_system_model_get_info (closure->impl->browse_files_model, &child_iter); | ||
1791 | - is_folder = info ? gtk_file_info_get_is_folder (info) : FALSE; | ||
1792 | - | ||
1793 | - closure->all_folders = closure->all_folders && is_folder; | ||
1794 | - closure->all_files = closure->all_files && !is_folder; | ||
1795 | -} | ||
1796 | - | ||
1797 | -/* Checks whether the selected items in the file list are all files or all folders */ | ||
1798 | -static void | ||
1799 | -selection_check (GtkFileChooserDefault *impl, | ||
1800 | - gint *num_selected, | ||
1801 | - gboolean *all_files, | ||
1802 | - gboolean *all_folders) | ||
1803 | -{ | ||
1804 | - struct selection_check_closure closure; | ||
1805 | - GtkTreeSelection *selection; | ||
1806 | - | ||
1807 | - closure.impl = impl; | ||
1808 | - closure.num_selected = 0; | ||
1809 | - closure.all_files = TRUE; | ||
1810 | - closure.all_folders = TRUE; | ||
1811 | - | ||
1812 | - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); | ||
1813 | - gtk_tree_selection_selected_foreach (selection, | ||
1814 | - selection_check_foreach_cb, | ||
1815 | - &closure); | ||
1816 | - | ||
1817 | - g_assert (closure.num_selected == 0 || !(closure.all_files && closure.all_folders)); | ||
1818 | - | ||
1819 | - if (num_selected) | ||
1820 | - *num_selected = closure.num_selected; | ||
1821 | - | ||
1822 | - if (all_files) | ||
1823 | - *all_files = closure.all_files; | ||
1824 | - | ||
1825 | - if (all_folders) | ||
1826 | - *all_folders = closure.all_folders; | ||
1827 | -} | ||
1828 | - | ||
1829 | -struct get_selected_path_closure { | ||
1830 | - GtkFileChooserDefault *impl; | ||
1831 | - const GtkFilePath *path; | ||
1832 | -}; | ||
1833 | - | ||
1834 | -static void | 1588 | -static void |
1835 | -get_selected_path_foreach_cb (GtkTreeModel *model, | 1589 | -get_selected_path_foreach_cb (GtkTreeModel *model, |
1836 | - GtkTreePath *path, | 1590 | - GtkTreePath *path, |
@@ -1846,7 +1600,7 @@ | |||
1846 | - closure->path = _gtk_file_system_model_get_path (closure->impl->browse_files_model, &child_iter); | 1600 | - closure->path = _gtk_file_system_model_get_path (closure->impl->browse_files_model, &child_iter); |
1847 | -} | 1601 | -} |
1848 | - | 1602 | - |
1849 | -/* Returns a selected path from the file list */ | 1603 | /* Returns a selected path from the file list */ |
1850 | -static const GtkFilePath * | 1604 | -static const GtkFilePath * |
1851 | -get_selected_path (GtkFileChooserDefault *impl) | 1605 | -get_selected_path (GtkFileChooserDefault *impl) |
1852 | -{ | 1606 | -{ |
@@ -1863,12 +1617,12 @@ | |||
1863 | - | 1617 | - |
1864 | - return closure.path; | 1618 | - return closure.path; |
1865 | -} | 1619 | -} |
1866 | - | 1620 | |
1867 | -typedef struct { | 1621 | typedef struct { |
1868 | - GtkFileChooserDefault *impl; | 1622 | GtkFileChooserDefault *impl; |
1869 | - gchar *tip; | 1623 | gchar *tip; |
1870 | -} UpdateTooltipData; | 1624 | } UpdateTooltipData; |
1871 | - | 1625 | |
1872 | -static void | 1626 | -static void |
1873 | -update_tooltip (GtkTreeModel *model, | 1627 | -update_tooltip (GtkTreeModel *model, |
1874 | - GtkTreePath *path, | 1628 | - GtkTreePath *path, |
@@ -2488,20 +2242,12 @@ | |||
2488 | - shortcuts_drop_uris (impl, selection_data->data, position); | 2242 | - shortcuts_drop_uris (impl, selection_data->data, position); |
2489 | - else if (selection_data->target == gdk_atom_intern ("GTK_TREE_MODEL_ROW", FALSE)) | 2243 | - else if (selection_data->target == gdk_atom_intern ("GTK_TREE_MODEL_ROW", FALSE)) |
2490 | - shortcuts_reorder (impl, position); | 2244 | - shortcuts_reorder (impl, position); |
2491 | + impl->edited_idle = g_idle_source_new (); | 2245 | - |
2492 | + g_source_set_closure (impl->edited_idle, | ||
2493 | + g_cclosure_new_object (G_CALLBACK (edited_idle_cb), | ||
2494 | + G_OBJECT (impl))); | ||
2495 | + g_source_attach (impl->edited_idle, NULL); | ||
2496 | |||
2497 | - g_signal_stop_emission_by_name (widget, "drag-data-received"); | 2246 | - g_signal_stop_emission_by_name (widget, "drag-data-received"); |
2498 | + if (new_text) | 2247 | -} |
2499 | + impl->edited_new_text = g_strdup (new_text); | 2248 | - |
2500 | } | ||
2501 | |||
2502 | -/* Callback used when the selection in the shortcuts tree changes */ | 2249 | -/* Callback used when the selection in the shortcuts tree changes */ |
2503 | +/* Callback used from the text cell renderer when the new folder is named */ | 2250 | -static void |
2504 | static void | ||
2505 | -shortcuts_selection_changed_cb (GtkTreeSelection *selection, | 2251 | -shortcuts_selection_changed_cb (GtkTreeSelection *selection, |
2506 | - GtkFileChooserDefault *impl) | 2252 | - GtkFileChooserDefault *impl) |
2507 | -{ | 2253 | -{ |
@@ -2512,11 +2258,7 @@ | |||
2512 | -shortcuts_row_separator_func (GtkTreeModel *model, | 2258 | -shortcuts_row_separator_func (GtkTreeModel *model, |
2513 | - GtkTreeIter *iter, | 2259 | - GtkTreeIter *iter, |
2514 | - gpointer data) | 2260 | - gpointer data) |
2515 | +renderer_edited_cb (GtkCellRendererText *cell_renderer_text, | 2261 | -{ |
2516 | + const gchar *path, | ||
2517 | + const gchar *new_text, | ||
2518 | + GtkFileChooserDefault *impl) | ||
2519 | { | ||
2520 | - gint column = GPOINTER_TO_INT (data); | 2262 | - gint column = GPOINTER_TO_INT (data); |
2521 | - gchar *text; | 2263 | - gchar *text; |
2522 | - | 2264 | - |
@@ -2528,25 +2270,16 @@ | |||
2528 | - g_free (text); | 2270 | - g_free (text); |
2529 | - | 2271 | - |
2530 | - return FALSE; | 2272 | - return FALSE; |
2531 | + /* work around bug #154921 */ | 2273 | -} |
2532 | + g_object_set (cell_renderer_text, | 2274 | - |
2533 | + "mode", GTK_CELL_RENDERER_MODE_INERT, NULL); | ||
2534 | + queue_edited_idle (impl, new_text); | ||
2535 | } | ||
2536 | |||
2537 | -/* Since GtkTreeView has a keybinding attached to '/', we need to catch | 2275 | -/* Since GtkTreeView has a keybinding attached to '/', we need to catch |
2538 | - * keypresses before the TreeView gets them. | 2276 | - * keypresses before the TreeView gets them. |
2539 | +/* Callback used from the text cell renderer when the new folder edition gets | 2277 | - */ |
2540 | + * canceled. | ||
2541 | */ | ||
2542 | -static gboolean | 2278 | -static gboolean |
2543 | -tree_view_keybinding_cb (GtkWidget *tree_view, | 2279 | -tree_view_keybinding_cb (GtkWidget *tree_view, |
2544 | - GdkEventKey *event, | 2280 | - GdkEventKey *event, |
2545 | - GtkFileChooserDefault *impl) | 2281 | - GtkFileChooserDefault *impl) |
2546 | +static void | 2282 | -{ |
2547 | +renderer_editing_canceled_cb (GtkCellRendererText *cell_renderer_text, | ||
2548 | + GtkFileChooserDefault *impl) | ||
2549 | { | ||
2550 | - if (event->keyval == GDK_slash && | 2283 | - if (event->keyval == GDK_slash && |
2551 | - ! (event->state & (~GDK_SHIFT_MASK & gtk_accelerator_get_default_mod_mask ()))) | 2284 | - ! (event->state & (~GDK_SHIFT_MASK & gtk_accelerator_get_default_mod_mask ()))) |
2552 | - { | 2285 | - { |
@@ -2555,19 +2288,13 @@ | |||
2555 | - } | 2288 | - } |
2556 | - | 2289 | - |
2557 | - return FALSE; | 2290 | - return FALSE; |
2558 | + /* work around bug #154921 */ | 2291 | -} |
2559 | + g_object_set (cell_renderer_text, | 2292 | - |
2560 | + "mode", GTK_CELL_RENDERER_MODE_INERT, NULL); | ||
2561 | + queue_edited_idle (impl, NULL); | ||
2562 | } | ||
2563 | |||
2564 | - | 2293 | - |
2565 | -/* Creates the widgets for the shortcuts and bookmarks tree */ | 2294 | -/* Creates the widgets for the shortcuts and bookmarks tree */ |
2566 | +/* Creates the widgets for the filter combo box */ | 2295 | -static GtkWidget * |
2567 | static GtkWidget * | ||
2568 | -shortcuts_list_create (GtkFileChooserDefault *impl) | 2296 | -shortcuts_list_create (GtkFileChooserDefault *impl) |
2569 | +filter_create (GtkFileChooserDefault *impl) | 2297 | -{ |
2570 | { | ||
2571 | - GtkWidget *swin; | 2298 | - GtkWidget *swin; |
2572 | - GtkTreeSelection *selection; | 2299 | - GtkTreeSelection *selection; |
2573 | - GtkTreeViewColumn *column; | 2300 | - GtkTreeViewColumn *column; |
@@ -2589,14 +2316,9 @@ | |||
2589 | - G_CALLBACK (tree_view_keybinding_cb), impl); | 2316 | - G_CALLBACK (tree_view_keybinding_cb), impl); |
2590 | - atk_object_set_name (gtk_widget_get_accessible (impl->browse_shortcuts_tree_view), _("Shortcuts")); | 2317 | - atk_object_set_name (gtk_widget_get_accessible (impl->browse_shortcuts_tree_view), _("Shortcuts")); |
2591 | - gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), FALSE); | 2318 | - gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), FALSE); |
2592 | + impl->filter_combo = gtk_combo_box_new_text (); | 2319 | - |
2593 | + g_signal_connect (impl->filter_combo, "changed", | ||
2594 | + G_CALLBACK (filter_combo_changed), impl); | ||
2595 | |||
2596 | - gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), impl->shortcuts_filter_model); | 2320 | - gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), impl->shortcuts_filter_model); |
2597 | + return impl->filter_combo; | 2321 | - |
2598 | +} | ||
2599 | |||
2600 | - gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), | 2322 | - gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), |
2601 | - GDK_BUTTON1_MASK, | 2323 | - GDK_BUTTON1_MASK, |
2602 | - shortcuts_source_targets, | 2324 | - shortcuts_source_targets, |
@@ -2608,44 +2330,22 @@ | |||
2608 | - shortcuts_dest_targets, | 2330 | - shortcuts_dest_targets, |
2609 | - num_shortcuts_dest_targets, | 2331 | - num_shortcuts_dest_targets, |
2610 | - GDK_ACTION_COPY | GDK_ACTION_MOVE); | 2332 | - GDK_ACTION_COPY | GDK_ACTION_MOVE); |
2611 | +struct selection_check_closure { | 2333 | - |
2612 | + GtkFileChooserDefault *impl; | ||
2613 | + int num_selected; | ||
2614 | + gboolean all_files; | ||
2615 | + gboolean all_folders; | ||
2616 | +}; | ||
2617 | |||
2618 | - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view)); | 2334 | - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view)); |
2619 | - gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); | 2335 | - gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); |
2620 | - gtk_tree_selection_set_select_function (selection, | 2336 | - gtk_tree_selection_set_select_function (selection, |
2621 | - shortcuts_select_func, | 2337 | - shortcuts_select_func, |
2622 | - impl, NULL); | 2338 | - impl, NULL); |
2623 | +/* Used from gtk_tree_selection_selected_foreach() */ | 2339 | - |
2624 | +static void | ||
2625 | +selection_check_foreach_cb (GtkTreeModel *model, | ||
2626 | + GtkTreePath *path, | ||
2627 | + GtkTreeIter *iter, | ||
2628 | + gpointer data) | ||
2629 | +{ | ||
2630 | + struct selection_check_closure *closure; | ||
2631 | + GtkTreeIter child_iter; | ||
2632 | + const GtkFileInfo *info; | ||
2633 | + gboolean is_folder; | ||
2634 | |||
2635 | - g_signal_connect (selection, "changed", | 2340 | - g_signal_connect (selection, "changed", |
2636 | - G_CALLBACK (shortcuts_selection_changed_cb), impl); | 2341 | - G_CALLBACK (shortcuts_selection_changed_cb), impl); |
2637 | + closure = data; | 2342 | - |
2638 | + closure->num_selected++; | ||
2639 | |||
2640 | - g_signal_connect (impl->browse_shortcuts_tree_view, "row-activated", | 2343 | - g_signal_connect (impl->browse_shortcuts_tree_view, "row-activated", |
2641 | - G_CALLBACK (shortcuts_row_activated_cb), impl); | 2344 | - G_CALLBACK (shortcuts_row_activated_cb), impl); |
2642 | + gtk_tree_model_sort_convert_iter_to_child_iter (closure->impl->sort_model, &child_iter, iter); | 2345 | - |
2643 | |||
2644 | - g_signal_connect (impl->browse_shortcuts_tree_view, "key-press-event", | 2346 | - g_signal_connect (impl->browse_shortcuts_tree_view, "key-press-event", |
2645 | - G_CALLBACK (shortcuts_key_press_event_cb), impl); | 2347 | - G_CALLBACK (shortcuts_key_press_event_cb), impl); |
2646 | + info = _gtk_file_system_model_get_info (closure->impl->browse_files_model, &child_iter); | 2348 | - |
2647 | + is_folder = info ? gtk_file_info_get_is_folder (info) : FALSE; | ||
2648 | |||
2649 | - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-begin", | 2349 | - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-begin", |
2650 | - G_CALLBACK (shortcuts_drag_begin_cb), impl); | 2350 | - G_CALLBACK (shortcuts_drag_begin_cb), impl); |
2651 | - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-end", | 2351 | - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-end", |
@@ -2661,43 +2361,22 @@ | |||
2661 | - G_CALLBACK (shortcuts_drag_drop_cb), impl); | 2361 | - G_CALLBACK (shortcuts_drag_drop_cb), impl); |
2662 | - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-data-received", | 2362 | - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-data-received", |
2663 | - G_CALLBACK (shortcuts_drag_data_received_cb), impl); | 2363 | - G_CALLBACK (shortcuts_drag_data_received_cb), impl); |
2664 | + closure->all_folders = closure->all_folders && is_folder; | 2364 | - |
2665 | + closure->all_files = closure->all_files && !is_folder; | ||
2666 | +} | ||
2667 | |||
2668 | - gtk_container_add (GTK_CONTAINER (swin), impl->browse_shortcuts_tree_view); | 2365 | - gtk_container_add (GTK_CONTAINER (swin), impl->browse_shortcuts_tree_view); |
2669 | - gtk_widget_show (impl->browse_shortcuts_tree_view); | 2366 | - gtk_widget_show (impl->browse_shortcuts_tree_view); |
2670 | +/* Checks whether the selected items in the file list are all files or all folders */ | 2367 | - |
2671 | +static void | ||
2672 | +selection_check (GtkFileChooserDefault *impl, | ||
2673 | + gint *num_selected, | ||
2674 | + gboolean *all_files, | ||
2675 | + gboolean *all_folders) | ||
2676 | +{ | ||
2677 | + struct selection_check_closure closure; | ||
2678 | + GtkTreeSelection *selection; | ||
2679 | |||
2680 | - /* Column */ | 2368 | - /* Column */ |
2681 | + closure.impl = impl; | 2369 | - |
2682 | + closure.num_selected = 0; | ||
2683 | + closure.all_files = TRUE; | ||
2684 | + closure.all_folders = TRUE; | ||
2685 | |||
2686 | - column = gtk_tree_view_column_new (); | 2370 | - column = gtk_tree_view_column_new (); |
2687 | - gtk_tree_view_column_set_title (column, _("Folder")); | 2371 | - gtk_tree_view_column_set_title (column, _("Folder")); |
2688 | + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); | 2372 | - |
2689 | + gtk_tree_selection_selected_foreach (selection, | ||
2690 | + selection_check_foreach_cb, | ||
2691 | + &closure); | ||
2692 | |||
2693 | - renderer = gtk_cell_renderer_pixbuf_new (); | 2373 | - renderer = gtk_cell_renderer_pixbuf_new (); |
2694 | - gtk_tree_view_column_pack_start (column, renderer, FALSE); | 2374 | - gtk_tree_view_column_pack_start (column, renderer, FALSE); |
2695 | - gtk_tree_view_column_set_attributes (column, renderer, | 2375 | - gtk_tree_view_column_set_attributes (column, renderer, |
2696 | - "pixbuf", SHORTCUTS_COL_PIXBUF, | 2376 | - "pixbuf", SHORTCUTS_COL_PIXBUF, |
2697 | - "visible", SHORTCUTS_COL_PIXBUF_VISIBLE, | 2377 | - "visible", SHORTCUTS_COL_PIXBUF_VISIBLE, |
2698 | - NULL); | 2378 | - NULL); |
2699 | + g_assert (closure.num_selected == 0 || !(closure.all_files && closure.all_folders)); | 2379 | - |
2700 | |||
2701 | - renderer = gtk_cell_renderer_text_new (); | 2380 | - renderer = gtk_cell_renderer_text_new (); |
2702 | - gtk_tree_view_column_pack_start (column, renderer, TRUE); | 2381 | - gtk_tree_view_column_pack_start (column, renderer, TRUE); |
2703 | - gtk_tree_view_column_set_attributes (column, renderer, | 2382 | - gtk_tree_view_column_set_attributes (column, renderer, |
@@ -2708,18 +2387,12 @@ | |||
2708 | - shortcuts_row_separator_func, | 2387 | - shortcuts_row_separator_func, |
2709 | - GINT_TO_POINTER (SHORTCUTS_COL_NAME), | 2388 | - GINT_TO_POINTER (SHORTCUTS_COL_NAME), |
2710 | - NULL); | 2389 | - NULL); |
2711 | + if (num_selected) | 2390 | - |
2712 | + *num_selected = closure.num_selected; | ||
2713 | |||
2714 | - gtk_tree_view_append_column (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), column); | 2391 | - gtk_tree_view_append_column (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view), column); |
2715 | + if (all_files) | 2392 | - |
2716 | + *all_files = closure.all_files; | ||
2717 | |||
2718 | - return swin; | 2393 | - return swin; |
2719 | + if (all_folders) | 2394 | -} |
2720 | + *all_folders = closure.all_folders; | 2395 | - |
2721 | } | ||
2722 | |||
2723 | -/* Creates the widgets for the shortcuts/bookmarks pane */ | 2396 | -/* Creates the widgets for the shortcuts/bookmarks pane */ |
2724 | -static GtkWidget * | 2397 | -static GtkWidget * |
2725 | -shortcuts_pane_create (GtkFileChooserDefault *impl, | 2398 | -shortcuts_pane_create (GtkFileChooserDefault *impl, |
@@ -2743,14 +2416,9 @@ | |||
2743 | - gtk_size_group_add_widget (size_group, hbox); | 2416 | - gtk_size_group_add_widget (size_group, hbox); |
2744 | - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); | 2417 | - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); |
2745 | - gtk_widget_show (hbox); | 2418 | - gtk_widget_show (hbox); |
2746 | +struct get_selected_path_closure { | 2419 | - |
2747 | + GtkFileChooserDefault *impl; | ||
2748 | + const GtkFilePath *path; | ||
2749 | +}; | ||
2750 | |||
2751 | - /* Add bookmark button */ | 2420 | - /* Add bookmark button */ |
2752 | +/* Returns a selected path from the file list */ | 2421 | - |
2753 | |||
2754 | - impl->browse_shortcuts_add_button = button_new (impl, | 2422 | - impl->browse_shortcuts_add_button = button_new (impl, |
2755 | - _("_Add"), | 2423 | - _("_Add"), |
2756 | - GTK_STOCK_ADD, | 2424 | - GTK_STOCK_ADD, |
@@ -2772,17 +2440,13 @@ | |||
2772 | - gtk_box_pack_start (GTK_BOX (hbox), impl->browse_shortcuts_remove_button, TRUE, TRUE, 0); | 2440 | - gtk_box_pack_start (GTK_BOX (hbox), impl->browse_shortcuts_remove_button, TRUE, TRUE, 0); |
2773 | - gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_remove_button, | 2441 | - gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_remove_button, |
2774 | - _("Remove the selected bookmark"), NULL); | 2442 | - _("Remove the selected bookmark"), NULL); |
2775 | +typedef struct { | 2443 | - |
2776 | + GtkFileChooserDefault *impl; | ||
2777 | + gchar *tip; | ||
2778 | +} UpdateTooltipData; | ||
2779 | |||
2780 | - return vbox; | 2444 | - return vbox; |
2781 | -} | 2445 | -} |
2782 | 2446 | ||
2783 | /* Handles key press events on the file list, so that we can trap Enter to | 2447 | /* Handles key press events on the file list, so that we can trap Enter to |
2784 | * activate the default button on our own. Also, checks to see if '/' has been | 2448 | * activate the default button on our own. Also, checks to see if '/' has been |
2785 | @@ -3026,14 +1085,11 @@ | 2449 | @@ -3040,14 +1099,11 @@ trap_activate_cb (GtkWidget *widget, |
2786 | gpointer data) | 2450 | gpointer data) |
2787 | { | 2451 | { |
2788 | GtkFileChooserDefault *impl; | 2452 | GtkFileChooserDefault *impl; |
@@ -2798,7 +2462,7 @@ | |||
2798 | { | 2462 | { |
2799 | location_popup_handler (impl, "/"); | 2463 | location_popup_handler (impl, "/"); |
2800 | return TRUE; | 2464 | return TRUE; |
2801 | @@ -3043,7 +1099,6 @@ | 2465 | @@ -3057,7 +1113,6 @@ trap_activate_cb (GtkWidget *widget, |
2802 | || event->keyval == GDK_ISO_Enter | 2466 | || event->keyval == GDK_ISO_Enter |
2803 | || event->keyval == GDK_KP_Enter | 2467 | || event->keyval == GDK_KP_Enter |
2804 | || event->keyval == GDK_space) | 2468 | || event->keyval == GDK_space) |
@@ -2806,7 +2470,7 @@ | |||
2806 | && !(impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER || | 2470 | && !(impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER || |
2807 | impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)) | 2471 | impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)) |
2808 | { | 2472 | { |
2809 | @@ -3063,37 +1118,7 @@ | 2473 | @@ -3077,37 +1132,7 @@ trap_activate_cb (GtkWidget *widget, |
2810 | return FALSE; | 2474 | return FALSE; |
2811 | } | 2475 | } |
2812 | 2476 | ||
@@ -2845,9 +2509,9 @@ | |||
2845 | /* Callback used when the "Show Hidden Files" menu item is toggled */ | 2509 | /* Callback used when the "Show Hidden Files" menu item is toggled */ |
2846 | static void | 2510 | static void |
2847 | show_hidden_toggled_cb (GtkCheckMenuItem *item, | 2511 | show_hidden_toggled_cb (GtkCheckMenuItem *item, |
2848 | @@ -3103,145 +1128,7 @@ | 2512 | @@ -3238,145 +1263,7 @@ file_list_drag_motion_cb (GtkWidget |
2849 | "show-hidden", gtk_check_menu_item_get_active (item), | 2513 | g_signal_stop_emission_by_name (widget, "drag-motion"); |
2850 | NULL); | 2514 | return TRUE; |
2851 | } | 2515 | } |
2852 | - | 2516 | - |
2853 | -/* Constructs the popup menu for the file list if needed */ | 2517 | -/* Constructs the popup menu for the file list if needed */ |
@@ -2992,7 +2656,7 @@ | |||
2992 | 2656 | ||
2993 | /* Creates the widgets for the file list */ | 2657 | /* Creates the widgets for the file list */ |
2994 | static GtkWidget * | 2658 | static GtkWidget * |
2995 | @@ -3272,11 +1159,7 @@ | 2659 | @@ -3414,17 +1301,6 @@ create_file_list (GtkFileChooserDefault |
2996 | G_CALLBACK (list_row_activated), impl); | 2660 | G_CALLBACK (list_row_activated), impl); |
2997 | g_signal_connect (impl->browse_files_tree_view, "key-press-event", | 2661 | g_signal_connect (impl->browse_files_tree_view, "key-press-event", |
2998 | G_CALLBACK (trap_activate_cb), impl); | 2662 | G_CALLBACK (trap_activate_cb), impl); |
@@ -3001,11 +2665,16 @@ | |||
3001 | - g_signal_connect (impl->browse_files_tree_view, "button-press-event", | 2665 | - g_signal_connect (impl->browse_files_tree_view, "button-press-event", |
3002 | - G_CALLBACK (list_button_press_event_cb), impl); | 2666 | - G_CALLBACK (list_button_press_event_cb), impl); |
3003 | - | 2667 | - |
3004 | + | 2668 | - g_signal_connect (impl->browse_files_tree_view, "drag-data-received", |
2669 | - G_CALLBACK (file_list_drag_data_received_cb), impl); | ||
2670 | - g_signal_connect (impl->browse_files_tree_view, "drag-drop", | ||
2671 | - G_CALLBACK (file_list_drag_drop_cb), impl); | ||
2672 | - g_signal_connect (impl->browse_files_tree_view, "drag-motion", | ||
2673 | - G_CALLBACK (file_list_drag_motion_cb), impl); | ||
2674 | |||
3005 | selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); | 2675 | selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); |
3006 | gtk_tree_selection_set_select_function (selection, | 2676 | gtk_tree_selection_set_select_function (selection, |
3007 | list_select_func, | 2677 | @@ -3495,70 +1371,163 @@ create_file_list (GtkFileChooserDefault |
3008 | @@ -3346,70 +1229,163 @@ | ||
3009 | return swin; | 2678 | return swin; |
3010 | } | 2679 | } |
3011 | 2680 | ||
@@ -3052,7 +2721,10 @@ | |||
3052 | + int n; | 2721 | + int n; |
3053 | + GtkWidget *bar = gtk_hbox_new (FALSE, DEFAULT_SPACING); | 2722 | + GtkWidget *bar = gtk_hbox_new (FALSE, DEFAULT_SPACING); |
3054 | + GtkWidget *img; | 2723 | + GtkWidget *img; |
3055 | + | 2724 | |
2725 | - gtk_container_forall (GTK_CONTAINER (combo), | ||
2726 | - set_filter_tooltip, | ||
2727 | - impl->tooltips); | ||
3056 | + /* first the Up button */ | 2728 | + /* first the Up button */ |
3057 | + img = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_BUTTON); | 2729 | + img = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_BUTTON); |
3058 | + gtk_widget_show (img); | 2730 | + gtk_widget_show (img); |
@@ -3133,10 +2805,7 @@ | |||
3133 | + gtk_widget_show_all (button); | 2805 | + gtk_widget_show_all (button); |
3134 | + | 2806 | + |
3135 | + g_object_set_data (G_OBJECT (button), "file-path", base_path); | 2807 | + g_object_set_data (G_OBJECT (button), "file-path", base_path); |
3136 | 2808 | + | |
3137 | - gtk_container_forall (GTK_CONTAINER (combo), | ||
3138 | - set_filter_tooltip, | ||
3139 | - impl->tooltips); | ||
3140 | + g_signal_connect (button, "clicked", | 2809 | + g_signal_connect (button, "clicked", |
3141 | + G_CALLBACK (volume_button_clicked_cb), impl); | 2810 | + G_CALLBACK (volume_button_clicked_cb), impl); |
3142 | + | 2811 | + |
@@ -3205,7 +2874,7 @@ | |||
3205 | gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); | 2874 | gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); |
3206 | gtk_widget_show (hbox); | 2875 | gtk_widget_show (hbox); |
3207 | 2876 | ||
3208 | @@ -3418,157 +1394,37 @@ | 2877 | @@ -3567,157 +1536,37 @@ file_pane_create (GtkFileChooserDefault |
3209 | widget = create_file_list (impl); | 2878 | widget = create_file_list (impl); |
3210 | gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0); | 2879 | gtk_box_pack_start (GTK_BOX (hbox), widget, TRUE, TRUE, 0); |
3211 | 2880 | ||
@@ -3303,9 +2972,9 @@ | |||
3303 | + GtkWidget *hbox; | 2972 | + GtkWidget *hbox; |
3304 | GtkWidget *widget; | 2973 | GtkWidget *widget; |
3305 | - GtkWidget *alignment; | 2974 | - GtkWidget *alignment; |
3306 | |||
3307 | - vbox = gtk_vbox_new (FALSE, 12); | ||
3308 | - | 2975 | - |
2976 | - vbox = gtk_vbox_new (FALSE, 12); | ||
2977 | |||
3309 | - table = gtk_table_new (2, 2, FALSE); | 2978 | - table = gtk_table_new (2, 2, FALSE); |
3310 | - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); | 2979 | - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); |
3311 | - gtk_widget_show (table); | 2980 | - gtk_widget_show (table); |
@@ -3375,7 +3044,7 @@ | |||
3375 | return vbox; | 3044 | return vbox; |
3376 | } | 3045 | } |
3377 | 3046 | ||
3378 | @@ -3576,29 +1432,11 @@ | 3047 | @@ -3725,29 +1574,11 @@ save_widgets_create (GtkFileChooserDefau |
3379 | static GtkWidget * | 3048 | static GtkWidget * |
3380 | browse_widgets_create (GtkFileChooserDefault *impl) | 3049 | browse_widgets_create (GtkFileChooserDefault *impl) |
3381 | { | 3050 | { |
@@ -3383,7 +3052,7 @@ | |||
3383 | - GtkWidget *hpaned; | 3052 | - GtkWidget *hpaned; |
3384 | GtkWidget *widget; | 3053 | GtkWidget *widget; |
3385 | - GtkSizeGroup *size_group; | 3054 | - GtkSizeGroup *size_group; |
3386 | 3055 | - | |
3387 | - /* size group is used by the [+][-] buttons and the filter combo */ | 3056 | - /* size group is used by the [+][-] buttons and the filter combo */ |
3388 | - size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); | 3057 | - size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL); |
3389 | - vbox = gtk_vbox_new (FALSE, 12); | 3058 | - vbox = gtk_vbox_new (FALSE, 12); |
@@ -3398,16 +3067,16 @@ | |||
3398 | - gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, FALSE); | 3067 | - gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, FALSE); |
3399 | - widget = file_pane_create (impl, size_group); | 3068 | - widget = file_pane_create (impl, size_group); |
3400 | - gtk_paned_pack2 (GTK_PANED (hpaned), widget, TRUE, FALSE); | 3069 | - gtk_paned_pack2 (GTK_PANED (hpaned), widget, TRUE, FALSE); |
3401 | + widget = file_pane_create (impl); | ||
3402 | 3070 | ||
3403 | - g_object_unref (size_group); | 3071 | - g_object_unref (size_group); |
3404 | - | 3072 | + widget = file_pane_create (impl); |
3073 | |||
3405 | - return vbox; | 3074 | - return vbox; |
3406 | + return widget; | 3075 | + return widget; |
3407 | } | 3076 | } |
3408 | 3077 | ||
3409 | static GObject* | 3078 | static GObject* |
3410 | @@ -3618,56 +1456,20 @@ | 3079 | @@ -3767,56 +1598,20 @@ gtk_file_chooser_default_constructor (GT |
3411 | 3080 | ||
3412 | gtk_widget_push_composite_child (); | 3081 | gtk_widget_push_composite_child (); |
3413 | 3082 | ||
@@ -3468,7 +3137,7 @@ | |||
3468 | static void | 3137 | static void |
3469 | set_local_only (GtkFileChooserDefault *impl, | 3138 | set_local_only (GtkFileChooserDefault *impl, |
3470 | gboolean local_only) | 3139 | gboolean local_only) |
3471 | @@ -3676,12 +1478,6 @@ | 3140 | @@ -3825,12 +1620,6 @@ set_local_only (GtkFileChooserDefault *i |
3472 | { | 3141 | { |
3473 | impl->local_only = local_only; | 3142 | impl->local_only = local_only; |
3474 | 3143 | ||
@@ -3481,7 +3150,7 @@ | |||
3481 | if (local_only && | 3150 | if (local_only && |
3482 | !gtk_file_system_path_is_local (impl->file_system, impl->current_folder)) | 3151 | !gtk_file_system_path_is_local (impl->file_system, impl->current_folder)) |
3483 | { | 3152 | { |
3484 | @@ -3708,18 +1504,7 @@ | 3153 | @@ -3857,18 +1646,7 @@ static void |
3485 | volumes_changed_cb (GtkFileSystem *file_system, | 3154 | volumes_changed_cb (GtkFileSystem *file_system, |
3486 | GtkFileChooserDefault *impl) | 3155 | GtkFileChooserDefault *impl) |
3487 | { | 3156 | { |
@@ -3501,7 +3170,7 @@ | |||
3501 | } | 3170 | } |
3502 | 3171 | ||
3503 | /* Sets the file chooser to multiple selection mode */ | 3172 | /* Sets the file chooser to multiple selection mode */ |
3504 | @@ -3741,8 +1526,6 @@ | 3173 | @@ -3890,8 +1668,6 @@ set_select_multiple (GtkFileChooserDefau |
3505 | 3174 | ||
3506 | impl->select_multiple = select_multiple; | 3175 | impl->select_multiple = select_multiple; |
3507 | g_object_notify (G_OBJECT (impl), "select-multiple"); | 3176 | g_object_notify (G_OBJECT (impl), "select-multiple"); |
@@ -3510,7 +3179,7 @@ | |||
3510 | } | 3179 | } |
3511 | 3180 | ||
3512 | static void | 3181 | static void |
3513 | @@ -3753,8 +1536,6 @@ | 3182 | @@ -3902,8 +1678,6 @@ set_file_system_backend (GtkFileChooserD |
3514 | { | 3183 | { |
3515 | g_signal_handler_disconnect (impl->file_system, impl->volumes_changed_id); | 3184 | g_signal_handler_disconnect (impl->file_system, impl->volumes_changed_id); |
3516 | impl->volumes_changed_id = 0; | 3185 | impl->volumes_changed_id = 0; |
@@ -3519,7 +3188,7 @@ | |||
3519 | g_object_unref (impl->file_system); | 3188 | g_object_unref (impl->file_system); |
3520 | } | 3189 | } |
3521 | 3190 | ||
3522 | @@ -3790,9 +1571,6 @@ | 3191 | @@ -3939,9 +1713,6 @@ set_file_system_backend (GtkFileChooserD |
3523 | impl->volumes_changed_id = g_signal_connect (impl->file_system, "volumes-changed", | 3192 | impl->volumes_changed_id = g_signal_connect (impl->file_system, "volumes-changed", |
3524 | G_CALLBACK (volumes_changed_cb), | 3193 | G_CALLBACK (volumes_changed_cb), |
3525 | impl); | 3194 | impl); |
@@ -3529,7 +3198,7 @@ | |||
3529 | } | 3198 | } |
3530 | } | 3199 | } |
3531 | 3200 | ||
3532 | @@ -3807,30 +1585,8 @@ | 3201 | @@ -3956,30 +1727,8 @@ update_appearance (GtkFileChooserDefault |
3533 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || | 3202 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || |
3534 | impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) | 3203 | impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) |
3535 | { | 3204 | { |
@@ -3561,7 +3230,7 @@ | |||
3561 | gtk_widget_show (impl->browse_new_folder_button); | 3230 | gtk_widget_show (impl->browse_new_folder_button); |
3562 | 3231 | ||
3563 | if (impl->select_multiple) | 3232 | if (impl->select_multiple) |
3564 | @@ -3844,6 +1600,7 @@ | 3233 | @@ -3993,6 +1742,7 @@ update_appearance (GtkFileChooserDefault |
3565 | impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) | 3234 | impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) |
3566 | { | 3235 | { |
3567 | gtk_widget_hide (impl->save_widgets); | 3236 | gtk_widget_hide (impl->save_widgets); |
@@ -3569,7 +3238,7 @@ | |||
3569 | gtk_widget_show (impl->browse_widgets); | 3238 | gtk_widget_show (impl->browse_widgets); |
3570 | } | 3239 | } |
3571 | 3240 | ||
3572 | @@ -3876,12 +1633,9 @@ | 3241 | @@ -4025,12 +1775,9 @@ gtk_file_chooser_default_set_property (G |
3573 | { | 3242 | { |
3574 | gtk_file_chooser_default_unselect_all (GTK_FILE_CHOOSER (impl)); | 3243 | gtk_file_chooser_default_unselect_all (GTK_FILE_CHOOSER (impl)); |
3575 | 3244 | ||
@@ -3584,7 +3253,7 @@ | |||
3584 | set_select_multiple (impl, FALSE, TRUE); | 3253 | set_select_multiple (impl, FALSE, TRUE); |
3585 | } | 3254 | } |
3586 | impl->action = action; | 3255 | impl->action = action; |
3587 | @@ -3902,29 +1656,12 @@ | 3256 | @@ -4051,29 +1798,12 @@ gtk_file_chooser_default_set_property (G |
3588 | case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY: | 3257 | case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY: |
3589 | set_local_only (impl, g_value_get_boolean (value)); | 3258 | set_local_only (impl, g_value_get_boolean (value)); |
3590 | break; | 3259 | break; |
@@ -3616,7 +3285,7 @@ | |||
3616 | return; | 3285 | return; |
3617 | } | 3286 | } |
3618 | 3287 | ||
3619 | @@ -3943,6 +1680,19 @@ | 3288 | @@ -4092,6 +1822,19 @@ gtk_file_chooser_default_set_property (G |
3620 | } | 3289 | } |
3621 | } | 3290 | } |
3622 | break; | 3291 | break; |
@@ -3636,7 +3305,7 @@ | |||
3636 | default: | 3305 | default: |
3637 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | 3306 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
3638 | break; | 3307 | break; |
3639 | @@ -3968,24 +1718,30 @@ | 3308 | @@ -4117,24 +1860,30 @@ gtk_file_chooser_default_get_property (G |
3640 | case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY: | 3309 | case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY: |
3641 | g_value_set_boolean (value, impl->local_only); | 3310 | g_value_set_boolean (value, impl->local_only); |
3642 | break; | 3311 | break; |
@@ -3677,7 +3346,7 @@ | |||
3677 | default: | 3346 | default: |
3678 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | 3347 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
3679 | break; | 3348 | break; |
3680 | @@ -4013,12 +1769,6 @@ | 3349 | @@ -4162,12 +1911,6 @@ gtk_file_chooser_default_dispose (GObjec |
3681 | { | 3350 | { |
3682 | GtkFileChooserDefault *impl = (GtkFileChooserDefault *) object; | 3351 | GtkFileChooserDefault *impl = (GtkFileChooserDefault *) object; |
3683 | 3352 | ||
@@ -3690,7 +3359,7 @@ | |||
3690 | remove_settings_signal (impl, gtk_widget_get_screen (GTK_WIDGET (impl))); | 3359 | remove_settings_signal (impl, gtk_widget_get_screen (GTK_WIDGET (impl))); |
3691 | 3360 | ||
3692 | G_OBJECT_CLASS (parent_class)->dispose (object); | 3361 | G_OBJECT_CLASS (parent_class)->dispose (object); |
3693 | @@ -4031,12 +1781,7 @@ | 3362 | @@ -4180,12 +1923,7 @@ gtk_file_chooser_default_dispose (GObjec |
3694 | static void | 3363 | static void |
3695 | gtk_file_chooser_default_show_all (GtkWidget *widget) | 3364 | gtk_file_chooser_default_show_all (GtkWidget *widget) |
3696 | { | 3365 | { |
@@ -3703,7 +3372,7 @@ | |||
3703 | } | 3372 | } |
3704 | 3373 | ||
3705 | /* Handler for GtkWindow::set-focus; this is where we save the last-focused | 3374 | /* Handler for GtkWindow::set-focus; this is where we save the last-focused |
3706 | @@ -4095,7 +1840,6 @@ | 3375 | @@ -4244,7 +1982,6 @@ change_icon_theme (GtkFileChooserDefault |
3707 | else | 3376 | else |
3708 | impl->icon_size = FALLBACK_ICON_SIZE; | 3377 | impl->icon_size = FALLBACK_ICON_SIZE; |
3709 | 3378 | ||
@@ -3711,7 +3380,7 @@ | |||
3711 | gtk_widget_queue_resize (impl->browse_files_tree_view); | 3380 | gtk_widget_queue_resize (impl->browse_files_tree_view); |
3712 | } | 3381 | } |
3713 | 3382 | ||
3714 | @@ -4231,8 +1975,6 @@ | 3383 | @@ -4380,8 +2117,6 @@ gtk_file_chooser_default_map (GtkWidget |
3715 | pending_select_paths_store_selection (impl); | 3384 | pending_select_paths_store_selection (impl); |
3716 | change_folder_and_display_error (impl, impl->current_folder); | 3385 | change_folder_and_display_error (impl, impl->current_folder); |
3717 | } | 3386 | } |
@@ -3720,7 +3389,7 @@ | |||
3720 | } | 3389 | } |
3721 | 3390 | ||
3722 | static gboolean | 3391 | static gboolean |
3723 | @@ -4519,18 +2261,21 @@ | 3392 | @@ -4668,18 +2403,21 @@ show_and_select_paths (GtkFileChooserDef |
3724 | GtkFileFolder *folder; | 3393 | GtkFileFolder *folder; |
3725 | gboolean success; | 3394 | gboolean success; |
3726 | gboolean have_hidden; | 3395 | gboolean have_hidden; |
@@ -3744,7 +3413,7 @@ | |||
3744 | 3413 | ||
3745 | if (only_one_path) | 3414 | if (only_one_path) |
3746 | { | 3415 | { |
3747 | @@ -4541,7 +2286,6 @@ | 3416 | @@ -4690,7 +2428,6 @@ show_and_select_paths (GtkFileChooserDef |
3748 | { | 3417 | { |
3749 | success = TRUE; | 3418 | success = TRUE; |
3750 | have_hidden = gtk_file_info_get_is_hidden (info); | 3419 | have_hidden = gtk_file_info_get_is_hidden (info); |
@@ -3752,7 +3421,7 @@ | |||
3752 | gtk_file_info_free (info); | 3421 | gtk_file_info_free (info); |
3753 | } | 3422 | } |
3754 | } | 3423 | } |
3755 | @@ -4563,12 +2307,9 @@ | 3424 | @@ -4712,12 +2449,9 @@ show_and_select_paths (GtkFileChooserDef |
3756 | if (!have_hidden) | 3425 | if (!have_hidden) |
3757 | have_hidden = gtk_file_info_get_is_hidden (info); | 3426 | have_hidden = gtk_file_info_get_is_hidden (info); |
3758 | 3427 | ||
@@ -3766,7 +3435,7 @@ | |||
3766 | break; /* we now have all the information we need */ | 3435 | break; /* we now have all the information we need */ |
3767 | } | 3436 | } |
3768 | } | 3437 | } |
3769 | @@ -4584,9 +2325,6 @@ | 3438 | @@ -4733,9 +2467,6 @@ show_and_select_paths (GtkFileChooserDef |
3770 | if (have_hidden) | 3439 | if (have_hidden) |
3771 | g_object_set (impl, "show-hidden", TRUE, NULL); | 3440 | g_object_set (impl, "show-hidden", TRUE, NULL); |
3772 | 3441 | ||
@@ -3776,7 +3445,7 @@ | |||
3776 | if (only_one_path) | 3445 | if (only_one_path) |
3777 | _gtk_file_system_model_path_do (impl->browse_files_model, only_one_path, select_func, impl); | 3446 | _gtk_file_system_model_path_do (impl->browse_files_model, only_one_path, select_func, impl); |
3778 | else | 3447 | else |
3779 | @@ -4629,13 +2367,11 @@ | 3448 | @@ -4778,13 +2509,11 @@ pending_select_paths_process (GtkFileCho |
3780 | * that case, the chooser's selection should be what the caller expects, | 3449 | * that case, the chooser's selection should be what the caller expects, |
3781 | * as the user can't see that something else got selected. See bug #165264. | 3450 | * as the user can't see that something else got selected. See bug #165264. |
3782 | * | 3451 | * |
@@ -3794,7 +3463,7 @@ | |||
3794 | browse_files_select_first_row (impl); | 3463 | browse_files_select_first_row (impl); |
3795 | } | 3464 | } |
3796 | 3465 | ||
3797 | @@ -4725,19 +2461,15 @@ | 3466 | @@ -4874,19 +2603,15 @@ update_chooser_entry (GtkFileChooserDefa |
3798 | const GtkFileInfo *info; | 3467 | const GtkFileInfo *info; |
3799 | GtkTreeIter iter; | 3468 | GtkTreeIter iter; |
3800 | GtkTreeIter child_iter; | 3469 | GtkTreeIter child_iter; |
@@ -3816,7 +3485,7 @@ | |||
3816 | 3485 | ||
3817 | gtk_tree_model_sort_convert_iter_to_child_iter (impl->sort_model, | 3486 | gtk_tree_model_sort_convert_iter_to_child_iter (impl->sort_model, |
3818 | &child_iter, | 3487 | &child_iter, |
3819 | @@ -4745,12 +2477,7 @@ | 3488 | @@ -4894,12 +2619,7 @@ update_chooser_entry (GtkFileChooserDefa |
3820 | 3489 | ||
3821 | info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter); | 3490 | info = _gtk_file_system_model_get_info (impl->browse_files_model, &child_iter); |
3822 | 3491 | ||
@@ -3830,17 +3499,17 @@ | |||
3830 | _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), | 3499 | _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), |
3831 | gtk_file_info_get_display_name (info)); | 3500 | gtk_file_info_get_display_name (info)); |
3832 | } | 3501 | } |
3833 | @@ -4780,9 +2507,6 @@ | 3502 | @@ -4938,9 +2658,6 @@ gtk_file_chooser_default_update_current_ |
3834 | if (!check_is_folder (impl->file_system, path, error)) | 3503 | if (!check_is_folder (impl->file_system, path, error)) |
3835 | return FALSE; | 3504 | return FALSE; |
3836 | 3505 | ||
3837 | - if (!_gtk_path_bar_set_path (GTK_PATH_BAR (impl->browse_path_bar), path, error)) | 3506 | - if (!_gtk_path_bar_set_path (GTK_PATH_BAR (impl->browse_path_bar), path, keep_trail, error)) |
3838 | - return FALSE; | 3507 | - return FALSE; |
3839 | - | 3508 | - |
3840 | if (impl->current_folder != path) | 3509 | if (impl->current_folder != path) |
3841 | { | 3510 | { |
3842 | if (impl->current_folder) | 3511 | if (impl->current_folder) |
3843 | @@ -4791,17 +2515,6 @@ | 3512 | @@ -4949,17 +2666,6 @@ gtk_file_chooser_default_update_current_ |
3844 | impl->current_folder = gtk_file_path_copy (path); | 3513 | impl->current_folder = gtk_file_path_copy (path); |
3845 | } | 3514 | } |
3846 | 3515 | ||
@@ -3858,7 +3527,7 @@ | |||
3858 | /* Set the folder on the save entry */ | 3527 | /* Set the folder on the save entry */ |
3859 | 3528 | ||
3860 | _gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), | 3529 | _gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), |
3861 | @@ -4815,13 +2528,7 @@ | 3530 | @@ -4973,13 +2679,7 @@ gtk_file_chooser_default_update_current_ |
3862 | 3531 | ||
3863 | /* Refresh controls */ | 3532 | /* Refresh controls */ |
3864 | 3533 | ||
@@ -3872,7 +3541,7 @@ | |||
3872 | g_signal_emit_by_name (impl, "selection-changed", 0); | 3541 | g_signal_emit_by_name (impl, "selection-changed", 0); |
3873 | 3542 | ||
3874 | return result; | 3543 | return result; |
3875 | @@ -4844,7 +2551,6 @@ | 3544 | @@ -5002,7 +2702,6 @@ gtk_file_chooser_default_set_current_nam |
3876 | g_return_if_fail (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE | 3545 | g_return_if_fail (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE |
3877 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER); | 3546 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER); |
3878 | 3547 | ||
@@ -3880,7 +3549,7 @@ | |||
3880 | _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), name); | 3549 | _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), name); |
3881 | } | 3550 | } |
3882 | 3551 | ||
3883 | @@ -4983,24 +2689,13 @@ | 3552 | @@ -5141,24 +2840,13 @@ gtk_file_chooser_default_unselect_all (G |
3884 | GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); | 3553 | GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); |
3885 | 3554 | ||
3886 | gtk_tree_selection_unselect_all (selection); | 3555 | gtk_tree_selection_unselect_all (selection); |
@@ -3909,7 +3578,7 @@ | |||
3909 | { | 3578 | { |
3910 | GtkFileChooserEntry *chooser_entry; | 3579 | GtkFileChooserEntry *chooser_entry; |
3911 | const GtkFilePath *current_folder; | 3580 | const GtkFilePath *current_folder; |
3912 | @@ -5013,31 +2708,17 @@ | 3581 | @@ -5171,31 +2859,17 @@ check_save_entry (GtkFileChooserDefault |
3913 | 3582 | ||
3914 | chooser_entry = GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry); | 3583 | chooser_entry = GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry); |
3915 | 3584 | ||
@@ -3945,7 +3614,7 @@ | |||
3945 | 3614 | ||
3946 | error = NULL; | 3615 | error = NULL; |
3947 | path = gtk_file_system_make_path (impl->file_system, current_folder, file_part, &error); | 3616 | path = gtk_file_system_make_path (impl->file_system, current_folder, file_part, &error); |
3948 | @@ -5045,14 +2726,12 @@ | 3617 | @@ -5203,14 +2877,12 @@ check_save_entry (GtkFileChooserDefault |
3949 | if (!path) | 3618 | if (!path) |
3950 | { | 3619 | { |
3951 | error_building_filename_dialog (impl, current_folder, file_part, error); | 3620 | error_building_filename_dialog (impl, current_folder, file_part, error); |
@@ -3964,15 +3633,15 @@ | |||
3964 | } | 3633 | } |
3965 | 3634 | ||
3966 | struct get_paths_closure { | 3635 | struct get_paths_closure { |
3967 | @@ -5098,21 +2777,11 @@ | 3636 | @@ -5256,21 +2928,11 @@ gtk_file_chooser_default_get_paths (GtkF |
3968 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE | 3637 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE |
3969 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) | 3638 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) |
3970 | { | 3639 | { |
3971 | - gboolean is_well_formed, is_empty, is_file_part_empty; | 3640 | - gboolean is_well_formed, is_empty, is_file_part_empty; |
3641 | - | ||
3642 | - check_save_entry (impl, &info.path_from_entry, &is_well_formed, &is_empty, &is_file_part_empty); | ||
3972 | + gboolean is_valid, is_empty; | 3643 | + gboolean is_valid, is_empty; |
3973 | 3644 | ||
3974 | - check_save_entry (impl, &info.path_from_entry, &is_well_formed, &is_empty, &is_file_part_empty); | ||
3975 | - | ||
3976 | - if (!is_well_formed) | 3645 | - if (!is_well_formed) |
3977 | + info.path_from_entry = check_save_entry (impl, &is_valid, &is_empty); | 3646 | + info.path_from_entry = check_save_entry (impl, &is_valid, &is_empty); |
3978 | + if (!is_valid && !is_empty) | 3647 | + if (!is_valid && !is_empty) |
@@ -3989,7 +3658,7 @@ | |||
3989 | } | 3658 | } |
3990 | 3659 | ||
3991 | if (!info.path_from_entry || impl->select_multiple) | 3660 | if (!info.path_from_entry || impl->select_multiple) |
3992 | @@ -5137,17 +2806,6 @@ | 3661 | @@ -5295,17 +2957,6 @@ gtk_file_chooser_default_get_paths (GtkF |
3993 | return g_slist_reverse (info.result); | 3662 | return g_slist_reverse (info.result); |
3994 | } | 3663 | } |
3995 | 3664 | ||
@@ -4007,7 +3676,7 @@ | |||
4007 | static GtkFileSystem * | 3676 | static GtkFileSystem * |
4008 | gtk_file_chooser_default_get_file_system (GtkFileChooser *chooser) | 3677 | gtk_file_chooser_default_get_file_system (GtkFileChooser *chooser) |
4009 | { | 3678 | { |
4010 | @@ -5162,9 +2820,9 @@ | 3679 | @@ -5320,9 +2971,9 @@ show_filters (GtkFileChooserDefault *imp |
4011 | gboolean show) | 3680 | gboolean show) |
4012 | { | 3681 | { |
4013 | if (show) | 3682 | if (show) |
@@ -4019,7 +3688,7 @@ | |||
4019 | } | 3688 | } |
4020 | 3689 | ||
4021 | static void | 3690 | static void |
4022 | @@ -5174,6 +2832,8 @@ | 3691 | @@ -5332,6 +2983,8 @@ gtk_file_chooser_default_add_filter (Gtk |
4023 | GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); | 3692 | GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); |
4024 | const gchar *name; | 3693 | const gchar *name; |
4025 | 3694 | ||
@@ -4028,37 +3697,10 @@ | |||
4028 | if (g_slist_find (impl->filters, filter)) | 3697 | if (g_slist_find (impl->filters, filter)) |
4029 | { | 3698 | { |
4030 | g_warning ("gtk_file_chooser_add_filter() called on filter already in list\n"); | 3699 | g_warning ("gtk_file_chooser_add_filter() called on filter already in list\n"); |
4031 | @@ -5215,165 +2875,31 @@ | 3700 | @@ -5400,140 +3053,6 @@ gtk_file_chooser_default_list_filters (G |
4032 | 3701 | return g_slist_copy (impl->filters); | |
4033 | impl->filters = g_slist_remove (impl->filters, filter); | 3702 | } |
4034 | 3703 | ||
4035 | - if (filter == impl->current_filter) | ||
4036 | - { | ||
4037 | - if (impl->filters) | ||
4038 | - set_current_filter (impl, impl->filters->data); | ||
4039 | - else | ||
4040 | - set_current_filter (impl, NULL); | ||
4041 | - } | ||
4042 | - | ||
4043 | - /* Remove row from the combo box */ | ||
4044 | - model = gtk_combo_box_get_model (GTK_COMBO_BOX (impl->filter_combo)); | ||
4045 | - gtk_tree_model_iter_nth_child (model, &iter, NULL, filter_index); | ||
4046 | - gtk_list_store_remove (GTK_LIST_STORE (model), &iter); | ||
4047 | - | ||
4048 | - g_object_unref (filter); | ||
4049 | - | ||
4050 | - if (!impl->filters) | ||
4051 | - show_filters (impl, FALSE); | ||
4052 | -} | ||
4053 | - | ||
4054 | -static GSList * | ||
4055 | -gtk_file_chooser_default_list_filters (GtkFileChooser *chooser) | ||
4056 | -{ | ||
4057 | - GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); | ||
4058 | - | ||
4059 | - return g_slist_copy (impl->filters); | ||
4060 | -} | ||
4061 | - | ||
4062 | -/* Returns the position in the shortcuts tree where the nth specified shortcut would appear */ | 3704 | -/* Returns the position in the shortcuts tree where the nth specified shortcut would appear */ |
4063 | -static int | 3705 | -static int |
4064 | -shortcuts_get_pos_for_shortcut_folder (GtkFileChooserDefault *impl, | 3706 | -shortcuts_get_pos_for_shortcut_folder (GtkFileChooserDefault *impl, |
@@ -4134,20 +3776,10 @@ | |||
4134 | - | 3776 | - |
4135 | - if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model), &iter)) | 3777 | - if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model), &iter)) |
4136 | - g_assert_not_reached (); | 3778 | - g_assert_not_reached (); |
4137 | + if (filter == impl->current_filter) | 3779 | - } |
4138 | + { | 3780 | - |
4139 | + if (impl->filters) | ||
4140 | + set_current_filter (impl, impl->filters->data); | ||
4141 | + else | ||
4142 | + set_current_filter (impl, NULL); | ||
4143 | } | ||
4144 | |||
4145 | - out: | 3781 | - out: |
4146 | + /* Remove row from the combo box */ | 3782 | - |
4147 | + model = gtk_combo_box_get_model (GTK_COMBO_BOX (impl->filter_combo)); | ||
4148 | + gtk_tree_model_iter_nth_child (model, &iter, NULL, filter_index); | ||
4149 | + gtk_list_store_remove (GTK_LIST_STORE (model), &iter); | ||
4150 | |||
4151 | - uri = gtk_file_system_path_to_uri (impl->file_system, path); | 3783 | - uri = gtk_file_system_path_to_uri (impl->file_system, path); |
4152 | - g_set_error (error, | 3784 | - g_set_error (error, |
4153 | - GTK_FILE_CHOOSER_ERROR, | 3785 | - GTK_FILE_CHOOSER_ERROR, |
@@ -4155,23 +3787,19 @@ | |||
4155 | - _("Shortcut %s does not exist"), | 3787 | - _("Shortcut %s does not exist"), |
4156 | - uri); | 3788 | - uri); |
4157 | - g_free (uri); | 3789 | - g_free (uri); |
4158 | + g_object_unref (filter); | 3790 | - |
4159 | |||
4160 | - return FALSE; | 3791 | - return FALSE; |
4161 | + if (!impl->filters) | 3792 | -} |
4162 | + show_filters (impl, FALSE); | 3793 | - |
4163 | } | 3794 | -static GSList * |
4164 | |||
4165 | static GSList * | ||
4166 | -gtk_file_chooser_default_list_shortcut_folders (GtkFileChooser *chooser) | 3795 | -gtk_file_chooser_default_list_shortcut_folders (GtkFileChooser *chooser) |
4167 | +gtk_file_chooser_default_list_filters (GtkFileChooser *chooser) | 3796 | -{ |
4168 | { | 3797 | - GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); |
4169 | GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser); | ||
4170 | - int pos; | 3798 | - int pos; |
4171 | - GtkTreeIter iter; | 3799 | - GtkTreeIter iter; |
4172 | - int i; | 3800 | - int i; |
4173 | - GSList *list; | 3801 | - GSList *list; |
4174 | 3802 | - | |
4175 | - if (impl->num_shortcuts == 0) | 3803 | - if (impl->num_shortcuts == 0) |
4176 | - return NULL; | 3804 | - return NULL; |
4177 | - | 3805 | - |
@@ -4205,11 +3833,12 @@ | |||
4205 | - } | 3833 | - } |
4206 | - | 3834 | - |
4207 | - return g_slist_reverse (list); | 3835 | - return g_slist_reverse (list); |
4208 | + return g_slist_copy (impl->filters); | 3836 | -} |
4209 | } | 3837 | - |
4210 | |||
4211 | /* Guesses a size based upon font sizes */ | 3838 | /* Guesses a size based upon font sizes */ |
4212 | @@ -5386,7 +2912,6 @@ | 3839 | static void |
3840 | find_good_size_from_style (GtkWidget *widget, | ||
3841 | @@ -5544,7 +3063,6 @@ find_good_size_from_style (GtkWidget *wi | ||
4213 | gint default_width, default_height; | 3842 | gint default_width, default_height; |
4214 | int font_size; | 3843 | int font_size; |
4215 | GtkRequisition req; | 3844 | GtkRequisition req; |
@@ -4217,7 +3846,7 @@ | |||
4217 | 3846 | ||
4218 | g_assert (widget->style != NULL); | 3847 | g_assert (widget->style != NULL); |
4219 | impl = GTK_FILE_CHOOSER_DEFAULT (widget); | 3848 | impl = GTK_FILE_CHOOSER_DEFAULT (widget); |
4220 | @@ -5400,12 +2925,7 @@ | 3849 | @@ -5558,12 +3076,7 @@ find_good_size_from_style (GtkWidget *wi |
4221 | /* Use at least the requisition size not including the preview widget */ | 3850 | /* Use at least the requisition size not including the preview widget */ |
4222 | gtk_widget_size_request (widget, &req); | 3851 | gtk_widget_size_request (widget, &req); |
4223 | 3852 | ||
@@ -4231,7 +3860,7 @@ | |||
4231 | default_height = MAX (default_height, req.height); | 3860 | default_height = MAX (default_height, req.height); |
4232 | 3861 | ||
4233 | *width = default_width; | 3862 | *width = default_width; |
4234 | @@ -5423,8 +2943,6 @@ | 3863 | @@ -5581,8 +3094,6 @@ gtk_file_chooser_default_get_default_siz |
4235 | 3864 | ||
4236 | find_good_size_from_style (GTK_WIDGET (chooser_embed), default_width, default_height); | 3865 | find_good_size_from_style (GTK_WIDGET (chooser_embed), default_width, default_height); |
4237 | 3866 | ||
@@ -4240,7 +3869,7 @@ | |||
4240 | } | 3869 | } |
4241 | 3870 | ||
4242 | static void | 3871 | static void |
4243 | @@ -5441,16 +2959,6 @@ | 3872 | @@ -5599,16 +3110,6 @@ gtk_file_chooser_default_get_resizable_h |
4244 | 3873 | ||
4245 | *resize_horizontally = TRUE; | 3874 | *resize_horizontally = TRUE; |
4246 | *resize_vertically = TRUE; | 3875 | *resize_vertically = TRUE; |
@@ -4257,7 +3886,7 @@ | |||
4257 | } | 3886 | } |
4258 | 3887 | ||
4259 | struct switch_folder_closure { | 3888 | struct switch_folder_closure { |
4260 | @@ -5517,84 +3025,49 @@ | 3889 | @@ -5675,84 +3176,49 @@ gtk_file_chooser_default_should_respond |
4261 | 3890 | ||
4262 | if (current_focus == impl->browse_files_tree_view) | 3891 | if (current_focus == impl->browse_files_tree_view) |
4263 | { | 3892 | { |
@@ -4366,7 +3995,7 @@ | |||
4366 | 3995 | ||
4367 | save_entry: | 3996 | save_entry: |
4368 | 3997 | ||
4369 | @@ -5602,103 +3075,39 @@ | 3998 | @@ -5760,103 +3226,39 @@ gtk_file_chooser_default_should_respond |
4370 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER); | 3999 | || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER); |
4371 | 4000 | ||
4372 | entry = GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry); | 4001 | entry = GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry); |
@@ -4486,7 +4115,7 @@ | |||
4486 | else if (impl->toplevel_last_focus_widget == impl->browse_files_tree_view) | 4115 | else if (impl->toplevel_last_focus_widget == impl->browse_files_tree_view) |
4487 | { | 4116 | { |
4488 | /* The focus is on a dialog's action area button, *and* the widget that | 4117 | /* The focus is on a dialog's action area button, *and* the widget that |
4489 | @@ -5786,199 +3195,6 @@ | 4118 | @@ -5944,199 +3346,6 @@ filter_combo_changed (GtkComboBox |
4490 | set_current_filter (impl, new_filter); | 4119 | set_current_filter (impl, new_filter); |
4491 | } | 4120 | } |
4492 | 4121 | ||
@@ -4686,7 +4315,7 @@ | |||
4686 | static gboolean | 4315 | static gboolean |
4687 | list_select_func (GtkTreeSelection *selection, | 4316 | list_select_func (GtkTreeSelection *selection, |
4688 | GtkTreeModel *model, | 4317 | GtkTreeModel *model, |
4689 | @@ -6022,7 +3238,7 @@ | 4318 | @@ -6180,7 +3389,7 @@ list_selection_changed (GtkTreeSelection |
4690 | g_assert (!impl->select_multiple); | 4319 | g_assert (!impl->select_multiple); |
4691 | selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); | 4320 | selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); |
4692 | if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) | 4321 | if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) |
@@ -4695,7 +4324,7 @@ | |||
4695 | 4324 | ||
4696 | gtk_tree_model_sort_convert_iter_to_child_iter (impl->sort_model, | 4325 | gtk_tree_model_sort_convert_iter_to_child_iter (impl->sort_model, |
4697 | &child_iter, | 4326 | &child_iter, |
4698 | @@ -6033,11 +3249,7 @@ | 4327 | @@ -6191,11 +3400,7 @@ list_selection_changed (GtkTreeSelection |
4699 | return; /* We are on the editable row for New Folder */ | 4328 | return; /* We are on the editable row for New Folder */ |
4700 | } | 4329 | } |
4701 | 4330 | ||
@@ -4707,7 +4336,7 @@ | |||
4707 | 4336 | ||
4708 | g_signal_emit_by_name (impl, "selection-changed", 0); | 4337 | g_signal_emit_by_name (impl, "selection-changed", 0); |
4709 | } | 4338 | } |
4710 | @@ -6074,23 +3286,6 @@ | 4339 | @@ -6232,23 +3437,6 @@ list_row_activated (GtkTreeView |
4711 | g_signal_emit_by_name (impl, "file-activated"); | 4340 | g_signal_emit_by_name (impl, "file-activated"); |
4712 | } | 4341 | } |
4713 | 4342 | ||
@@ -4731,7 +4360,7 @@ | |||
4731 | static const GtkFileInfo * | 4360 | static const GtkFileInfo * |
4732 | get_list_file_info (GtkFileChooserDefault *impl, | 4361 | get_list_file_info (GtkFileChooserDefault *impl, |
4733 | GtkTreeIter *iter) | 4362 | GtkTreeIter *iter) |
4734 | @@ -6257,33 +3452,31 @@ | 4363 | @@ -6415,33 +3603,31 @@ list_mtime_data_func (GtkTreeViewColumn |
4735 | 4364 | ||
4736 | time_mtime = gtk_file_info_get_modification_time (info); | 4365 | time_mtime = gtk_file_info_get_modification_time (info); |
4737 | 4366 | ||
@@ -4770,13 +4399,13 @@ | |||
4770 | else | 4399 | else |
4771 | - { | 4400 | - { |
4772 | - char *format; | 4401 | - char *format; |
4773 | + format = "%x"; /* Any other date */ | 4402 | - |
4774 | |||
4775 | - if (days_diff > 1 && days_diff < 7) | 4403 | - if (days_diff > 1 && days_diff < 7) |
4776 | - format = "%A"; /* Days from last week */ | 4404 | - format = "%A"; /* Days from last week */ |
4777 | - else | 4405 | - else |
4778 | - format = "%x"; /* Any other date */ | 4406 | - format = "%x"; /* Any other date */ |
4779 | - | 4407 | + format = "%x"; /* Any other date */ |
4408 | |||
4780 | - if (g_date_strftime (buf, sizeof (buf), format, &mtime) == 0) | 4409 | - if (g_date_strftime (buf, sizeof (buf), format, &mtime) == 0) |
4781 | - strcpy (buf, _("Unknown")); | 4410 | - strcpy (buf, _("Unknown")); |
4782 | - } | 4411 | - } |
@@ -4785,7 +4414,7 @@ | |||
4785 | } | 4414 | } |
4786 | 4415 | ||
4787 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER || | 4416 | if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER || |
4788 | @@ -6376,8 +3569,11 @@ | 4417 | @@ -6534,8 +3720,11 @@ update_from_entry (GtkFileChooserDefault |
4789 | */ | 4418 | */ |
4790 | 4419 | ||
4791 | error = NULL; | 4420 | error = NULL; |
@@ -4798,7 +4427,7 @@ | |||
4798 | if (!folder) | 4427 | if (!folder) |
4799 | { | 4428 | { |
4800 | error_getting_info_dialog (impl, folder_path, error); | 4429 | error_getting_info_dialog (impl, folder_path, error); |
4801 | @@ -6487,8 +3683,8 @@ | 4430 | @@ -6645,8 +3834,8 @@ location_popup_handler (GtkFileChooserDe |
4802 | accept_stock, GTK_RESPONSE_ACCEPT, | 4431 | accept_stock, GTK_RESPONSE_ACCEPT, |
4803 | NULL); | 4432 | NULL); |
4804 | gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1); | 4433 | gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1); |
@@ -4809,7 +4438,7 @@ | |||
4809 | gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); | 4438 | gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); |
4810 | 4439 | ||
4811 | gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), | 4440 | gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), |
4812 | @@ -6496,17 +3692,16 @@ | 4441 | @@ -6654,17 +3843,16 @@ location_popup_handler (GtkFileChooserDe |
4813 | GTK_RESPONSE_CANCEL, | 4442 | GTK_RESPONSE_CANCEL, |
4814 | -1); | 4443 | -1); |
4815 | 4444 | ||
@@ -4829,7 +4458,7 @@ | |||
4829 | 4458 | ||
4830 | /* Run */ | 4459 | /* Run */ |
4831 | 4460 | ||
4832 | @@ -6555,115 +3750,68 @@ | 4461 | @@ -6713,115 +3901,68 @@ location_popup_handler (GtkFileChooserDe |
4833 | static void | 4462 | static void |
4834 | up_folder_handler (GtkFileChooserDefault *impl) | 4463 | up_folder_handler (GtkFileChooserDefault *impl) |
4835 | { | 4464 | { |
@@ -4958,7 +4587,7 @@ | |||
4958 | + return NULL; | 4587 | + return NULL; |
4959 | } | 4588 | } |
4960 | -#endif | 4589 | -#endif |
4961 | 4590 | - | |
4962 | -static GtkTreeModel * | 4591 | -static GtkTreeModel * |
4963 | -shortcuts_model_filter_new (GtkFileChooserDefault *impl, | 4592 | -shortcuts_model_filter_new (GtkFileChooserDefault *impl, |
4964 | - GtkTreeModel *child_model, | 4593 | - GtkTreeModel *child_model, |
@@ -4970,7 +4599,7 @@ | |||
4970 | - "child_model", child_model, | 4599 | - "child_model", child_model, |
4971 | - "virtual_root", root, | 4600 | - "virtual_root", root, |
4972 | - NULL); | 4601 | - NULL); |
4973 | - | 4602 | |
4974 | - model->impl = impl; | 4603 | - model->impl = impl; |
4975 | - | 4604 | - |
4976 | - return GTK_TREE_MODEL (model); | 4605 | - return GTK_TREE_MODEL (model); |
diff --git a/meta/packages/gtk+/gtk+_2.6.10.bb b/meta/packages/gtk+/gtk+_2.6.10.bb index bc47fa268c..3e2648a08e 100644 --- a/meta/packages/gtk+/gtk+_2.6.10.bb +++ b/meta/packages/gtk+/gtk+_2.6.10.bb | |||
@@ -43,7 +43,7 @@ FILES_${PN}-dbg += " \ | |||
43 | ${libdir}/gtk-2.0/${LIBV}/engines/.debug/*" | 43 | ${libdir}/gtk-2.0/${LIBV}/engines/.debug/*" |
44 | 44 | ||
45 | 45 | ||
46 | RRECOMMENDS_${PN} = "glibc-gconv-iso8859-1 ttf-dejavu-sans" | 46 | RRECOMMENDS_linux_${PN} = "glibc-gconv-iso8859-1" |
47 | 47 | ||
48 | EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" | 48 | EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" |
49 | # --disable-cruft | 49 | # --disable-cruft |
@@ -55,7 +55,7 @@ LEAD_SONAME = "libgtk-x11*" | |||
55 | do_configure_prepend() { | 55 | do_configure_prepend() { |
56 | for i in `find . -name "Makefile.am"` | 56 | for i in `find . -name "Makefile.am"` |
57 | do | 57 | do |
58 | sed -e -i s,-DG_DISABLE_DEPRECATED,-DSED_ROCKS_DUDES, $i | 58 | sed -i -e s,-DG_DISABLE_DEPRECATED,-DSED_ROCKS_DUDES, $i |
59 | done | 59 | done |
60 | } | 60 | } |
61 | 61 | ||
diff --git a/meta/packages/gtk+/gtk+_2.6.8.bb b/meta/packages/gtk+/gtk+_2.6.8.bb index 194a275900..76d35e3782 100644 --- a/meta/packages/gtk+/gtk+_2.6.8.bb +++ b/meta/packages/gtk+/gtk+_2.6.8.bb | |||
@@ -43,7 +43,7 @@ FILES_${PN}-dbg += " \ | |||
43 | ${libdir}/gtk-2.0/${LIBV}/immodules/.debug/* \ | 43 | ${libdir}/gtk-2.0/${LIBV}/immodules/.debug/* \ |
44 | ${libdir}/gtk-2.0/${LIBV}/engines/.debug/*" | 44 | ${libdir}/gtk-2.0/${LIBV}/engines/.debug/*" |
45 | 45 | ||
46 | RRECOMMENDS_${PN} = "glibc-gconv-iso8859-1" | 46 | RRECOMMENDS_linux_${PN} = "glibc-gconv-iso8859-1" |
47 | 47 | ||
48 | EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" | 48 | EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" |
49 | # --disable-cruft | 49 | # --disable-cruft |