~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to src/View/ViewContainer.vala

  • Committer: Jeremy Wootten
  • Date: 2017-01-13 13:36:33 UTC
  • mfrom: (2444 pantheon-files)
  • mto: This revision was merged to the branch mainline in revision 2471.
  • Revision ID: jeremy@elementaryos.org-20170113133633-ajg6izr1e6irmj0g
Merge r2444

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        /* Initial location now set by Window.make_tab after connecting signals */
95
95
        public ViewContainer (Marlin.View.Window win) {
96
96
            window = win;
97
 
            overlay_statusbar = new OverlayBar (win, this);
 
97
            overlay_statusbar = new OverlayBar (this);
98
98
            browser = new Browser ();
99
99
 
100
100
            /* Override background color to support transparency on overlay widgets */
126
126
        
127
127
        private void on_folder_deleted (GLib.File deleted) {
128
128
            if (deleted.equal (this.location)) {
129
 
                close ();
130
 
                window.remove_tab (this);
 
129
                if (!go_up ()) {
 
130
                    close ();
 
131
                    window.remove_tab (this);
 
132
                }
131
133
            }
132
134
        }
133
135
 
163
165
            }
164
166
        }
165
167
 
166
 
        public void go_up () {
 
168
        public bool go_up () {
167
169
            selected_locations.append (this.location);
168
170
            GLib.File parent = location;
169
171
            if (view.directory.has_parent ()) { /* May not work for some protocols */
176
178
            /* Certain parents such as ftp:// will be returned as null as they are not browsable */
177
179
            if (parent != null) {
178
180
                user_path_change_request (parent, false, false);
 
181
                return true;
 
182
            } else {
 
183
                return false;
179
184
            }
180
185
        }
181
186
 
429
434
            if (aslot != null) {
430
435
                /* Since async loading it may not have been determined whether slot is loadable */
431
436
                aslot.set_active_state (is_active, animate);
432
 
                active ();
 
437
                if (is_active) {
 
438
                    active ();
 
439
                }
433
440
            }
434
441
        }
435
442