[GB.GTK]
* BUG: Fix a bad code path in event management, which leads to warnings from the GTK+ library when displaying the printer configuration dialog. git-svn-id: svn://localhost/gambas/trunk@3342 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
018ea0ebb1
commit
ac01b8fc64
@ -295,16 +295,18 @@ static void gambas_handle_event(GdkEvent *event)
|
||||
//fprintf(stderr, "type: %s\n", G_OBJECT_TYPE_NAME(widget));
|
||||
if (!strcmp(G_OBJECT_TYPE_NAME(gtk_widget_get_toplevel(widget)), "GtkPrintUnixDialog"))
|
||||
{
|
||||
//fprintf(stderr, "event: %d\n", event->type);
|
||||
if (event->type == GDK_MAP)
|
||||
{
|
||||
//fprintf(stderr, "event: MAP!\n");
|
||||
widget = gtk_window_get_default_widget(GTK_WINDOW(gtk_widget_get_toplevel(widget)));
|
||||
if (widget && GTK_IS_BUTTON(widget))
|
||||
{
|
||||
gApplication::_close_next_window = false;
|
||||
gtk_button_clicked(GTK_BUTTON(widget));
|
||||
goto __HANDLE_EVENT;
|
||||
//g_timeout_add(0, (GSourceFunc)close_dialog, GTK_BUTTON(widget));
|
||||
}
|
||||
//fprintf(stderr, "event: MAP! <<< end\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -314,6 +316,8 @@ static void gambas_handle_event(GdkEvent *event)
|
||||
goto __HANDLE_EVENT;
|
||||
|
||||
widget = gtk_get_event_widget(event);
|
||||
if (!widget)
|
||||
goto __HANDLE_EVENT;
|
||||
|
||||
grab = gtk_grab_get_current();
|
||||
if (grab)
|
||||
|
@ -66,7 +66,7 @@ static void cb_end(GtkPrintOperation *operation, GtkPrintContext *context, gPrin
|
||||
#if DEBUG_ME
|
||||
fprintf(stderr, "cb_end\n");
|
||||
#endif
|
||||
if (printer->onEnd)
|
||||
if (printer->_preview && printer->onEnd)
|
||||
(*printer->onEnd)(printer);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user