Author: akv
Date: 2010-12-29 00:16:52 +0100 (Wed, 29 Dec 2010)
New Revision: 3706

Modified:
   trunk/src/gtk-interface.c
Log:
Showing error dialog on startup if we cannot make sqlite database - you should 
NEVER see this unless your ~/.rawstudio directory is read-only and sqlite 
database isn't created.

Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c   2010-12-28 23:14:02 UTC (rev 3705)
+++ trunk/src/gtk-interface.c   2010-12-28 23:16:52 UTC (rev 3706)
@@ -1572,6 +1572,16 @@
        RSProfileFactory *factory = rs_profile_factory_new_default();
        factory = NULL;
 
+       RSLibrary *library = rs_library_get_singleton();
+       if (!rs_library_has_database_connection(library))
+       {
+               GtkWidget *dialog = 
gui_dialog_make_from_text(GTK_STOCK_DIALOG_ERROR, "Could not initialize sqlite 
database:", rs_library_get_init_error_msg(library));
+               gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, 
GTK_RESPONSE_ACCEPT);
+               gtk_widget_show_all(dialog);
+               gtk_dialog_run(GTK_DIALOG(dialog));
+               gtk_widget_destroy(dialog);
+       }
+
        gui_set_busy(FALSE);
        gdk_threads_enter();
        gtk_main();


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to