From: Good Guy Date: Fri, 7 Dec 2018 15:42:21 +0000 (-0700) Subject: vicon placement tweak, bclistbox select fixes, new ctrl-a/s shortcuts X-Git-Tag: 2019-08~162 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=c3edaf190bc7ba23acdddded9635aad2d0fe9124;p=goodguy%2Fcinelerra.git vicon placement tweak, bclistbox select fixes, new ctrl-a/s shortcuts --- diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 5756453c..072f878e 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -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 ) diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index 6023c5e5..11edba8f 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -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); } diff --git a/cinelerra-5.1/guicast/bclistbox.C b/cinelerra-5.1/guicast/bclistbox.C index e99d7316..ef29b0b6 100644 --- a/cinelerra-5.1/guicast/bclistbox.C +++ b/cinelerra-5.1/guicast/bclistbox.C @@ -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; } diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index 89b8eb24..dbee56da 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -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;