Commit 4114ccaa authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master'

parents 73a393eb 9e32be4a
......@@ -1884,7 +1884,9 @@ void wb_build::directories( char *dir, bld_ePass pass)
// Check if file should be updated
int update = 0;
pwr_tFileName source, target;
pwr_tFileName target_dir;
pwr_tTime source_time, target_time;
char *s;
strncpy( source, found_file, sizeof(source));
strncpy( target, line_item[3], sizeof(target));
......@@ -1911,6 +1913,18 @@ void wb_build::directories( char *dir, bld_ePass pass)
if ( !opt.force && !update)
continue;
if ( EVEN(sts)) {
// Check that directory exist, create if it doesn't
strcpy( target_dir, target);
if ( (s = strrchr( target_dir, '/'))) {
*s = 0;
sts = dcli_file_time( target_dir, &target_time);
if ( EVEN(sts)) {
sprintf( cmd, "mkdir -p %s", target_dir);
system( cmd);
}
}
}
sprintf( cmd, "cp %s %s", source, target);
system( cmd);
sprintf( cmd, "Build: copy %s %s -> %s", line_item[1], source, target);
......
......@@ -1195,9 +1195,29 @@ pwr_tStatus WbExpWNav::exp()
printf( "%s\n", cmd);
sts = system( cmd);
if ( sts != 0) {
char msg[250];
snprintf( msg, sizeof(msg), "Build error %d, %s", WEXITSTATUS(sts), cmd);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
// Check that directory exist, create if it doesn't
pwr_tFileName target_dir;
pwr_tTime target_time;
char *s;
strcpy( target_dir, cp->target);
if ( (s = strrchr( target_dir, '/'))) {
*s = 0;
sts = dcli_file_time( target_dir, &target_time);
if ( EVEN(sts)) {
sprintf( cmd, "mkdir -p %s", target_dir);
system( cmd);
sprintf( cmd, "cp %s %s", cp->source, cp->target);
printf( "%s\n", cmd);
sts = system( cmd);
}
}
if ( sts != 0) {
char msg[250];
snprintf( msg, sizeof(msg), "Build error %d, %s", WEXITSTATUS(sts), cmd);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
}
}
}
}
......
......@@ -73,6 +73,19 @@ gboolean XttGeGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer da
return FALSE;
}
void XttGeGtk::iconify( int val)
{
if ( val)
gtk_window_iconify( GTK_WINDOW(toplevel));
else
gtk_window_deiconify( GTK_WINDOW(toplevel));
}
void XttGeGtk::set_below( int val)
{
gtk_window_set_keep_below( GTK_WINDOW(toplevel), val);
}
void XttGeGtk::set_size( int width, int height)
{
int default_width;
......
......@@ -80,6 +80,8 @@ class XttGeGtk : public XttGe {
void confirm_reply( int ok);
void *get_widget() { return toplevel;}
GtkWidget *get_graph_widget() { return graph_form;}
void iconify( int val);
void set_below( int val);
static void ge_change_value_cb( void *ge_ctx, void *value_object, char *text);
static void confirm_cb( void *ge_ctx, void *confirm_object, char *text);
......
......@@ -90,6 +90,8 @@ class XttGe : XttUtility {
virtual void set_size( int width, int height) {}
virtual void confirm_reply( int ok) {}
virtual void *get_widget() { return 0;}
virtual void iconify( int val) {}
virtual void set_below( int val) {}
xtt_eUtility get_type() { return xtt_eUtility_Graph;}
void message( char severity, const char *msg);
......
......@@ -373,7 +373,8 @@ dcli_tCmdTable xnav_command_table[] = {
&xnav_set_func,
{ "dcli_arg1", "dcli_arg2", "/NAME", "/VALUE",
"/BYPASS", "/PUBLICWRITE", "/INDEX", "/SOURCE", "/OBJECT", "/CONTINUE",
"/X0", "/Y0", "/X1", "/Y1", "/INSTANCE", "/ESCAPESTORE", "/FOCUS", "/INPUTEMPTY",
"/X0", "/Y0", "/X1", "/Y1", "/INSTANCE", "/ESCAPESTORE", "/FOCUS", "/INPUTEMPTY",
"/ICONIFY", "/BELOW",
""}
},
{
......@@ -1234,6 +1235,8 @@ static int xnav_set_func( void *client_data,
pwr_tAName instance_str;
char *instance_p = 0;
char name_str[200];
char iconify_str[20];
char below_str[20];
XttGe *gectx;
if ( ODD( dcli_get_qualifier( "/INSTANCE", instance_str, sizeof(instance_str))))
......@@ -1252,6 +1255,32 @@ static int xnav_set_func( void *client_data,
if ( ODD( dcli_get_qualifier( "/ESCAPESTORE", 0, 0))) {
gectx->set_object_focus( 0, 0);
}
else if ( ODD( dcli_get_qualifier( "/ICONIFY", iconify_str, sizeof(iconify_str)))) {
int iconify;
if ( strcmp( iconify_str, "1") == 0)
iconify = 1;
else if ( strcmp( iconify_str, "0") == 0)
iconify = 0;
else {
xnav->message('E', "Syntax error");
return XNAV__SUCCESS;
}
gectx->iconify( iconify);
}
else if ( ODD( dcli_get_qualifier( "/BELOW", below_str, sizeof(below_str)))) {
int below;
if ( strcmp( below_str, "1") == 0)
below = 1;
else if ( strcmp( below_str, "0") == 0)
below = 0;
else {
xnav->message('E', "Syntax error");
return XNAV__SUCCESS;
}
gectx->set_below( below);
}
else {
xnav->message('E', "Syntax error");
return XNAV__SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment