@@ -658,7 +658,7 @@ action_split_view_callback (GtkAction *action,
658658 }
659659 }
660660
661- nemo_window_update_split_view_actions_sensitivity (window );
661+ nemo_window_update_show_hide_ui_elements (window );
662662}
663663
664664static void
@@ -778,20 +778,36 @@ update_side_bar_radio_buttons (NemoWindow *window)
778778}
779779
780780void
781- nemo_window_update_show_hide_menu_items (NemoWindow * window )
781+ nemo_window_update_show_hide_ui_elements (NemoWindow * window )
782782{
783+ NemoWindowPane * pane ;
783784 GtkActionGroup * action_group ;
784785 GtkAction * action ;
785786
786787 action_group = nemo_window_get_main_action_group (window );
787788
788789 action = gtk_action_group_get_action (action_group ,
789790 NEMO_ACTION_SHOW_HIDE_EXTRA_PANE );
791+ gtk_action_block_activate (action );
790792 gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action ),
791793 nemo_window_split_view_showing (window ));
794+ gtk_action_unblock_activate (action );
795+
792796 nemo_window_update_split_view_actions_sensitivity (window );
793797
794798 update_side_bar_radio_buttons (window );
799+
800+ pane = nemo_window_get_active_pane (window );
801+ if (pane != NULL ) {
802+ action_group = nemo_window_pane_get_toolbar_action_group (pane );
803+
804+ action = gtk_action_group_get_action (action_group ,
805+ NEMO_ACTION_SHOW_HIDE_EXTRA_PANE );
806+ gtk_action_block_activate (action );
807+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action ),
808+ nemo_window_split_view_showing (window ));
809+ gtk_action_unblock_activate (action );
810+ }
795811}
796812
797813static void
@@ -1788,6 +1804,19 @@ nemo_window_create_toolbar_action_group (NemoWindow *window)
17881804
17891805 g_object_unref (action );
17901806
1807+ action = GTK_ACTION (gtk_toggle_action_new (NEMO_ACTION_SHOW_HIDE_EXTRA_PANE ,
1808+ NULL ,
1809+ _ ("Open an extra folder view side-by-side" ),
1810+ NULL ));
1811+ g_signal_connect (action , "activate" ,
1812+ G_CALLBACK (action_split_view_callback ),
1813+ window );
1814+
1815+ gtk_action_group_add_action (action_group , action );
1816+ gtk_action_set_icon_name (GTK_ACTION (action ), "view-dual-symbolic" );
1817+
1818+ g_object_unref (action );
1819+
17911820 navigation_state = nemo_window_get_navigation_state (window );
17921821 nemo_navigation_state_add_group (navigation_state , action_group );
17931822
@@ -1853,7 +1882,7 @@ nemo_window_initialize_actions (NemoWindow *window)
18531882 nav_state_actions );
18541883
18551884 window_menus_set_bindings (window );
1856- nemo_window_update_show_hide_menu_items (window );
1885+ nemo_window_update_show_hide_ui_elements (window );
18571886
18581887 g_signal_connect (window , "loading_uri" ,
18591888 G_CALLBACK (nemo_window_update_split_view_actions_sensitivity ),
0 commit comments