diff options
Diffstat (limited to 'src/libaudgui/status.cc')
-rw-r--r-- | src/libaudgui/status.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libaudgui/status.cc b/src/libaudgui/status.cc index fa04fd3..6ba9b3c 100644 --- a/src/libaudgui/status.cc +++ b/src/libaudgui/status.cc @@ -27,7 +27,7 @@ static GtkWidget * progress_window; static GtkWidget * progress_label, * progress_label_2; -static GtkWidget * error_window; +static GtkWidget * error_window, * info_window; static void create_progress_window () { @@ -85,12 +85,18 @@ static void show_error (void * data, void * user) audgui_simple_message (& error_window, GTK_MESSAGE_ERROR, _("Error"), (const char *) data); } +static void show_info (void * data, void * user) +{ + audgui_simple_message (& info_window, GTK_MESSAGE_INFO, _("Information"), (const char *) data); +} + void status_init () { hook_associate ("ui show progress", show_progress, nullptr); hook_associate ("ui show progress 2", show_progress_2, nullptr); hook_associate ("ui hide progress", hide_progress, nullptr); hook_associate ("ui show error", show_error, nullptr); + hook_associate ("ui show info", show_info, nullptr); } void status_cleanup () @@ -99,9 +105,12 @@ void status_cleanup () hook_dissociate ("ui show progress 2", show_progress_2); hook_dissociate ("ui hide progress", hide_progress); hook_dissociate ("ui show error", show_error); + hook_dissociate ("ui show info", show_info); if (progress_window) gtk_widget_destroy (progress_window); if (error_window) gtk_widget_destroy (error_window); + if (info_window) + gtk_widget_destroy (info_window); } |