Commit 3a50476a authored by Jiri (George) Lebl's avatar Jiri (George) Lebl

Thu Oct 28 16:09:42 2010 Jiri (George) Lebl <jirka@5z.com>

	* src/graphing.c: Don't run ps2epsi by default, and make it an option
	  on the export dialog.  ps2epsi can take really really long
	  sometimes, generate large files, and most of the time I found out
	  you don't want it anyway.

	* src/eval.c: fix 64 bit build
parent d394ab9b
Thu Oct 28 16:09:42 2010 Jiri (George) Lebl <jirka@5z.com>
* src/graphing.c: Don't run ps2epsi by default, and make it an option
on the export dialog. ps2epsi can take really really long
sometimes, generate large files, and most of the time I found out
you don't want it anyway.
* src/eval.c: fix 64 bit build
Sat Oct 09 12:23:07 2010 Jiri (George) Lebl <jirka@5z.com>
* Makefile.am: apply patch from Dominique Leuenberger
......
......@@ -270,7 +270,7 @@ gel_find_pre_function_modulo (GelCtx *ctx)
stack = stack->next;
iter = &(stack->stack[STACK_SIZE]);
}
while ((int)(*(iter-1)) != GE_FUNCCALL) {
while (GPOINTER_TO_INT(*(iter-1)) != GE_FUNCCALL) {
last = iter;
iter -= 2;
if ((gpointer)iter == (gpointer)stack) {
......@@ -281,7 +281,7 @@ gel_find_pre_function_modulo (GelCtx *ctx)
}
}
if (last == NULL || (int)(*(last-1)) != GE_SETMODULO) {
if (last == NULL || GPOINTER_TO_INT(*(last-1)) != GE_SETMODULO) {
return NULL;
} else {
return *(last-2);
......
......@@ -869,6 +869,8 @@ really_export_cb (GtkFileChooser *fs, int response, gpointer data)
char tmpfile[] = "/tmp/genius-ps-XXXXXX";
char *file_to_write = NULL;
int fd = -1;
gboolean run_epsi = FALSE;
GtkWidget *w;
eps = GPOINTER_TO_INT (data);
......@@ -879,6 +881,13 @@ really_export_cb (GtkFileChooser *fs, int response, gpointer data)
return;
}
/* run epsi checkbox */
w = gtk_file_chooser_get_extra_widget (GTK_FILE_CHOOSER (fs));
if (w != NULL &&
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))) {
run_epsi = TRUE;
}
s = g_strdup (gtk_file_chooser_get_filename (fs));
if (s == NULL)
......@@ -911,7 +920,7 @@ really_export_cb (GtkFileChooser *fs, int response, gpointer data)
gtk_widget_set_sensitive (graph_window, TRUE);
file_to_write = s;
if (eps && ve_is_prog_in_path ("ps2epsi")) {
if (eps && run_epsi && ve_is_prog_in_path ("ps2epsi")) {
fd = g_mkstemp (tmpfile);
/* FIXME: tell about errors ?*/
if (fd >= 0) {
......@@ -1108,6 +1117,14 @@ do_export_cb (int export_type)
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (fs), filter_all);
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (fs), filter_ps);
if (ve_is_prog_in_path ("ps2epsi")) {
GtkWidget *w;
w = gtk_check_button_new_with_label (_("Generate preview in EPS file (with ps2epsi)"));
gtk_widget_show (w);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (fs), w);
}
g_signal_connect (G_OBJECT (fs), "destroy",
G_CALLBACK (gtk_widget_destroyed), &fs);
if (export_type == EXPORT_EPS) {
......
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