summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-03-02 16:22:05 -0500
committerDavid Zeuthen <davidz@redhat.com>2009-03-02 16:22:05 -0500
commit44a449f651994b08b0695c0cd40b4f01817f217b (patch)
tree11c535c1f3cd3738eb875d5094c9798fc5fb872d
parent172ba2fe3e621e8be664a8f294eeafb4999e0459 (diff)
downloadgnome-disk-utility-44a449f651994b08b0695c0cd40b4f01817f217b.tar.gz
gnome-disk-utility-44a449f651994b08b0695c0cd40b4f01817f217b.tar.xz
gnome-disk-utility-44a449f651994b08b0695c0cd40b4f01817f217b.zip
add a nag dialog0.2
http://people.freedesktop.org/~david/gdu-nag.png
-rw-r--r--src/palimpsest/gdu-main.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/palimpsest/gdu-main.c b/src/palimpsest/gdu-main.c
index c3e6654..676e72d 100644
--- a/src/palimpsest/gdu-main.c
+++ b/src/palimpsest/gdu-main.c
@@ -27,6 +27,35 @@
#include "gdu-shell.h"
+static gboolean
+show_nag_dialog (GtkWidget *toplevel)
+{
+ GtkWidget *dialog;
+ gint response;
+ gboolean ret;
+
+ ret = TRUE;
+
+ dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (toplevel),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ _("<b><big>WARNING WARNING WARNING</big></b>"));
+ gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog),
+ _("The Palimpsest Disk Utility is still under development and "
+ "may still have bugs that can lead to data loss.\n"
+ "\n"
+ "Use at your own risk."));
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ if (response != GTK_RESPONSE_OK)
+ ret = FALSE;
+
+ gtk_widget_destroy (dialog);
+
+ return ret;
+}
+
int
main (int argc, char **argv)
{
@@ -40,8 +69,12 @@ main (int argc, char **argv)
gtk_widget_show_all (gdu_shell_get_toplevel (shell));
gdu_shell_update (shell);
+ if (!show_nag_dialog (gdu_shell_get_toplevel (shell)))
+ goto out;
+
gtk_main ();
+ out:
g_object_unref (shell);
return 0;
}