[gnome-games] quadrapassel: Better error message if clutter fails to init
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] quadrapassel: Better error message if clutter fails to init
- Date: Thu, 17 Mar 2011 22:23:01 +0000 (UTC)
commit 888d85f36e7729776b277690cafa34d4a0547194
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date: Thu Mar 17 23:22:50 2011 +0100
quadrapassel: Better error message if clutter fails to init
quadrapassel/main.cpp | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/quadrapassel/main.cpp b/quadrapassel/main.cpp
index 3c1a4cd..f2a8da5 100644
--- a/quadrapassel/main.cpp
+++ b/quadrapassel/main.cpp
@@ -69,8 +69,15 @@ main(int argc, char *argv[])
games_conf_initialise ("Quadrapassel");
- if (gtk_clutter_init_with_args (NULL, NULL, NULL, NULL, NULL, &error) != CLUTTER_INIT_SUCCESS) {
- g_printerr ("Failed to initialise clutter: %s\n", error->message);
+ if (gtk_clutter_init_with_args (NULL, NULL, NULL, NULL, NULL, &error) != CLUTTER_INIT_SUCCESS || error) {
+ GtkWidget *dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_NONE,
+ "Unable to initialize Clutter:\n%s", error->message);
+ gtk_window_set_title (GTK_WINDOW (dialog), g_get_application_name ());
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
g_error_free (error);
return 1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]