X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fmessage-dialog.c;h=af1886c98a7f619fdd5706259ebf21d4548dcb48;hb=618a58ebb4c59dff83374278e44b7375b3865935;hp=45d34dfc93a3aadb5bc0f494022d9174410a6123;hpb=75aeeafa67aa460512683311566a83917d399c70;p=pspp diff --git a/src/ui/gui/message-dialog.c b/src/ui/gui/message-dialog.c index 45d34dfc93..af1886c98a 100644 --- a/src/ui/gui/message-dialog.c +++ b/src/ui/gui/message-dialog.c @@ -42,17 +42,26 @@ extern GladeXML *xml; -static void handle_msg(const struct msg *); -static void enqueue_msg(const struct msg *m); + +static void enqueue_msg (const struct msg *m); static GQueue *message_queue; + +static void +msg_location (struct msg_locator *loc) +{ + loc->file_name = NULL; + loc->line_number = -1; +} + + void message_dialog_init (void) { message_queue = g_queue_new(); - msg_init(enqueue_msg); + msg_init (enqueue_msg, msg_location); } @@ -79,7 +88,7 @@ dequeue_message(gpointer data) if ( m ) { - handle_msg(m); + popup_message(m); msg_destroy(m); return TRUE; } @@ -97,8 +106,9 @@ enqueue_msg(const struct msg *msg) g_idle_add(dequeue_message, 0); } -static void -handle_msg(const struct msg *m) + +void +popup_message(const struct msg *m) { GtkWindow *parent; GtkWidget *dialog; @@ -154,13 +164,3 @@ handle_msg(const struct msg *m) gtk_widget_destroy (dialog); } -/* FIXME: This is a stub . - * A temporary workaround until getl.c is rearranged - */ -void -msg_location (struct msg_locator *loc) -{ - loc->file_name = 0; - loc->line_number = -1; -} -