Search
lxdream.org :: lxdream/src/gui/gtkui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/gtkui.c
changeset 447:3e095bfcb476
prev437:2c259474b474
next450:207461e79f21
author nkeynes
date Tue Oct 16 12:36:29 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Add gui error reporting
Add initial controller settings dialog
file annotate diff log raw
1.1 --- a/src/gui/gtkui.c Thu Oct 11 08:22:03 2007 +0000
1.2 +++ b/src/gui/gtkui.c Tue Oct 16 12:36:29 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: gtkui.c,v 1.2 2007-10-11 08:22:03 nkeynes Exp $
1.6 + * $Id: gtkui.c,v 1.3 2007-10-16 12:36:29 nkeynes Exp $
1.7 *
1.8 * Core GTK-based user interface
1.9 *
1.10 @@ -70,6 +70,25 @@
1.11 gtk_main();
1.12 }
1.13
1.14 +gboolean gui_error_dialog( const char *msg, ... )
1.15 +{
1.16 + if( main_win != NULL ) {
1.17 + va_list args;
1.18 + GtkWidget *dialog =
1.19 + gtk_message_dialog_new( main_window_get_frame(main_win), GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
1.20 + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, NULL );
1.21 + va_start(args, msg);
1.22 + gchar *markup = g_markup_vprintf_escaped( msg, args );
1.23 + va_end( args );
1.24 + gtk_message_dialog_set_markup( GTK_MESSAGE_DIALOG(dialog), markup );
1.25 + g_free(markup);
1.26 + gtk_dialog_run(GTK_DIALOG(dialog));
1.27 + gtk_widget_destroy(dialog);
1.28 + return TRUE;
1.29 + }
1.30 + return FALSE;
1.31 +}
1.32 +
1.33 void gui_update_io_activity( io_activity_type io, gboolean active )
1.34 {
1.35
.