vicon placement tweak, bclistbox select fixes, new ctrl-a/s shortcuts
authorGood Guy <good1.2guy@gmail.com>
Fri, 7 Dec 2018 15:42:21 +0000 (08:42 -0700)
committerGood Guy <good1.2guy@gmail.com>
Fri, 7 Dec 2018 15:42:21 +0000 (08:42 -0700)
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/mainmenu.C
cinelerra-5.1/guicast/bclistbox.C
cinelerra-5.1/guicast/vicon.C

index 5756453c95909b92be6acaba48078e253e95d626..072f878e80fd933c8bb4dcb88503763c13f691a0 100644 (file)
@@ -573,8 +573,8 @@ ViewPopup *AssetVIconThread::new_view_window()
        int vx = viewing->get_vx(), rx = 0;
        int vy = viewing->get_vy(), ry = 0;
        wdw->get_root_coordinates(vx, vy, &rx, &ry);
-       rx += (rx >= cx ? -view_w : viewing->w);
-       ry += (ry >= cy ? -view_h : viewing->h);
+       rx += (rx >= cx ? -view_w+viewing->w/4 : viewing->w-viewing->w/4);
+       ry += (ry >= cy ? -view_h+viewing->h/4 : viewing->h-viewing->h/4);
        AssetViewPopup *popup = new AssetViewPopup(this, draw_mode,
                rx, ry, view_w, view_h);
        if( draw_mode == ASSET_VIEW_MEDIA_MAP )
index 6023c5e56f2998489bac98b12a109118b2ac65b0..11edba8fc44f8795f682bc275a23dc7289a5b88c 100644 (file)
@@ -217,10 +217,10 @@ void MainMenu::create_objects()
        settingsmenu->add_item(proxy = new ProxyMenuItem(mwindow));
        proxy->create_objects();
        mwindow->preferences_thread = preferences->thread;
+       settingsmenu->add_item(cursor_on_frames = new CursorOnFrames(mwindow));
        settingsmenu->add_item(labels_follow_edits = new LabelsFollowEdits(mwindow));
        settingsmenu->add_item(plugins_follow_edits = new PluginsFollowEdits(mwindow));
        settingsmenu->add_item(keyframes_follow_edits = new KeyframesFollowEdits(mwindow));
-       settingsmenu->add_item(cursor_on_frames = new CursorOnFrames(mwindow));
        settingsmenu->add_item(typeless_keyframes = new TypelessKeyframes(mwindow));
        settingsmenu->add_item(new BC_MenuItem("-"));
        settingsmenu->add_item(new SaveSettingsNow(mwindow));
@@ -249,11 +249,11 @@ void MainMenu::create_objects()
        viewmenu->add_item(mask_automation = new ShowAutomation(mwindow, _("Mask"), "8", AUTOMATION_MASK));
        viewmenu->add_item(speed_automation = new ShowAutomation(mwindow, _("Speed"), "9", AUTOMATION_SPEED));
 
-       camera_x = new ShowAutomation(mwindow, _("Camera X"), "Ctl-Shift-X", AUTOMATION_CAMERA_X);
+       camera_x = new ShowAutomation(mwindow, _("Camera X"), "Ctrl-Shift-X", AUTOMATION_CAMERA_X);
        camera_x->set_ctrl();  camera_x->set_shift();   viewmenu->add_item(camera_x);
-       camera_y = new ShowAutomation(mwindow, _("Camera Y"), "Ctl-Shift-Y", AUTOMATION_CAMERA_Y);
+       camera_y = new ShowAutomation(mwindow, _("Camera Y"), "Ctrl-Shift-Y", AUTOMATION_CAMERA_Y);
        camera_y->set_ctrl();  camera_y->set_shift();   viewmenu->add_item(camera_y);
-       camera_z = new ShowAutomation(mwindow, _("Camera Z"), "Ctl-Shift-Z", AUTOMATION_CAMERA_Z);
+       camera_z = new ShowAutomation(mwindow, _("Camera Z"), "Ctrl-Shift-Z", AUTOMATION_CAMERA_Z);
        camera_z->set_ctrl();  camera_z->set_shift();  viewmenu->add_item(camera_z);
        project_x = new ShowAutomation(mwindow, _("Projector X"), "Alt-Shift-X", AUTOMATION_PROJECTOR_X);
        project_x->set_alt();  project_x->set_shift();  viewmenu->add_item(project_x);
@@ -1360,10 +1360,11 @@ int KeyframesFollowEdits::handle_event()
 
 
 CursorOnFrames::CursorOnFrames(MWindow *mwindow)
- : BC_MenuItem(_("Align cursor on frames"))
+ : BC_MenuItem(_("Align cursor on frames"),_("Ctrl-a"),'a')
 {
        this->mwindow = mwindow;
        set_checked(mwindow->edl->session->cursor_on_frames);
+       set_ctrl(1);
 }
 
 int CursorOnFrames::handle_event()
@@ -1389,7 +1390,8 @@ int TypelessKeyframes::handle_event()
 }
 
 
-ScrubSpeed::ScrubSpeed(MWindow *mwindow) : BC_MenuItem(_("Slow Shuttle"))
+ScrubSpeed::ScrubSpeed(MWindow *mwindow)
+ : BC_MenuItem(_("Slow Shuttle"))
 {
        this->mwindow = mwindow;
 }
@@ -1409,9 +1411,11 @@ int ScrubSpeed::handle_event()
        return 1;
 }
 
-SaveSettingsNow::SaveSettingsNow(MWindow *mwindow) : BC_MenuItem(_("Save settings now"))
+SaveSettingsNow::SaveSettingsNow(MWindow *mwindow)
+ : BC_MenuItem(_("Save settings now"),_("Ctrl-s"),'s')
 {
        this->mwindow = mwindow;
+       set_ctrl(1);
 }
 
 int SaveSettingsNow::handle_event()
@@ -1583,7 +1587,7 @@ LoadLayoutItem::LoadLayoutItem(LoadLayout *load_layout, const char *text, int no
        this->load_layout = load_layout;
        if( hotkey ) {
                char hot_txt[BCSTRLEN];
-               sprintf(hot_txt, _("CtlSft+F%d"), hotkey-KEY_F1+1);
+               sprintf(hot_txt, _("Ctrl-Shift+F%d"), hotkey-KEY_F1+1);
                set_ctrl();  set_shift();
                set_hotkey_text(hot_txt);
        }
index e99d7316f3d0a126e1f817c58976e00ee7cf8016..ef29b0b6eac0dc8848673528f1333ec4d590a1fc 100644 (file)
@@ -1223,7 +1223,7 @@ int BC_ListBox::get_text_mask(BC_ListBoxItem *item,
                h = get_text_h(item) + ICON_MARGIN * 2;
                break; }
        case LISTBOX_ICON_LIST: {
-               w = get_text_width(MEDIUMFONT, item->text) + LISTBOX_MARGIN * 2;
+               w = column_width ? column_width[0] : default_column_width[0];
                h = row_height;
                break; }
        default:
@@ -2615,7 +2615,7 @@ int BC_ListBox::button_press_event()
 
 // Multiple item selection is possible
                        if( selection_mode == LISTBOX_MULTIPLE &&
-                           (ctrl_down() || shift_down()) ) {
+                           (ctrl_down() || shift_down() || current_item->selected) ) {
 // Expand text selection.
 // Fill items between selected region and current item.
                                if( shift_down() &&
@@ -2639,7 +2639,7 @@ int BC_ListBox::button_press_event()
                                        new_value = 1;
                                }
 // Toggle a single item on or off
-                               else {
+                               else if( ctrl_down() ) {
                                        toggle_item_selection(data, selection_number);
                                        new_value = current_item->selected;
                                }
index 89b8eb244eab558c659d1c2f3bf0b27a51caf607..dbee56da45adb7e043f27a97d70b9682d04e93be 100644 (file)
@@ -213,8 +213,8 @@ ViewPopup *VIconThread::new_view_window()
        int vx = viewing->get_vx(), rx = 0;
        int vy = viewing->get_vy(), ry = 0;
        wdw->get_root_coordinates(vx, vy, &rx, &ry);
-       rx += (rx >= cx ? -view_w : viewing->w);
-       ry += (ry >= cy ? -view_h : viewing->h);
+       rx += (rx >= cx ? -view_w+viewing->w/4 : viewing->w-viewing->w/4);
+       ry += (ry >= cy ? -view_h+viewing->h/4 : viewing->h-viewing->h/4);
        ViewPopup *vwin = new ViewPopup(this, rx, ry, view_w, view_h);
        wdw->set_active_subwindow(vwin);
        return vwin;