Commit 3e66dbe322330baff6ebb77c8794de50e9fedc6b
1 parent
9e9c8491
Exists in
master
and in
5 other branches
Dialogo de impressao esta caindo com segfault em gtk3
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
src/gtk/print.c
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | static void begin_print(GtkPrintOperation *prt, GtkPrintContext *context, gpointer user_data) | 37 | static void begin_print(GtkPrintOperation *prt, GtkPrintContext *context, gpointer user_data) |
| 38 | { | 38 | { |
| 39 | trace("%s",__FUNCTION__); | 39 | trace("%s",__FUNCTION__); |
| 40 | - | 40 | + gtk_print_operation_cancel(prt); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | static void draw_page(GtkPrintOperation *prt, GtkPrintContext *context, gint pg, gpointer user_data) | 43 | static void draw_page(GtkPrintOperation *prt, GtkPrintContext *context, gint pg, gpointer user_data) |
| @@ -69,18 +69,20 @@ | @@ -69,18 +69,20 @@ | ||
| 69 | GtkPrintOperation * print = gtk_print_operation_new(); | 69 | GtkPrintOperation * print = gtk_print_operation_new(); |
| 70 | // GtkPrintSettings * settings = gtk_print_settings_new(); | 70 | // GtkPrintSettings * settings = gtk_print_settings_new(); |
| 71 | // GtkPageSetup * setup = gtk_page_setup_new(); | 71 | // GtkPageSetup * setup = gtk_page_setup_new(); |
| 72 | - gchar * ptr; | 72 | +// gchar * ptr; |
| 73 | 73 | ||
| 74 | // Basic setup | 74 | // Basic setup |
| 75 | gtk_print_operation_set_allow_async(print,FALSE); | 75 | gtk_print_operation_set_allow_async(print,FALSE); |
| 76 | 76 | ||
| 77 | +/* | ||
| 77 | ptr = g_strconcat(PACKAGE_NAME,".",gtk_action_get_name(action),NULL); | 78 | ptr = g_strconcat(PACKAGE_NAME,".",gtk_action_get_name(action),NULL); |
| 78 | gtk_print_operation_set_job_name(print,ptr); | 79 | gtk_print_operation_set_job_name(print,ptr); |
| 79 | g_free(ptr); | 80 | g_free(ptr); |
| 81 | +*/ | ||
| 80 | 82 | ||
| 81 | - gtk_print_operation_set_custom_tab_label(print,_( "Style" )); | 83 | +// gtk_print_operation_set_custom_tab_label(print,_( "Style" )); |
| 82 | 84 | ||
| 83 | - gtk_print_operation_set_show_progress(print,TRUE); | 85 | +// gtk_print_operation_set_show_progress(print,TRUE); |
| 84 | 86 | ||
| 85 | // Common signals | 87 | // Common signals |
| 86 | g_signal_connect(print,"begin_print",G_CALLBACK(begin_print),0); | 88 | g_signal_connect(print,"begin_print",G_CALLBACK(begin_print),0); |