From: Good Guy Date: Mon, 20 Jan 2020 01:24:44 +0000 (-0700) Subject: tweak loadmode icons/tooltips, change snap/grabshot default path, fix broken vicon... X-Git-Tag: 2020-01~3 X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=commitdiff_plain;h=bb755e4be7602e9e2705fdb49a76e49dbb2c5008 tweak loadmode icons/tooltips, change snap/grabshot default path, fix broken vicon read, add keyev support when no remote control --- diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index 6de48403..287fc4d4 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -220,7 +220,7 @@ void AppearancePrefs::create_objects() x = get_w() / 3 + xs30; y = y1; - add_subwindow(title = new BC_Title(x1, y, _("Flags:"), LARGEFONT, + add_subwindow(title = new BC_Title(x, y, _("Flags:"), LARGEFONT, resources->text_default)); y += title->get_h() + ys10; y1 = y; diff --git a/cinelerra-5.1/cinelerra/assetpopup.C b/cinelerra-5.1/cinelerra/assetpopup.C index 51e3f886..ba828166 100644 --- a/cinelerra-5.1/cinelerra/assetpopup.C +++ b/cinelerra-5.1/cinelerra/assetpopup.C @@ -892,12 +892,13 @@ int SnapshotMenuItem::handle_event() if( !edl->have_video() ) return 1; Preferences *preferences = mwindow->preferences; - char filename[BCTEXTLEN]; + char filename[BCTEXTLEN], snapshot_path[BCTEXTLEN]; static const char *exts[] = { "png", "jpg", "tif", "ppm" }; time_t tt; time(&tt); struct tm tm; localtime_r(&tt,&tm); + File::getenv_path(snapshot_path, preferences->snapshot_path); snprintf(filename,sizeof(filename),"%s/%s_%04d%02d%02d-%02d%02d%02d.%s", - preferences->snapshot_path, _("snap"), + snapshot_path, _("snap"), 1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday, tm.tm_hour,tm.tm_min,tm.tm_sec, exts[mode]); char *asset_path = FileSystem::basepath(filename); @@ -1117,12 +1118,13 @@ int GrabshotPopup::grab_event(XEvent *event) MWindow *mwindow = grab_thread->mwindow; Preferences *preferences = mwindow->preferences; - char filename[BCTEXTLEN]; + char filename[BCTEXTLEN], snapshot_path[BCTEXTLEN]; static const char *exts[] = { "png", "jpg", "tif", "ppm" }; time_t tt; time(&tt); struct tm tm; localtime_r(&tt,&tm); + File::getenv_path(snapshot_path, preferences->snapshot_path); snprintf(filename,sizeof(filename),"%s/%s_%04d%02d%02d-%02d%02d%02d.%s", - preferences->snapshot_path, _("grab"), + snapshot_path, _("grab"), 1900+tm.tm_year,1+tm.tm_mon,tm.tm_mday, tm.tm_hour,tm.tm_min,tm.tm_sec, exts[mode]); char *asset_path = FileSystem::basepath(filename); diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index dc884e55..a8e6c002 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -109,6 +109,7 @@ AssetVIcon::AssetVIcon(AssetPicon *picon, int w, int h, double framerate, int64_ this->picon = picon; this->length = length; temp = 0; + broken = 0; } AssetVIcon::~AssetVIcon() @@ -119,6 +120,7 @@ AssetVIcon::~AssetVIcon() VFrame *AssetVIcon::frame() { + if( broken ) return 0; AssetVIconThread *avt = picon->gui->vicon_thread; Indexable *idxbl = picon->indexable; Asset *asset = idxbl && idxbl->is_asset ? (Asset *)idxbl : 0; @@ -161,7 +163,10 @@ VFrame *AssetVIcon::frame() if( seq_no >= images.size() ) { MWindow *mwindow = picon->mwindow; File *file = mwindow->video_cache->check_out(asset, mwindow->edl, 1); - if( !file ) return 0; + if( !file ) { + broken = 1; + return 0; + } if( temp && (temp->get_w() != asset->width || temp->get_h() != asset->height) ) { delete temp; temp = 0; } @@ -929,7 +934,7 @@ void AssetPicon::create_objects() else { edl = (EDL *)indexable; cp += sprintf(cp, "edl:"); - set_color(get_color() ^ 0xCC9955); +// set_color(get_color() ^ 0xCC9955); } fs.extract_name(cp, indexable->path); set_text(name); diff --git a/cinelerra-5.1/cinelerra/awindowgui.h b/cinelerra-5.1/cinelerra/awindowgui.h index 6ba8d504..6004247d 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.h +++ b/cinelerra-5.1/cinelerra/awindowgui.h @@ -165,6 +165,7 @@ public: AssetPicon *picon; VFrame *temp; int64_t length; + int broken; VFrame *frame(); int64_t set_seq_no(int64_t no); diff --git a/cinelerra-5.1/cinelerra/loadmode.C b/cinelerra-5.1/cinelerra/loadmode.C index 4caed986..6e12593d 100644 --- a/cinelerra-5.1/cinelerra/loadmode.C +++ b/cinelerra-5.1/cinelerra/loadmode.C @@ -52,9 +52,9 @@ static const char *mode_text[] = N_("Concatenate to existing tracks"), N_("Paste over selection/at insertion point"), N_("Create new resources only"), - N_("EDL as Clip"), - N_("EDL as Nested"), - N_("EDL as Reference"), + N_("EDL"), + N_("Nested"), + N_("Reference"), }; diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 0033b268..0fde87ab 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -186,6 +186,12 @@ void MWindowGUI::create_objects() } #endif mwindow->reset_android_remote(); + if( !cwindow_remote_handler ) + cwindow_remote_handler = (RemoteHandler*) + new CWindowKeyEvHandler(mwindow->gui->remote_control); + if( !record_remote_handler ) + record_remote_handler = (RemoteHandler*) + new RecordKeyEvHandler(mwindow->gui->remote_control); if(debug) printf("MWindowGUI::create_objects %d\n", __LINE__); int x1 = get_w() - MainShBtns::calculate_w(-1, 0, -1) - xS(5); diff --git a/cinelerra-5.1/cinelerra/preferences.C b/cinelerra-5.1/cinelerra/preferences.C index d9db06ad..dbf14c49 100644 --- a/cinelerra-5.1/cinelerra/preferences.C +++ b/cinelerra-5.1/cinelerra/preferences.C @@ -75,7 +75,7 @@ Preferences::Preferences() vicon_color_mode = VICON_COLOR_MODE_LOW; theme[0] = 0; plugin_icons[0] = 0; - strcpy(snapshot_path, "/tmp"); + strcpy(snapshot_path, DEFAULT_SNAPSHOT_PATH); use_renderfarm = 0; force_uniprocessor = 0; renderfarm_port = DEAMON_PORT; @@ -347,7 +347,7 @@ int Preferences::load_defaults(BC_Hash *defaults) strcpy(plugin_icons, DEFAULT_PICON); defaults->get("THEME", theme); defaults->get("PLUGIN_ICONS", plugin_icons); - strcpy(snapshot_path, "/tmp"); + strcpy(snapshot_path, DEFAULT_SNAPSHOT_PATH); defaults->get("SNAPSHOT_PATH", snapshot_path); for( int i=0; i