~ubuntu-branches/ubuntu/trusty/nautilus/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/interactive_search.patch/src/nautilus-window-slot.c

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-01-02 16:50:06 UTC
  • mfrom: (1.17.43)
  • Revision ID: package-import@ubuntu.com-20140102165006-1ghk9ropzitdc8pp
Tags: 1:3.10.1-0ubuntu1
* New upstream release
* debian/control.in: bump depend on gtk+ 3.9.11
* debian/patches:
  - Dropped git patches, that are included in new version
  - 06_never_exec_nonexec_launchers.patch, refreshed
  - disconnect-extra-location-widgets.patch, dropped included in new version
  - 16_unity_new_documents.patch, refreshed
  - ubuntu_show_titlebar.patch, disable CSD titlebar on non-GNOME sessions
  - ubuntu_titlebar_css.patch, theme fixes (LP: #1272602)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include "nautilus-special-location-bar.h"
36
36
#include "nautilus-toolbar.h"
37
37
#include "nautilus-trash-bar.h"
38
 
#include "nautilus-view-factory.h"
39
38
#include "nautilus-window-private.h"
40
39
#include "nautilus-x-content-bar.h"
41
40
 
98
97
 
99
98
        /* Query editor */
100
99
        NautilusQueryEditor *query_editor;
 
100
        GtkWidget *query_editor_revealer;
101
101
        gulong qe_changed_id;
102
102
        gulong qe_cancel_id;
103
103
        gulong qe_activated_id;
300
300
static void
301
301
hide_query_editor (NautilusWindowSlot *slot)
302
302
{
303
 
        gtk_widget_hide (GTK_WIDGET (slot->details->query_editor));
 
303
        gtk_revealer_set_reveal_child (GTK_REVEALER (slot->details->query_editor_revealer),
 
304
                                       FALSE);
304
305
 
305
306
        if (slot->details->qe_changed_id > 0) {
306
307
                g_signal_handler_disconnect (slot->details->query_editor, slot->details->qe_changed_id);
348
349
 
349
350
        nautilus_directory_unref (directory);
350
351
 
351
 
        gtk_widget_show (GTK_WIDGET (slot->details->query_editor));
 
352
        gtk_revealer_set_reveal_child (GTK_REVEALER (slot->details->query_editor_revealer),
 
353
                                       TRUE);
352
354
        gtk_widget_grab_focus (GTK_WIDGET (slot->details->query_editor));
353
355
 
354
356
        if (slot->details->qe_changed_id == 0) {
506
508
        NautilusDirectory *directory;
507
509
 
508
510
        directory = nautilus_directory_get (slot->details->location);
509
 
        if (widget != GTK_WIDGET (slot->details->query_editor)) {
 
511
        if (widget != GTK_WIDGET (slot->details->query_editor_revealer)) {
510
512
                gtk_container_remove (GTK_CONTAINER (slot->details->extra_location_widgets), widget);
511
513
        }
512
514
 
526
528
                                                GtkWidget *widget)
527
529
{
528
530
        gtk_box_pack_start (GTK_BOX (slot->details->extra_location_widgets),
529
 
                            widget, TRUE, TRUE, 0);
 
531
                            widget, FALSE, TRUE, 0);
530
532
        gtk_widget_show (slot->details->extra_location_widgets);
531
533
}
532
534
 
584
586
        gtk_widget_show (extras_vbox);
585
587
 
586
588
        slot->details->query_editor = NAUTILUS_QUERY_EDITOR (nautilus_query_editor_new ());
587
 
        nautilus_window_slot_add_extra_location_widget (slot, GTK_WIDGET (slot->details->query_editor));
588
 
        g_object_add_weak_pointer (G_OBJECT (slot->details->query_editor),
589
 
                                   (gpointer *) &slot->details->query_editor);
 
589
        slot->details->query_editor_revealer = gtk_revealer_new ();
 
590
        gtk_container_add (GTK_CONTAINER (slot->details->query_editor_revealer),
 
591
                           GTK_WIDGET (slot->details->query_editor));
 
592
        gtk_widget_show_all (slot->details->query_editor_revealer);
 
593
        nautilus_window_slot_add_extra_location_widget (slot, slot->details->query_editor_revealer);
590
594
 
591
595
        slot->details->view_overlay = gtk_overlay_new ();
592
596
        gtk_widget_add_events (slot->details->view_overlay,
1258
1262
 
1259
1263
                if (view_id == NULL) {
1260
1264
                        view_id = nautilus_global_preferences_get_default_folder_viewer_preference_as_iid ();
1261
 
 
1262
 
                        if (view_id != NULL &&
1263
 
                            !nautilus_view_factory_view_supports_uri (view_id,
1264
 
                                                                      location,
1265
 
                                                                      nautilus_file_get_file_type (file),
1266
 
                                                                      mimetype)) {
1267
 
                                g_free (view_id);
1268
 
                                view_id = NULL;
1269
 
                        }
1270
1265
                }
1271
1266
 
1272
1267
                g_free (mimetype);
1391
1386
                view_id = NAUTILUS_DESKTOP_ICON_VIEW_IID;
1392
1387
        }
1393
1388
 
1394
 
        if (slot->details->content_view != NULL &&
1395
 
            g_strcmp0 (nautilus_view_get_view_id (slot->details->content_view),
1396
 
                        view_id) == 0) {
 
1389
        if (nautilus_window_slot_content_view_matches_iid (slot, view_id)) {
1397
1390
                /* reuse existing content view */
1398
1391
                view = slot->details->content_view;
1399
1392
                slot->details->new_content_view = view;
1400
1393
                g_object_ref (view);
1401
1394
        } else {
1402
1395
                /* create a new content view */
1403
 
                view = nautilus_view_factory_create (view_id, slot);
 
1396
                view = nautilus_view_new (view_id, slot);
1404
1397
 
1405
1398
                slot->details->new_content_view = view;
1406
1399
                nautilus_window_slot_connect_new_content_view (slot);
2260
2253
        nautilus_floating_bar_set_show_spinner (NAUTILUS_FLOATING_BAR (slot->details->floating_bar),
2261
2254
                                                TRUE);
2262
2255
        nautilus_floating_bar_add_action (NAUTILUS_FLOATING_BAR (slot->details->floating_bar),
2263
 
                                          GTK_STOCK_STOP,
 
2256
                                          "gtk-stop",
2264
2257
                                          NAUTILUS_FLOATING_BAR_ACTION_ID_STOP);
2265
2258
 
2266
2259
        gtk_widget_set_halign (slot->details->floating_bar, GTK_ALIGN_END);