projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Encapsulated msg_location inside msg_emit
[pspp]
/
src
/
ui
/
gui
/
message-dialog.c
diff --git
a/src/ui/gui/message-dialog.c
b/src/ui/gui/message-dialog.c
index 45d34dfc93a3aadb5bc0f494022d9174410a6123..af1886c98a7f619fdd5706259ebf21d4548dcb48 100644
(file)
--- a/
src/ui/gui/message-dialog.c
+++ b/
src/ui/gui/message-dialog.c
@@
-42,17
+42,26
@@
extern GladeXML *xml;
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 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();
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 )
{
if ( m )
{
-
handle_msg
(m);
+
popup_message
(m);
msg_destroy(m);
return TRUE;
}
msg_destroy(m);
return TRUE;
}
@@
-97,8
+106,9
@@
enqueue_msg(const struct msg *msg)
g_idle_add(dequeue_message, 0);
}
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;
{
GtkWindow *parent;
GtkWidget *dialog;
@@
-154,13
+164,3
@@
handle_msg(const struct msg *m)
gtk_widget_destroy (dialog);
}
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;
-}
-