revert font sizing on audio/midi setup dialog
[ardour.git] / gtk2_ardour / editor_actions.cc
index 8c81a6122e83df2c2d6d3d0d1ac5e384d34abab3..a5e2e8a369b19fa98f19d50cbdcb448afb850e08 100644 (file)
@@ -543,7 +543,6 @@ Editor::register_actions ()
        ruler_samples_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-samples-ruler"), _("Samples"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_samples)));
        ruler_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-timecode-ruler"), _("Timecode"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_timecode)));
        ruler_minsec_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-minsec-ruler"), _("Min:Sec"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_minsec)));
-#ifdef WITH_VIDEOTIMELINE
 
        ActionManager::register_action (editor_menu_actions, X_("VideoMonitorMenu"), _("Video Monitor"));
 
@@ -552,11 +551,11 @@ Editor::register_actions ()
 
        xjadeo_ontop_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-ontop"), _("Always on Top"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 1)));
        xjadeo_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-timecode"), _("Timecode"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 2)));
-       xjadeo_frame_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-frame"), _("Framenumber"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 3)));
+       xjadeo_frame_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-frame"), _("Frame number"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 3)));
        xjadeo_osdbg_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-osdbg"), _("Timecode Background"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 4)));
        xjadeo_fullscreen_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-fullscreen"), _("Fullscreen"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 5)));
-
-#endif
+       xjadeo_letterbox_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (editor_actions, X_("toggle-vmon-letterbox"), _("Letterbox"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 6)));
+       xjadeo_zoom_100 = reg_sens (editor_actions, "zoom-vmon-100", _("Original Size"), sigc::bind (sigc::mem_fun (*this, &Editor::set_xjadeo_viewoption), (int) 7));
 
        /* set defaults here */
 
@@ -567,7 +566,7 @@ Editor::register_actions ()
        ruler_range_action->set_active (true);
        ruler_loop_punch_action->set_active (true);
        ruler_loop_punch_action->set_active (true);
-#ifdef WITH_VIDEOTIMELINE
+
        ruler_video_action->set_active (false);
        xjadeo_proc_action->set_active (false);
        xjadeo_proc_action->set_sensitive (false);
@@ -581,7 +580,10 @@ Editor::register_actions ()
        xjadeo_osdbg_action->set_sensitive (false);
        xjadeo_fullscreen_action->set_active (false);
        xjadeo_fullscreen_action->set_sensitive (false);
-#endif
+       xjadeo_letterbox_action->set_active (false);
+       xjadeo_letterbox_action->set_sensitive (false);
+       xjadeo_zoom_100->set_sensitive (false);
+
        if (Profile->get_sae()) {
                ruler_bbt_action->set_active (true);
                ruler_cd_marker_action->set_active (false);
@@ -737,11 +739,9 @@ Editor::toggle_ruler_visibility (RulerType rt)
        case ruler_time_cd_marker:
                action = "toggle-cd-marker-ruler";
                break;
-#ifdef WITH_VIDEOTIMELINE
        case ruler_video_timeline:
                action = "toggle-video-ruler";
                break;
-#endif
        }
 
        Glib::RefPtr<Action> act = ActionManager::get_action (X_("Rulers"), action);
@@ -773,7 +773,15 @@ Editor::set_group_tabs ()
        }
 }
 
-#ifdef WITH_VIDEOTIMELINE
+void
+Editor::set_close_video_sensitive (bool onoff)
+{
+       Glib::RefPtr<Action> act = ActionManager::get_action (X_("Main"), X_("CloseVideo"));
+       if (act) {
+               act->set_sensitive (onoff);
+       }
+}
+
 void
 Editor::set_xjadeo_sensitive (bool onoff)
 {
@@ -800,6 +808,8 @@ Editor::toggle_xjadeo_proc (int state)
        xjadeo_frame_action->set_sensitive(onoff);
        xjadeo_osdbg_action->set_sensitive(onoff);
        xjadeo_fullscreen_action->set_sensitive(onoff);
+       xjadeo_letterbox_action->set_sensitive(onoff);
+       xjadeo_zoom_100->set_sensitive(onoff);
 }
 
 void
@@ -832,6 +842,11 @@ Editor::toggle_xjadeo_viewoption (int what, int state)
                case 5:
                        action = xjadeo_fullscreen_action;
                        break;
+               case 6:
+                       action = xjadeo_letterbox_action;
+                       break;
+               case 7:
+                       return;
                default:
                        return;
        }
@@ -869,6 +884,12 @@ Editor::set_xjadeo_viewoption (int what)
                case 5:
                        action = xjadeo_fullscreen_action;
                        break;
+               case 6:
+                       action = xjadeo_letterbox_action;
+                       break;
+               case 7:
+                       ARDOUR_UI::instance()->video_timeline->control_video_monitor(what, 0);
+                       return;
                default:
                        return;
        }
@@ -878,7 +899,6 @@ Editor::set_xjadeo_viewoption (int what)
                ARDOUR_UI::instance()->video_timeline->control_video_monitor(what, 0);
        }
 }
-#endif
 
 void
 Editor::toggle_measure_visibility ()
@@ -1716,9 +1736,7 @@ Editor::register_region_actions ()
        /* Toggle `locked' status of selected regions */
        toggle_reg_sens (_region_actions, "toggle-region-lock", _("Lock"), sigc::mem_fun(*this, &Editor::toggle_region_lock));
 
-#ifdef WITH_VIDEOTIMELINE
        toggle_reg_sens (_region_actions, "toggle-region-video-lock", _("Lock to Video"), sigc::mem_fun(*this, &Editor::toggle_region_video_lock));
-#endif
 
        toggle_reg_sens (
                _region_actions,