From 07217a92dbd5263eeb531053a3c62622f9bf925c Mon Sep 17 00:00:00 2001 From: Good Guy Date: Tue, 27 Nov 2018 09:31:18 -0700 Subject: [PATCH] add select all/none, layout shortcuts from all guis, docs tweaks + cv->gg --- cinelerra-5.1/cinelerra/assetpopup.C | 2 + cinelerra-5.1/cinelerra/awindowgui.C | 39 ++++++++++----- cinelerra-5.1/cinelerra/awindowgui.h | 6 ++- cinelerra-5.1/cinelerra/cwindowgui.C | 11 +++++ cinelerra-5.1/cinelerra/gwindowgui.C | 28 ++++++++--- cinelerra-5.1/cinelerra/levelwindowgui.C | 15 ++++-- cinelerra-5.1/cinelerra/mainmenu.C | 12 ++--- cinelerra-5.1/cinelerra/mwindow.C | 21 ++++++++ cinelerra-5.1/cinelerra/mwindow.h | 2 + cinelerra-5.1/cinelerra/preferences.C | 2 +- cinelerra-5.1/cinelerra/versioninfo.h | 2 +- cinelerra-5.1/cinelerra/vwindowgui.C | 61 ++++++++++++++---------- cinelerra-5.1/doc/shortcuts.html | 2 +- cinelerra-5.1/msg/txt | 12 +++-- 14 files changed, 149 insertions(+), 66 deletions(-) diff --git a/cinelerra-5.1/cinelerra/assetpopup.C b/cinelerra-5.1/cinelerra/assetpopup.C index 244e472f..f7961c7d 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.C +++ b/cinelerra-5.1/cinelerra/assetpopup.C @@ -407,8 +407,10 @@ void AssetListMenu::create_objects() add_item(select_used = new AssetSelectUsed(mwindow, gui)); BC_SubMenu *submenu; select_used->add_submenu(submenu = new BC_SubMenu()); + submenu->add_submenuitem(new AssetSelectUsedItem(select_used, _("All"), SELECT_ALL)); submenu->add_submenuitem(new AssetSelectUsedItem(select_used, _("Used"), SELECT_USED)); submenu->add_submenuitem(new AssetSelectUsedItem(select_used, _("Unused"), SELECT_UNUSED)); + submenu->add_submenuitem(new AssetSelectUsedItem(select_used, _("None"), SELECT_NONE)); add_item(new AWindowListSort(mwindow, gui)); add_item(new AssetListCopy(mwindow, gui)); add_item(new AssetListPaste(mwindow, gui)); diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 56347110..38dad86b 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -1488,6 +1488,15 @@ int AWindowGUI::keypress_event() mwindow->session->drag_clips); lock_window("AWindowGUI::keypress_event 2"); return 1; + case KEY_F1: + case KEY_F2: + case KEY_F3: + case KEY_F4: + if( shift_down() && ctrl_down() ) { + resend_event(mwindow->gui); + return 1; + } + break; } return 0; } @@ -2950,19 +2959,23 @@ int AssetSelectUsedItem::handle_event() AWindowGUI *gui = select_used->gui; AWindowAssets *asset_list = gui->asset_list; ArrayList *data = gui->displayed_assets; - asset_list->set_all_selected(data, 0); - - for( int i = 0; i < data->total; i++ ) { - AssetPicon *picon = (AssetPicon*)data->values[i]; - Indexable *idxbl = picon->indexable ? picon->indexable : - picon->edl ? picon->edl->get_proxy_asset() : 0; - int used = idxbl && mwindow->edl->in_use(idxbl) ? 1 : 0; - int selected = 0; - switch( action ) { - case SELECT_USED: selected = used; break; - case SELECT_UNUSED: selected = !used; break; + + switch( action ) { + case SELECT_ALL: + case SELECT_NONE: + asset_list->set_all_selected(data, action==SELECT_ALL ? 1 : 0); + break; + case SELECT_USED: + case SELECT_UNUSED: + asset_list->set_all_selected(data, 0); + for( int i = 0; i < data->total; i++ ) { + AssetPicon *picon = (AssetPicon*)data->values[i]; + Indexable *idxbl = picon->indexable ? picon->indexable : + picon->edl ? picon->edl->get_proxy_asset() : 0; + int used = idxbl && mwindow->edl->in_use(idxbl) ? 1 : 0; + asset_list->set_selected(data, i, action==SELECT_USED ? used : !used); } - asset_list->set_selected(data, i, selected); + break; } int asset_xposition = asset_list->get_xposition(); @@ -2975,7 +2988,7 @@ int AssetSelectUsedItem::handle_event() } AssetSelectUsed::AssetSelectUsed(MWindow *mwindow, AWindowGUI *gui) - : BC_MenuItem(_("Select used")) + : BC_MenuItem(_("Select")) { this->mwindow = mwindow; this->gui = gui; diff --git a/cinelerra-5.1/cinelerra/awindowgui.h b/cinelerra-5.1/cinelerra/awindowgui.h index 41dd0491..93d6fa27 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.h +++ b/cinelerra-5.1/cinelerra/awindowgui.h @@ -49,8 +49,10 @@ #include "samples.inc" #include "vicon.h" -#define SELECT_USED 0 -#define SELECT_UNUSED 1 +#define SELECT_ALL 0 +#define SELECT_USED 1 +#define SELECT_UNUSED 2 +#define SELECT_NONE 3 class AWindowFolderItem : public BC_ListBoxItem { diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 86c7e424..bd02e239 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -570,6 +570,17 @@ int CWindowGUI::keypress_event() break; } + if( !result && cwindow_operation < 0 && ctrl_down() && shift_down() ) { + switch( get_keypress() ) { + case KEY_F1: + case KEY_F2: + case KEY_F3: + case KEY_F4: + resend_event(mwindow->gui); + result = 1; + break; + } + } if( !result && !ctrl_down() ) { switch( get_keypress() ) { case KEY_F1: diff --git a/cinelerra-5.1/cinelerra/gwindowgui.C b/cinelerra-5.1/cinelerra/gwindowgui.C index f0a050a2..31f79e34 100644 --- a/cinelerra-5.1/cinelerra/gwindowgui.C +++ b/cinelerra-5.1/cinelerra/gwindowgui.C @@ -496,15 +496,29 @@ int GWindowGUI::close_event() int GWindowGUI::keypress_event() { - switch(get_keypress()) { - case KEY_F1: - if( !ctrl_down() && shift_down() ) + if( ctrl_down() && shift_down() ) { + switch(get_keypress()) { + case KEY_F1: + case KEY_F2: + case KEY_F3: + case KEY_F4: + if( ctrl_down() && shift_down() ) { + resend_event(mwindow->gui); + return 1; + } + } + } + else if( !ctrl_down() && shift_down() ) { + switch(get_keypress()) { + case KEY_F1: toggle_camera_xyz(); - break; - case KEY_F2: - if( !ctrl_down() && shift_down() ) + return 1; + case KEY_F2: toggle_projector_xyz(); - break; + return 1; + } + } + switch(get_keypress()) { case 'w': case 'W': case '0': diff --git a/cinelerra-5.1/cinelerra/levelwindowgui.C b/cinelerra-5.1/cinelerra/levelwindowgui.C index 75999e1a..22a0c173 100644 --- a/cinelerra-5.1/cinelerra/levelwindowgui.C +++ b/cinelerra-5.1/cinelerra/levelwindowgui.C @@ -21,6 +21,7 @@ #include "edl.h" #include "edlsession.h" +#include "keys.h" #include "language.h" #include "levelwindow.h" #include "levelwindowgui.h" @@ -112,15 +113,23 @@ int LevelWindowGUI::close_event() int LevelWindowGUI::keypress_event() { - if(get_keypress() == 'w' || get_keypress() == 'W') - { + switch( get_keypress() ) { + case 'w': + case 'W': close_event(); return 1; + case KEY_F1: + case KEY_F2: + case KEY_F3: + case KEY_F4: + if( ctrl_down() && shift_down() ) { + resend_event(mwindow->gui); + return 1; + } } return 0; } - int LevelWindowGUI::reset_over() { return 0; diff --git a/cinelerra-5.1/cinelerra/mainmenu.C b/cinelerra-5.1/cinelerra/mainmenu.C index c3843292..6023c5e5 100644 --- a/cinelerra-5.1/cinelerra/mainmenu.C +++ b/cinelerra-5.1/cinelerra/mainmenu.C @@ -1583,7 +1583,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, _("Ctl+Shift+F%d"), hotkey-KEY_F1+1); + sprintf(hot_txt, _("CtlSft+F%d"), hotkey-KEY_F1+1); set_ctrl(); set_shift(); set_hotkey_text(hot_txt); } @@ -1591,21 +1591,15 @@ LoadLayoutItem::LoadLayoutItem(LoadLayout *load_layout, const char *text, int no int LoadLayoutItem::handle_event() { - char layout_path[BCTEXTLEN]; - snprintf(layout_path, sizeof(layout_path), "%s/" LAYOUT_FILE, - File::get_config_path(), no); MWindow *mwindow = load_layout->mwindow; switch( load_layout->action ) { case LAYOUT_LOAD: - mwindow->session->load_file(layout_path); + mwindow->load_layout(no); break; case LAYOUT_SAVE: - mwindow->session->save_file(layout_path); + mwindow->save_layout(no); break; } - mwindow->restore_windows(); - mwindow->gui->default_positions(); - mwindow->save_defaults(); return 1; } diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 96016f5d..5a5c5f03 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -2901,6 +2901,27 @@ void MWindow::restore_windows() } else if( session->show_lwindow && lwindow->gui->is_hidden() ) show_lwindow(); + + gui->focus(); +} + +void MWindow::save_layout(int no) +{ + char layout_path[BCTEXTLEN]; + snprintf(layout_path, sizeof(layout_path), "%s/" LAYOUT_FILE, + File::get_config_path(), no); + session->save_file(layout_path); +} + +void MWindow::load_layout(int no) +{ + char layout_path[BCTEXTLEN]; + snprintf(layout_path, sizeof(layout_path), "%s/" LAYOUT_FILE, + File::get_config_path(), no); + session->load_file(layout_path); + restore_windows(); + gui->default_positions(); + save_defaults(); } int MWindow::tile_windows(int window_config) diff --git a/cinelerra-5.1/cinelerra/mwindow.h b/cinelerra-5.1/cinelerra/mwindow.h index 14f736ca..e862459c 100644 --- a/cinelerra-5.1/cinelerra/mwindow.h +++ b/cinelerra-5.1/cinelerra/mwindow.h @@ -141,6 +141,8 @@ public: void show_gwindow(); void hide_gwindow(); void restore_windows(); + void save_layout(int no); + void load_layout(int no); int tile_windows(int window_config); char *get_cwindow_display(); void set_screens(int value); diff --git a/cinelerra-5.1/cinelerra/preferences.C b/cinelerra-5.1/cinelerra/preferences.C index 5f9d40ea..abb5f756 100644 --- a/cinelerra-5.1/cinelerra/preferences.C +++ b/cinelerra-5.1/cinelerra/preferences.C @@ -385,7 +385,7 @@ int Preferences::load_defaults(BC_Hash *defaults) shbtn_prefs.remove_all_objects(); int shbtns_total = defaults->get("SHBTNS_TOTAL", -1); if( shbtns_total < 0 ) { - shbtn_prefs.append(new ShBtnPref(_("Features5"), "$CIN_BROWSER file://$CIN_DAT/doc/Features5.pdf", 0)); + shbtn_prefs.append(new ShBtnPref(_("Features"), "$CIN_BROWSER file://$CIN_DAT/doc/Features5.pdf", 0)); shbtn_prefs.append(new ShBtnPref(_("Online Help"), "$CIN_BROWSER https://cinelerra-cv.org/docs.php", 0)); shbtn_prefs.append(new ShBtnPref(_("Original Manual"), "$CIN_BROWSER file://$CIN_DAT/doc/cinelerra.html", 0)); shbtn_prefs.append(new ShBtnPref(_("Setting Shell Commands"), "$CIN_BROWSER file://$CIN_DAT/doc/ShellCmds.html", 0)); diff --git a/cinelerra-5.1/cinelerra/versioninfo.h b/cinelerra-5.1/cinelerra/versioninfo.h index 72d92eca..c1007785 100644 --- a/cinelerra-5.1/cinelerra/versioninfo.h +++ b/cinelerra-5.1/cinelerra/versioninfo.h @@ -1,7 +1,7 @@ #ifndef __VERSIONINFO_H__ #define __VERSIONINFO_H__ -#define CINELERRA_VERSION "Unify" +#define CINELERRA_VERSION "Infinity" #define REPOMAINTXT "git://git.cinelerra-gg.org/goodguy/cinelerra.git\n" #define COPYRIGHT_DATE "2018" #define COPYRIGHTTEXT1 "(c) 2006-2018 Heroine Virtual Ltd. by Adam Williams\n" diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index dfbffff0..96a24faa 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -344,35 +344,44 @@ int VWindowGUI::close_event() int VWindowGUI::keypress_event() { int result = 0; - switch(get_keypress()) - { - case 'w': - case 'W': - close_event(); + switch( get_keypress() ) { + case 'w': + case 'W': + close_event(); + result = 1; + break; + case 'z': + mwindow->undo_entry(this); + break; + case 'Z': + mwindow->redo_entry(this); + break; + case 'f': + unlock_window(); + if(mwindow->session->vwindow_fullscreen) + canvas->stop_fullscreen(); + else + canvas->start_fullscreen(); + lock_window("VWindowGUI::keypress_event 1"); + break; + case ESC: + unlock_window(); + if(mwindow->session->vwindow_fullscreen) + canvas->stop_fullscreen(); + lock_window("VWindowGUI::keypress_event 2"); + break; + case KEY_F1: + case KEY_F2: + case KEY_F3: + case KEY_F4: + if( ctrl_down() && shift_down() ) { + resend_event(mwindow->gui); result = 1; break; - case 'z': - mwindow->undo_entry(this); - break; - case 'Z': - mwindow->redo_entry(this); - break; - case 'f': - unlock_window(); - if(mwindow->session->vwindow_fullscreen) - canvas->stop_fullscreen(); - else - canvas->start_fullscreen(); - lock_window("VWindowGUI::keypress_event 1"); - break; - case ESC: - unlock_window(); - if(mwindow->session->vwindow_fullscreen) - canvas->stop_fullscreen(); - lock_window("VWindowGUI::keypress_event 2"); - break; + } } - if(!result) result = transport->keypress_event(); + if( !result ) + result = transport->keypress_event(); return result; } diff --git a/cinelerra-5.1/doc/shortcuts.html b/cinelerra-5.1/doc/shortcuts.html index 99cbe910..e1289d3b 100644 --- a/cinelerra-5.1/doc/shortcuts.html +++ b/cinelerra-5.1/doc/shortcuts.html @@ -1426,7 +1426,7 @@
F2 'Ctrl+Shift' - Use window layout #2r + Use window layout #2
diff --git a/cinelerra-5.1/msg/txt b/cinelerra-5.1/msg/txt index 222bc738..b08a859c 100644 --- a/cinelerra-5.1/msg/txt +++ b/cinelerra-5.1/msg/txt @@ -1,17 +1,23 @@ -Cinelerra Unify (GG) continuously merged/enriched from the +Cinelerra-GG Infinity continuously merged/enriched from the original Heroine Virtual of Adam Williams which does not support many modern formats, and now contains CV mods provided over prior years from the Community Version. -Email cinelerra@lists.cinelerra-cv.org 4 help. +Email cin@lists.cinelerra-gg.org 4 help. For usage help, refer to the following: https://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html - https://cinelerra-cv.org/five/Features5.pdf + https://cinelerra-gg.org/downloads/Features.pdf http://g-raffa.eu/Cinelerra/HOWTO/basics.html Cinfinity icons selected in Preferences Sam (CC BY 3.0, https://creativecommons.org/licenses/by/3.0/) Neophyte theme selected in Preferences by Olaf Wolff (CC BY 4.0, https://creativecommons.org/licenses/by/4.0/) . +Nov 2018 New features of note: + FFmpeg is now at version 4.1 with a few more plugins. + Sketcher plugin newly added to "pencil in" lines/curves. + Delete shortcut in Resources to "remove from project". + Window layout save and load feature added - total of 4. + Select asset popup in Resources to highlight used/unused. Oct 2018 New features of note: Title plugin has unlimited number of characters allowed. Histogram Bezier bug fixes and some improvements applied. -- 2.26.2