summaryrefslogtreecommitdiff
path: root/src/msg.c
diff options
context:
space:
mode:
authorGlynn Foster <glynn.foster@sun.com>2004-09-13 07:51:51 +0000
committerGlynn Foster <gman@src.gnome.org>2004-09-13 07:51:51 +0000
commit3e05834b4c23a5d5951403719b8594ff3d9fe30b (patch)
treef35532d3b2d0adb7ca74cd7c224c58c250d0ec62 /src/msg.c
parent03f3e5b060977c9566bd66bc8e4eaac14c4ee781 (diff)
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com> * data/Makefile.am, data/zenity-notification.png: Add new notification icon. * src/Makefile.am: Update for new files. * src/about.c, src/calendar.c, src/entry.c, src/fileselection.c, src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a little bit for new utility functions for setting window icons. * src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area support. * src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h: Add support for notification area. * data/zenity.1, help/*: Update docs for notification and new file selection changes.
Diffstat (limited to 'src/msg.c')
-rw-r--r--src/msg.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/msg.c b/src/msg.c
index 2728447..ffb2e53 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -83,29 +83,25 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
if (data->dialog_title)
gtk_window_set_title (GTK_WINDOW (dialog), data->dialog_title);
- if (data->window_icon)
- zenity_util_set_window_icon (dialog, data->window_icon);
- else {
- switch (msg_data->mode) {
- case ZENITY_MSG_WARNING:
- zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_WARNING);
- break;
-
- case ZENITY_MSG_QUESTION:
- zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_QUESTION);
- break;
+ switch (msg_data->mode) {
+ case ZENITY_MSG_WARNING:
+ zenity_util_set_window_icon_from_stock (dialog, data->window_icon, GTK_STOCK_DIALOG_WARNING);
+ break;
+
+ case ZENITY_MSG_QUESTION:
+ zenity_util_set_window_icon_from_stock (dialog, data->window_icon, GTK_STOCK_DIALOG_QUESTION);
+ break;
- case ZENITY_MSG_ERROR:
- zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_ERROR);
- break;
+ case ZENITY_MSG_ERROR:
+ zenity_util_set_window_icon_from_stock (dialog, data->window_icon, GTK_STOCK_DIALOG_ERROR);
+ break;
- case ZENITY_MSG_INFO:
- zenity_util_set_window_icon_from_stock (dialog, GTK_STOCK_DIALOG_INFO);
- break;
+ case ZENITY_MSG_INFO:
+ zenity_util_set_window_icon_from_stock (dialog, data->window_icon, GTK_STOCK_DIALOG_INFO);
+ break;
- default:
- break;
- }
+ default:
+ break;
}
if (data->width > -1 || data->height > -1)