[gnome-commander] noop: code cleanup



commit 13ea0c4a45ad9c7c63eab77ee4d73ea02204fc30
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Apr 23 00:22:58 2011 +0200

    noop: code cleanup

 src/gnome-cmd-con-device.cc    |   35 ++++++++++++++++-------------------
 src/gnome-cmd-con.cc           |    2 +-
 src/gnome-cmd-file.cc          |    2 +-
 src/gnome-cmd-search-dialog.cc |   12 ++++++------
 4 files changed, 24 insertions(+), 27 deletions(-)
---
diff --git a/src/gnome-cmd-con-device.cc b/src/gnome-cmd-con-device.cc
index b590c36..0d3f562 100644
--- a/src/gnome-cmd-con-device.cc
+++ b/src/gnome-cmd-con-device.cc
@@ -122,10 +122,10 @@ static void do_mount_thread_func (GnomeCmdCon *con)
                     emsg = NULL;
                     break;
                 case 1:
-                    emsg = g_strdup (_("Mount failed: Permission denied"));
+                    emsg = g_strdup (_("Mount failed: permission denied"));
                     break;
                 case 32:
-                    emsg = g_strdup (_("Mount failed: No medium found"));
+                    emsg = g_strdup (_("Mount failed: no medium found"));
                     break;
                 default:
                     emsg = g_strdup_printf (_("Mount failed: mount exited with existatus %d"), estatus);
@@ -190,28 +190,25 @@ static void dev_vfs_umount_callback (gboolean succeeded, char *error, char *deta
 {
     GtkWidget *msgbox;
 
-    DEBUG('m', "VFS Umount Callback: %s %s %s\n", succeeded ? "Succeeded" : "Failed",
+    DEBUG('m', "VFS umount callback: %s %s %s\n", succeeded ? "succeeded" : "failed",
                error ? error : "",
                detailed_error ? detailed_error : "");
 
     if (succeeded)
-    {
-            msgbox = gtk_message_dialog_new (*main_win,
-                            GTK_DIALOG_MODAL,
-                            GTK_MESSAGE_INFO,
-                            GTK_BUTTONS_OK,
-                            _("Device is now safe to remove"));
-    }
+        msgbox = gtk_message_dialog_new (*main_win,
+                                         GTK_DIALOG_MODAL,
+                                         GTK_MESSAGE_INFO,
+                                         GTK_BUTTONS_OK,
+                                         _("Device is now safe to remove"));
     else
-    {
-            msgbox = gtk_message_dialog_new (*main_win,
-                            GTK_DIALOG_MODAL,
-                            GTK_MESSAGE_ERROR,
-                            GTK_BUTTONS_OK,
-                            _("Cannot unmount the volume:\n%s %s"),
-                            error ? error : _("Unknown error"),
-                            detailed_error ? detailed_error: "");
-    }
+        msgbox = gtk_message_dialog_new (*main_win,
+                                         GTK_DIALOG_MODAL,
+                                         GTK_MESSAGE_ERROR,
+                                         GTK_BUTTONS_OK,
+                                         _("Cannot unmount the volume:\n%s %s"),
+                                         error ? error : _("Unknown error"),
+                                         detailed_error ? detailed_error: "");
+
     gtk_dialog_run (GTK_DIALOG (msgbox));
     gtk_widget_destroy (msgbox);
 }
diff --git a/src/gnome-cmd-con.cc b/src/gnome-cmd-con.cc
index cdb3fc1..7b8320e 100644
--- a/src/gnome-cmd-con.cc
+++ b/src/gnome-cmd-con.cc
@@ -71,7 +71,7 @@ static void on_open_done (GnomeCmdCon *con)
 
 static void on_open_failed (GnomeCmdCon *con, const gchar *msg, GnomeVFSResult result)
 {
-    //gnome_cmd_con_updated (con);
+    // gnome_cmd_con_updated (con);
 }
 
 
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 0940cc9..2e78873 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -175,7 +175,7 @@ GnomeCmdFile *gnome_cmd_file_new_from_uri (GnomeVFSURI *uri)
     }
 
     GnomeVFSURI *parent = gnome_vfs_uri_get_parent (uri);
-    gchar *parent_path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path(parent), "");
+    gchar *parent_path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (parent), NULL);
     GnomeCmdDir *dir = gnome_cmd_dir_new (get_home_con(), new GnomeCmdPlainPath(parent_path));
 
     g_free (parent_path);
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index ff56cb4..08c022a 100755
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -782,7 +782,7 @@ static void gnome_cmd_search_dialog_init (GnomeCmdSearchDialog *dialog)
     gtk_table_set_col_spacings (GTK_TABLE (table), 6);
     gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0);
 
-    // Search for
+    // search for
     dialog->priv->pattern_combo = create_combo_box_entry (window);
     label = create_label_with_mnemonic (window, _("Search _for: "), dialog->priv->pattern_combo);
     table_add (table, label, 0, 0, GTK_FILL);
@@ -794,7 +794,7 @@ static void gnome_cmd_search_dialog_init (GnomeCmdSearchDialog *dialog)
     gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->priv->pattern_combo), 0);
     gnome_cmd_dialog_editable_enters (GNOME_CMD_DIALOG (dialog), GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (dialog->priv->pattern_combo))));
 
-    // Search in
+    // search in
     dialog->priv->dir_browser = create_file_entry (window, "dir_browser", "");
     label = create_label_with_mnemonic (window, _("Search _in: "), dialog->priv->dir_browser);
     table_add (table, label, 0, 1, GTK_FILL);
@@ -810,13 +810,13 @@ static void gnome_cmd_search_dialog_init (GnomeCmdSearchDialog *dialog)
     hbox = create_hbox (window, FALSE, 0);
 
 
-    // Recurse check
+    // recurse check
     dialog->priv->recurse_check = create_check_with_mnemonic (window, _("Search _recursively"), "recurse_check");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->priv->recurse_check), defaults.default_profile.recursive);
     gtk_box_pack_start (GTK_BOX (hbox), dialog->priv->recurse_check, FALSE, FALSE, 0);
 
 
-    // File name matching
+    // file name matching
     radio = create_radio_with_mnemonic (window, NULL, _("Rege_x syntax"), "regex_radio");
     gtk_box_pack_end (GTK_BOX (hbox), radio, FALSE, FALSE, 12);
     if (gnome_cmd_data.filter_type == Filter::TYPE_REGEX)
@@ -829,7 +829,7 @@ static void gnome_cmd_search_dialog_init (GnomeCmdSearchDialog *dialog)
     table_add (table, hbox, 1, 2, GTK_FILL);
 
 
-    // Find text
+    // find text
     dialog->priv->find_text_check = create_check_with_mnemonic (window, _("Find _text: "), "find_text");
     table_add (table, dialog->priv->find_text_check, 0, 3, GTK_FILL);
 
@@ -842,7 +842,7 @@ static void gnome_cmd_search_dialog_init (GnomeCmdSearchDialog *dialog)
     gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->priv->find_text_combo), 0);
     gnome_cmd_dialog_editable_enters (GNOME_CMD_DIALOG (dialog), GTK_EDITABLE (gtk_bin_get_child (GTK_BIN (dialog->priv->find_text_combo))));
 
-    // Case check
+    // case check
     dialog->priv->case_check = create_check_with_mnemonic (window, _("Case sensiti_ve"), "case_check");
     gtk_table_attach (GTK_TABLE (table), dialog->priv->case_check, 1, 2, 4, 5,
                       (GtkAttachOptions) (GTK_FILL),



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