summaryrefslogtreecommitdiff
path: root/mate-dictionary/src/gdict-common.c
diff options
context:
space:
mode:
authorLaurent Napias <[email protected]>2019-06-29 11:57:35 +0200
committerZenWalker <[email protected]>2019-07-04 15:07:12 +0200
commit61b94ba9a4953aba56764dac7e0f8751aaa11571 (patch)
treec9097e01f74035b305fd47190a7f0d1bb1eb188e /mate-dictionary/src/gdict-common.c
parent34505eb50fb6f3b49c8ef08d59bcef4f6f27f6cf (diff)
downloadmate-utils-61b94ba9a4953aba56764dac7e0f8751aaa11571.tar.bz2
mate-utils-61b94ba9a4953aba56764dac7e0f8751aaa11571.tar.xz
Remove trailing whitespaces
Diffstat (limited to 'mate-dictionary/src/gdict-common.c')
-rw-r--r--mate-dictionary/src/gdict-common.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/mate-dictionary/src/gdict-common.c b/mate-dictionary/src/gdict-common.c
index 1686a87e..7c0b3063 100644
--- a/mate-dictionary/src/gdict-common.c
+++ b/mate-dictionary/src/gdict-common.c
@@ -48,7 +48,7 @@ gdict_get_data_dir (void)
"mate",
"mate-dictionary",
NULL);
-
+
return retval;
}
@@ -57,7 +57,7 @@ gboolean
gdict_create_data_dir (void)
{
gchar *data_dir_name;
-
+
data_dir_name = gdict_get_data_dir ();
if (g_mkdir_with_parents (data_dir_name, 0700) == -1)
{
@@ -68,7 +68,7 @@ gdict_create_data_dir (void)
(g_file_test (data_dir_name, G_FILE_TEST_IS_REGULAR)))
{
gchar *backup = g_strdup_printf ("%s.pre-2-14", data_dir_name);
-
+
if (g_rename (data_dir_name, backup) == -1)
{
GtkWidget *error_dialog;
@@ -81,9 +81,9 @@ gdict_create_data_dir (void)
data_dir_name,
backup,
g_strerror (errno));
-
+
gtk_dialog_run (GTK_DIALOG (error_dialog));
-
+
gtk_widget_destroy (error_dialog);
g_free (backup);
g_free (data_dir_name);
@@ -92,11 +92,11 @@ gdict_create_data_dir (void)
}
g_free (backup);
-
+
if (g_mkdir_with_parents (data_dir_name, 0700) == -1)
{
GtkWidget *error_dialog;
-
+
error_dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
@@ -104,9 +104,9 @@ gdict_create_data_dir (void)
_("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_free (data_dir_name);
@@ -115,7 +115,7 @@ gdict_create_data_dir (void)
goto success;
}
-
+
if (errno != EEXIST)
{
GtkWidget *error_dialog;
@@ -127,9 +127,9 @@ gdict_create_data_dir (void)
_("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_free (data_dir_name);
@@ -150,26 +150,26 @@ gdict_show_error_dialog (GtkWindow *parent,
const gchar *detail)
{
GtkWidget *dialog;
-
+
g_return_if_fail ((parent == NULL) || (GTK_IS_WINDOW (parent)));
g_return_if_fail (message != NULL);
-
+
dialog = gtk_message_dialog_new (parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
"%s", message);
gtk_window_set_title (GTK_WINDOW (dialog), "");
-
+
if (detail)
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", detail);
-
+
if (parent && gtk_window_get_group (parent))
gtk_window_group_add_window (gtk_window_get_group (parent), GTK_WINDOW (dialog));
-
+
gtk_dialog_run (GTK_DIALOG (dialog));
-
+
gtk_widget_destroy (dialog);
}
@@ -181,9 +181,9 @@ gdict_show_gerror_dialog (GtkWindow *parent,
g_return_if_fail ((parent == NULL) || (GTK_IS_WINDOW (parent)));
g_return_if_fail (message != NULL);
g_return_if_fail (error != NULL);
-
+
gdict_show_error_dialog (parent, message, error->message);
-
+
g_error_free (error);
error = NULL;
}