[gnome-utils] dictionary: Remove error dialogs



commit 9efc3688c2c333abe2ee3fc325dffa011e5c83f6
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Sat Jan 29 18:57:49 2011 +0000

    dictionary: Remove error dialogs
    
    When creating the private data storage directory we should not bother
    the user with error messages for which he or she won't be able to do
    anything about anyway.

 gnome-dictionary/src/gdict-common.c |   53 ++++++++--------------------------
 1 files changed, 13 insertions(+), 40 deletions(-)
---
diff --git a/gnome-dictionary/src/gdict-common.c b/gnome-dictionary/src/gdict-common.c
index 4503126..35ec8d1 100644
--- a/gnome-dictionary/src/gdict-common.c
+++ b/gnome-dictionary/src/gdict-common.c
@@ -71,20 +71,11 @@ gdict_create_data_dir (void)
 	      
 	  if (g_rename (data_dir_name, backup) == -1)
 	    {
-              GtkWidget *error_dialog;
-
-	      error_dialog = gtk_message_dialog_new (NULL,
-                                                     GTK_DIALOG_MODAL,
-						     GTK_MESSAGE_ERROR,
-						     GTK_BUTTONS_CLOSE,
-						     _("Unable to rename file '%s' to '%s': %s"),
-						     data_dir_name,
-						     backup,
-						     g_strerror (errno));
-	      
-	      gtk_dialog_run (GTK_DIALOG (error_dialog));
-	      
-	      gtk_widget_destroy (error_dialog);
+              g_critical ("Unable to rename file '%s' to '%s': %s",
+                          data_dir_name,
+                          backup,
+                          g_strerror (errno));
+
 	      g_free (backup);
 	      g_free (data_dir_name);
 
@@ -95,19 +86,10 @@ gdict_create_data_dir (void)
 	  
           if (g_mkdir (data_dir_name, 0700) == -1)
             {
-              GtkWidget *error_dialog;
-	      
-	      error_dialog = gtk_message_dialog_new (NULL,
-						     GTK_DIALOG_MODAL,
-						     GTK_MESSAGE_ERROR,
-						     GTK_BUTTONS_CLOSE,
-						     _("Unable to create the data directory '%s': %s"),
-						     data_dir_name,
-						     g_strerror (errno));
-	      
-	      gtk_dialog_run (GTK_DIALOG (error_dialog));
-	      
-	      gtk_widget_destroy (error_dialog);
+              g_critical ("Unable to create the data directory '%s': %s",
+                          data_dir_name,
+                          g_strerror (errno));
+
               g_free (data_dir_name);
 
 	      return FALSE;
@@ -118,19 +100,10 @@ gdict_create_data_dir (void)
       
       if (errno != EEXIST)
         {
-          GtkWidget *error_dialog;
-
-	  error_dialog = gtk_message_dialog_new (NULL,
-						 GTK_DIALOG_MODAL,
-						 GTK_MESSAGE_ERROR,
-						 GTK_BUTTONS_CLOSE,
-						 _("Unable to create the data directory '%s': %s"),
-						 data_dir_name,
-						 g_strerror (errno));
-	  
-	  gtk_dialog_run (GTK_DIALOG (error_dialog));
-	  
-	  gtk_widget_destroy (error_dialog);
+          g_critical ("Unable to create the data directory '%s': %s",
+                      data_dir_name,
+                      g_strerror (errno));
+
 	  g_free (data_dir_name);
 
 	  return FALSE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]