I am using the GtkPrint* functions to print. However at what seems to be random 
occurrences the application crashes with the following error:

Gdk:ERROR:gdkeventloop-quartz.c:559:select_thread_collect_poll: assertion 
failed: (ufds[i].fd == current_pollfds[i].fd)

Abort trap
 


When the user clicks on the print button a signal is generated and the 
application comand function executes based on the following case statement:


...

    case ISI_PERM_MENU_COMPONENT_FORMULA_PRINT:

                if( isi_app_check_permission(prev_self, 
ISI_PERM_MENU_COMPONENT_FORMULA_PRINT) && prev_self->component != NULL){

                    isi_display_page_setup( prev_self->display, 
prev_self->component,FALSE);
                    isi_display_print(prev_self->display);

                } else {

                    isi_user_message(NULL,"Not Allowed","You do not have 
permission to print formulas.",0);
                }

            break;

...


void isi_display_print(IsiDisplay *self){

   
    GtkPrintOperation *print = NULL;
    GtkPrintSettings *printer_settings = NULL;
    GtkPageSetup *page_setup = NULL;
    GtkPaperSize *paper_size = NULL;
    guint ctype;

    /* Sanity Check */
    g_return_if_fail(self != NULL);
    g_return_if_fail(ISI_IS_DISPLAY(self) != FALSE);
    g_return_if_fail(self->priv != NULL);
    g_return_if_fail(self->priv->dispose_has_run != TRUE);

    /* Create a new print operation */
    print = gtk_print_operation_new();
    
    /* Create new page setup and paper size */
    page_setup = gtk_page_setup_new();
    paper_size = gtk_paper_size_new(GTK_PAPER_NAME_LETTER);
    gtk_page_setup_set_paper_size(page_setup,paper_size);

    /* Set the default to the new page setup */
    gtk_print_operation_set_default_page_setup(print,page_setup);
    
    
    /* Make sure we always do full page printing*/
    gtk_print_operation_set_unit(print,GTK_UNIT_INCH);
    gtk_print_operation_set_use_full_page(print,TRUE);
    gtk_print_operation_set_n_pages (print, self->priv->page_count);

    g_signal_connect(print, "draw-page", 
G_CALLBACK(isi_display_print_event),(gpointer)self);
    
    
    
    /* SOMEWHERE IN THIS FUNCTION THE DIALOG BLOWS UP!! */
    
gtk_print_operation_run(print,GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,NULL,NULL);


return;}


Any help would be greatly appreciated.

The problem is pervasive will most printer types, but is exacerbated with the 
HP CP3525 Color Laserjet printer. 
Shawn






 EMAILING FOR THE GREATER GOOD
Join me                                           
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to