-
/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
#include <errno.h>
-#include "empty_svg.h"
-
struct fifo_struct {
int pid;
// 1 = update from client, 2 = client closes, 3 = quit
}
new_window = new NewSvgWindow(client, window, directory);
new_window->create_objects();
+ new_window->lock_window("NewSvgButton::run");
new_window->update_filter("*.svg");
+ new_window->unlock_window();
result = new_window->run_window();
const char *filepath = new_window->get_path(0);
strcpy(filename, filepath ? filepath : "" );
else {
FILE *out = fopen(filename,"w");
if( out ) {
- unsigned long size = sizeof(empty_svg) - 4;
- fwrite(empty_svg+4, size, 1, out);
+ extern unsigned char _binary_new_svg_start[];
+ extern unsigned char _binary_new_svg_end[];
+ unsigned int *ip = (unsigned int *)_binary_new_svg_start;
+ unsigned int hdr_sz = *ip++;
+ unsigned char *dp = (unsigned char *)ip + hdr_sz;
+ unsigned char *ep = _binary_new_svg_end;
+ fwrite(dp, ep - dp, 1, out);
fclose(out);
result = 0;
}
if( ret != sizeof(fifo_buf) ) continue;
switch( fifo_buf.action ) {
case 1: break;
- case 2: printf(_("Inkscape has exited\n"));
+ case 2: // printf(_("Inkscape has exited\n"));
break;
- case 3: printf(_("Plugin window has closed\n"));
+ case 3: // printf(_("Plugin window has closed\n"));
done = 1;
break;
}
DpiValue::DpiValue(SvgWin *win, SvgMain *client, int x, int y, float *value)
- : BC_TumbleTextBox(win, *value, (float)10, (float)1000, x, y, 100)
+ : BC_TumbleTextBox(win, *value, 10.f, 1000.f, x, y, xS(100), 2)
{
//printf("SvgWidth::SvgWidth %f\n", client->config.w);
this->client = client;