projects
/
goodguy
/
history.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0fb5668
)
delete mwindow before restarting for new theme
author
Good Guy
<good1.2guy@gmail.com>
Sat, 20 Feb 2016 01:34:59 +0000
(18:34 -0700)
committer
Good Guy
<good1.2guy@gmail.com>
Sat, 20 Feb 2016 01:34:59 +0000
(18:34 -0700)
cinelerra-5.0/cinelerra/file.C
patch
|
blob
|
history
cinelerra-5.0/cinelerra/main.C
patch
|
blob
|
history
cinelerra-5.0/cinelerra/mainmenu.C
patch
|
blob
|
history
cinelerra-5.0/cinelerra/mwindow.C
patch
|
blob
|
history
cinelerra-5.0/cinelerra/mwindow.h
patch
|
blob
|
history
cinelerra-5.0/cinelerra/preferencesthread.C
patch
|
blob
|
history
cinelerra-5.0/cinelerra/remotecontrol.C
patch
|
blob
|
history
cinelerra-5.0/plugins/theme_blond_cv/blondcvtheme.C
patch
|
blob
|
history
cinelerra-5.0/plugins/theme_blue_dot/bluedottheme.C
patch
|
blob
|
history
diff --git
a/cinelerra-5.0/cinelerra/file.C
b/cinelerra-5.0/cinelerra/file.C
index 5742cf86ae3b08e9e87cf01042e6eb867b5faaa8..3b1fac49be41d91b603e7c4e117e96c01a2b1645 100644
(file)
--- a/
cinelerra-5.0/cinelerra/file.C
+++ b/
cinelerra-5.0/cinelerra/file.C
@@
-1652,7
+1652,7
@@
int File::record_fd()
void get_exe_path(char *result)
{
// Get executable path
void get_exe_path(char *result)
{
// Get executable path
- int len = readlink("/proc/self/exe", result, BCTEXTLEN);
+ int len = readlink("/proc/self/exe", result, BCTEXTLEN
-1
);
if( len >= 0 ) {
result[len] = 0;
char *ptr = strrchr(result, '/');
if( len >= 0 ) {
result[len] = 0;
char *ptr = strrchr(result, '/');
diff --git
a/cinelerra-5.0/cinelerra/main.C
b/cinelerra-5.0/cinelerra/main.C
index 69895ec4c996df5fb1f065986896e8e9cc5821b7..45c4db037a2d651cfcdf2f43621f5723e7bc23ce 100644
(file)
--- a/
cinelerra-5.0/cinelerra/main.C
+++ b/
cinelerra-5.0/cinelerra/main.C
@@
-108,7
+108,6
@@
int main(int argc, char *argv[])
char exe_path[BCTEXTLEN];
char env_path[BCTEXTLEN];
int nice_value = 20;
char exe_path[BCTEXTLEN];
char env_path[BCTEXTLEN];
int nice_value = 20;
- int start_remote_control = 0;
config_path[0] = 0;
batch_path[0] = 0;
deamon_path[0] = 0;
config_path[0] = 0;
batch_path[0] = 0;
deamon_path[0] = 0;
@@
-187,6
+186,7
@@
int main(int argc, char *argv[])
int load_backup = 0;
int load_backup = 0;
+ int start_remote_control = 0;
for(int i = 1; i < argc; i++)
{
for(int i = 1; i < argc; i++)
{
@@
-359,7
+359,7
@@
int main(int argc, char *argv[])
case DO_GUI:
{
case DO_GUI:
{
- int done = 0;
+ int
restart = 0,
done = 0;
while( !done ) {
BC_WindowBase::get_resources()->vframe_shm = 0;
MWindow mwindow;
while( !done ) {
BC_WindowBase::get_resources()->vframe_shm = 0;
MWindow mwindow;
@@
-391,33
+391,37
@@
int main(int argc, char *argv[])
mwindow.start();
mwindow.run();
//PRINT_TRACE
mwindow.start();
mwindow.run();
//PRINT_TRACE
- if( mwindow.reload() )
- start_remote_control =
- mwindow.gui->remote_control->is_active();
- else
- done = 1;
- if( !done ) {
+ restart = mwindow.restart();
+ if( restart ) {
mwindow.save_backup();
load_backup = 1;
mwindow.save_backup();
load_backup = 1;
+ start_remote_control =
+ mwindow.gui->remote_control->is_active();
}
}
+ if( restart <= 0 )
+ done = 1;
mwindow.save_defaults();
//PRINT_TRACE
filenames.remove_all_objects();
mwindow.save_defaults();
//PRINT_TRACE
filenames.remove_all_objects();
-#if 1
- if( !mwindow.reload() ) break;
-// due to leaks and munges in x fonts, this loop has to be
-// executed via a total program restart 2/18/2016
+ }
+
+ if( restart < 0 ) {
char exe_path[BCTEXTLEN];
char exe_path[BCTEXTLEN];
- if( readlink("/proc/self/exe", exe_path, sizeof(exe_path)) < 0 ) break;
- char *const av[3] = { exe_path, (char*)(load_backup? "-x" : 0), 0 };
+ int len = readlink("/proc/self/exe", exe_path, sizeof(exe_path)-1);
+ if( len < 0 ) break;
+ exe_path[len] = 0;
+ char *av[4] = { 0, }; int ac = 0;
+ av[ac++] = exe_path;
+ if( load_backup ) av[ac++] = (char*) "-x";
+ if( start_remote_control ) av[ac++] = (char*) "-z";
+ av[ac++] = 0;
execv(exe_path, av);
execv(exe_path, av);
-#endif
}
}
+ }
//SET_TRACE
DISABLE_BUFFER
//SET_TRACE
DISABLE_BUFFER
- break;
- }
+ break;
}
return 0;
}
return 0;
diff --git
a/cinelerra-5.0/cinelerra/mainmenu.C
b/cinelerra-5.0/cinelerra/mainmenu.C
index d4738487cc6e5e710bd05d32a2bb75c5f45c8cab..edad4a7bff9c4a4e6e471576b6d394769a36c280 100644
(file)
--- a/
cinelerra-5.0/cinelerra/mainmenu.C
+++ b/
cinelerra-5.0/cinelerra/mainmenu.C
@@
-1423,8
+1423,8
@@
int TileWindows::handle_event()
int window_config = config >= 0 ? config :
mwindow->session->window_config;
if( mwindow->tile_windows(window_config) ) {
int window_config = config >= 0 ? config :
mwindow->session->window_config;
if( mwindow->tile_windows(window_config) ) {
- mwindow->re
load
_status = 1;
- mwindow->
quit(1
);
+ mwindow->re
start
_status = 1;
+ mwindow->
gui->set_done(0
);
}
return 1;
}
}
return 1;
}
diff --git
a/cinelerra-5.0/cinelerra/mwindow.C
b/cinelerra-5.0/cinelerra/mwindow.C
index 7c619b798341ce4c4e84945e3f68093c5aae13e0..1d31da4a33ed5f2e1431a55fc16c44fd9dc9af30 100644
(file)
--- a/
cinelerra-5.0/cinelerra/mwindow.C
+++ b/
cinelerra-5.0/cinelerra/mwindow.C
@@
-205,7
+205,7
@@
MWindow::MWindow()
wwindow = 0;
lwindow = 0;
sighandler = 0;
wwindow = 0;
lwindow = 0;
sighandler = 0;
- re
load
_status = 0;
+ re
start
_status = 0;
screens = 1;
in_destructor = 0;
}
screens = 1;
in_destructor = 0;
}
@@
-241,7
+241,6
@@
MWindow::~MWindow()
save_defaults();
// Give up and go to a movie
// cant run valgrind if this is used
save_defaults();
// Give up and go to a movie
// cant run valgrind if this is used
-// if( !reload_status ) exit(0);
gui->del_keyboard_listener(
(int (BC_WindowBase::*)(BC_WindowBase *))
gui->del_keyboard_listener(
(int (BC_WindowBase::*)(BC_WindowBase *))
diff --git
a/cinelerra-5.0/cinelerra/mwindow.h
b/cinelerra-5.0/cinelerra/mwindow.h
index 006b68fb81f99adc1379ede32c7255a67d1e3be1..3f0802c784aaa52f3e795b133c96af3a252d88b0 100644
(file)
--- a/
cinelerra-5.0/cinelerra/mwindow.h
+++ b/
cinelerra-5.0/cinelerra/mwindow.h
@@
-115,7
+115,7
@@
public:
int new_project();
int delete_project(int flash = 1);
void quit(int unlock);
int new_project();
int delete_project(int flash = 1);
void quit(int unlock);
- int re
load() { return reload
_status; }
+ int re
start() { return restart
_status; }
int load_defaults();
int save_defaults();
int load_defaults();
int save_defaults();
@@
-639,7
+639,7
@@
public:
void clean_indexes();
// TimeBomb timebomb;
SigHandler *sighandler;
void clean_indexes();
// TimeBomb timebomb;
SigHandler *sighandler;
- int re
load
_status;
+ int re
start
_status;
int screens;
int in_destructor;
};
int screens;
int in_destructor;
};
diff --git
a/cinelerra-5.0/cinelerra/preferencesthread.C
b/cinelerra-5.0/cinelerra/preferencesthread.C
index 8f95e11967ab8f3e33c893c3d71e3f49d741472f..e59a099d7ad1e5d0576f4c9617e428e7b4f1558c 100644
(file)
--- a/
cinelerra-5.0/cinelerra/preferencesthread.C
+++ b/
cinelerra-5.0/cinelerra/preferencesthread.C
@@
-153,7
+153,7
@@
void PreferencesThread::handle_close_event(int result)
edl = 0;
mwindow->defaults->update("DEFAULTPREF", current_dialog);
edl = 0;
mwindow->defaults->update("DEFAULTPREF", current_dialog);
- if( mwindow->re
load_status
)
+ if( mwindow->re
start()
)
mwindow->gui->set_done(0);
}
mwindow->gui->set_done(0);
}
@@
-202,7
+202,7
@@
int PreferencesThread::apply_settings()
!preferences->brender_asset->equivalent(*mwindow->preferences->brender_asset, 0, 1);
if( strcmp(preferences->theme, mwindow->preferences->theme) != 0 )
!preferences->brender_asset->equivalent(*mwindow->preferences->brender_asset, 0, 1);
if( strcmp(preferences->theme, mwindow->preferences->theme) != 0 )
- mwindow->re
load_status = 1;
+ mwindow->re
start_status = -1; // reload, need new bcresources
mwindow->edl->copy_session(edl, 1);
mwindow->preferences->copy_from(preferences);
mwindow->edl->copy_session(edl, 1);
mwindow->preferences->copy_from(preferences);
diff --git
a/cinelerra-5.0/cinelerra/remotecontrol.C
b/cinelerra-5.0/cinelerra/remotecontrol.C
index ecfa54cdffce05b408d0e8555a7703981ddb5cb0..5cd0f7eb05c7f8b0971977f5b3c4120cf5418b68 100644
(file)
--- a/
cinelerra-5.0/cinelerra/remotecontrol.C
+++ b/
cinelerra-5.0/cinelerra/remotecontrol.C
@@
-147,7
+147,7
@@
void RemoteGUI::tile_windows(int config)
}
else {
unlock_window();
}
else {
unlock_window();
- mwindow->re
load
_status = 1;
+ mwindow->re
start
_status = 1;
mwindow->quit(0);
}
}
mwindow->quit(0);
}
}
diff --git
a/cinelerra-5.0/plugins/theme_blond_cv/blondcvtheme.C
b/cinelerra-5.0/plugins/theme_blond_cv/blondcvtheme.C
index 5e8fa9b89ff817e8e1bbd94b180fc179723d8078..383d72d9eb4e962e7b539b76a21540e06a7612e0 100644
(file)
--- a/
cinelerra-5.0/plugins/theme_blond_cv/blondcvtheme.C
+++ b/
cinelerra-5.0/plugins/theme_blond_cv/blondcvtheme.C
@@
-21,6
+21,7
@@
#include "bcsignals.h"
#include "clip.h"
#include "bcsignals.h"
#include "clip.h"
+#include "cstrdup.h"
#include "cwindowgui.h"
#include "blondcvtheme.h"
#include "edl.h"
#include "cwindowgui.h"
#include "blondcvtheme.h"
#include "edl.h"
@@
-798,7
+799,12
@@
void BlondCVTheme::initialize()
title_color = WHITE;
recordgui_fixed_color = YELLOW;
recordgui_variable_color = RED;
title_color = WHITE;
recordgui_fixed_color = YELLOW;
recordgui_variable_color = RED;
- resources->medium_font = "-*-helvetica-bold-r-normal-*-14-*";
+
+ int font_size = (int)(14*resources->font_scale + 0.5);
+ char string[BCTEXTLEN];
+ sprintf(string,"-*-helvetica-bold-r-normal-*-%d-*", font_size);
+ delete [] resources->medium_font;
+ resources->medium_font = cstrdup(string);
channel_position_color = MEYELLOW;
resources->meter_title_w = 25;
channel_position_color = MEYELLOW;
resources->meter_title_w = 25;
diff --git
a/cinelerra-5.0/plugins/theme_blue_dot/bluedottheme.C
b/cinelerra-5.0/plugins/theme_blue_dot/bluedottheme.C
index 1e87818c9172c5d56864bcf60b0eb7b56f1891c4..c54a47f667354d0b7d5d9c2ed90c55626ec2c95d 100644
(file)
--- a/
cinelerra-5.0/plugins/theme_blue_dot/bluedottheme.C
+++ b/
cinelerra-5.0/plugins/theme_blue_dot/bluedottheme.C
@@
-21,6
+21,7
@@
#include "bcsignals.h"
#include "clip.h"
#include "bcsignals.h"
#include "clip.h"
+#include "cstrdup.h"
#include "cwindowgui.h"
#include "bluedottheme.h"
#include "edl.h"
#include "cwindowgui.h"
#include "bluedottheme.h"
#include "edl.h"
@@
-833,7
+834,12
@@
void BlueDotTheme::initialize()
title_color = BLACK;
recordgui_fixed_color = BLACK;
recordgui_variable_color = RED;
title_color = BLACK;
recordgui_fixed_color = BLACK;
recordgui_variable_color = RED;
- resources->medium_font = "-*-helvetica-medium-r-normal-*-14-*";
+
+ int font_size = (int)(14*resources->font_scale + 0.5);
+ char string[BCTEXTLEN];
+ sprintf(string,"-*-helvetica-medium-r-normal-*-%d-*", font_size);
+ delete [] resources->medium_font;
+ resources->medium_font = cstrdup(string);
channel_position_color = MEYELLOW;
resources->meter_title_w = 25;
channel_position_color = MEYELLOW;
resources->meter_title_w = 25;