~am-monkeyd/marlin/marlin-gtk2-test

« back to all changes in this revision

Viewing changes to src/View/Window.vala

  • Committer: am.monkeyd at gmail
  • Date: 2011-03-23 18:03:03 UTC
  • Revision ID: am.monkeyd@gmail.com-20110323180303-qs0pbzv1s7484m0l
slot active/inactive signals triggering merge/unmerge menus

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
        protected virtual void action_radio_change_view(){
73
73
            Gtk.RadioAction action = (Gtk.RadioAction) main_actions.get_action("view-as-detailed-list");
74
74
            assert(action != null);
75
 
            ((FM.Directory.View) current_tab.slot.view_box).unmerge_menus();
76
75
            int n = action.get_current_value();
77
76
            /* change the view only for view_mode real change */
78
77
            if (n != current_tab.view_mode)
242
241
        }
243
242
 
244
243
        public void change_tab(uint offset){
245
 
            ViewContainer previous_tab = current_tab;
 
244
            ViewContainer old_tab = current_tab;
246
245
            current_tab = (ViewContainer) tabs.get_children().nth_data(offset);
 
246
            if (old_tab == current_tab) {
 
247
                return;
 
248
            }
 
249
            if (old_tab != null) {
 
250
                old_tab.slot.inactive();
 
251
            } 
 
252
 
247
253
            if (current_tab != null && current_tab.slot != null) {
248
 
                if (previous_tab != null && previous_tab != current_tab)
249
 
                    ((FM.Directory.View) previous_tab.slot.view_box).unmerge_menus();
250
 
                    //((FM.Directory.View) current_tab.slot.view_box).unmerge_menus();
251
 
                ((FM.Directory.View) current_tab.slot.view_box).merge_menus();
252
 
 
 
254
                current_tab.slot.active();
253
255
                current_tab.update_location_state(false);
254
256
                /* update radio action view state */
255
257
                update_action_radio_view(current_tab.view_mode);