Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 104566
Collapse All | Expand All

(-)gwcc-0.9.6/src/callbacks.c (-2 / +6 lines)
Lines 1697-1706 Link Here
1697
    }
1697
    }
1698
1698
1699
    // Create temp file to be Printed (via file saving function).
1699
    // Create temp file to be Printed (via file saving function).
1700
    perform_file_save("temp", NULL);
1700
    if (perform_file_save("temp", NULL) != 0)
1701
		return;
1701
1702
1702
    // Pipe print command and voila!, the doc is printed.
1703
    // Pipe print command and voila!, the doc is printed.
1703
    strcat(print_command, " /tmp/gwcc_out.txt");
1704
    snprintf (print_command + strlen(print_command),
1705
			sizeof(print_command) - strlen(print_command) - 1,
1706
			" %s%s", getenv("HOME"), "/gwcc_temp.txt");
1707
1704
    if (system(print_command) == -1) {
1708
    if (system(print_command) == -1) {
1705
//        sprintf(entry_text, "The System Call '%s' failed!", print_command);
1709
//        sprintf(entry_text, "The System Call '%s' failed!", print_command);
1706
        gnome_dialog_run_and_close(GNOME_DIALOG(gnome_error_dialog(entry_text)));
1710
        gnome_dialog_run_and_close(GNOME_DIALOG(gnome_error_dialog(entry_text)));
(-)gwcc-0.9.6/src/prefs.c (+1 lines)
Lines 27-32 Link Here
27
   #include <string.h>             /* for string functs  */
27
   #include <string.h>             /* for string functs  */
28
   #include <fcntl.h>              /* for open() command */
28
   #include <fcntl.h>              /* for open() command */
29
   #include <sys/stat.h>           /* for mkdir() funct  */
29
   #include <sys/stat.h>           /* for mkdir() funct  */
30
   #include <errno.h>
30
   #include "prefs.h"
31
   #include "prefs.h"
31
   #include "interface.h"
32
   #include "interface.h"
32
   #include "support.h"
33
   #include "support.h"
(-)gwcc-0.9.6/src/utils.c (-10 / +9 lines)
Lines 91-106 Link Here
91
        }
91
        }
92
        gtk_widget_destroy(GTK_WIDGET(user_data));
92
        gtk_widget_destroy(GTK_WIDGET(user_data));
93
    }
93
    }
94
    else if (strcmp(operation, "temp") == 0) {
94
    else if ((strcmp(operation, "temp") == 0) || strcmp(operation, "home") == 0) {
95
        strcat(file_name, "/tmp/gwcc_out.txt");
95
		env_homedir = getenv("HOME");
96
    }
96
		if (env_homedir == NULL) 
97
    else if (strcmp(operation, "home") == 0) {
97
			return 1;
98
        env_homedir = getenv("HOME");
98
		strcpy(file_name, env_homedir);
99
        if (env_homedir == NULL) {
99
		if (strcmp(operation, "home") == 0)
100
            strcpy(env_homedir, "/tmp");
100
			strcat(file_name, "/gwcc_out.txt");
101
        }
101
		else
102
        strcpy(file_name, env_homedir);
102
        	strcat(file_name, "/gwcc_temp.txt");
103
        strcat(file_name, "/gwcc_out.txt");
104
    }
103
    }
105
104
106
    // Get the number (int) of current notebook page (0...n-1),
105
    // Get the number (int) of current notebook page (0...n-1),

Return to bug 104566