[gnome-commander] Replacing obsoleted g_basename() with g_path_get_basename()



commit 4aa05370a1b7afd45cea07e702b0f6b3d727e4dc
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Jul 4 22:55:08 2011 +0200

    Replacing obsoleted g_basename() with g_path_get_basename()

 src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc |    2 +-
 src/gnome-cmd-prepare-xfer-dialog.cc             |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc b/src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc
index 39883ea..5ec193c 100644
--- a/src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc
+++ b/src/dialogs/gnome-cmd-manage-bookmarks-dialog.cc
@@ -534,7 +534,7 @@ void gnome_cmd_bookmark_add_current (GnomeCmdDir *dir)
         return;
     }
 
-    gchar *name = g_strdup (g_basename (path));
+    gchar *name = g_path_get_basename (path);
 
     if (gnome_cmd_edit_bookmark_dialog (NULL, _("New Bookmark"), name, path))
     {
diff --git a/src/gnome-cmd-prepare-xfer-dialog.cc b/src/gnome-cmd-prepare-xfer-dialog.cc
index ee2a65a..5205268 100644
--- a/src/gnome-cmd-prepare-xfer-dialog.cc
+++ b/src/gnome-cmd-prepare-xfer-dialog.cc
@@ -122,7 +122,7 @@ static void on_ok (GtkButton *button, GnomeCmdPrepareXferDialog *dialog)
                 gchar *t = g_path_get_dirname (dest_path);
                 dest_dir = gnome_cmd_dir_new (con, gnome_cmd_con_create_path (con, t));
                 g_free (t);
-                dest_fn = g_strdup (g_basename (dest_path));
+                dest_fn = g_path_get_basename (dest_path);
             }
             else
             {
@@ -134,7 +134,7 @@ static void on_ok (GtkButton *button, GnomeCmdPrepareXferDialog *dialog)
                     // yup, xfer to it
                     dest_dir = gnome_cmd_dir_new (con, gnome_cmd_con_create_path (con, parent_dir));
                     g_free (parent_dir);
-                    dest_fn = g_strdup (g_basename (dest_path));
+                    dest_fn = g_path_get_basename (dest_path);
                 }
                 else
                     if (res == GNOME_VFS_OK)
@@ -166,7 +166,7 @@ static void on_ok (GtkButton *button, GnomeCmdPrepareXferDialog *dialog)
 
                         dest_dir = gnome_cmd_dir_new (con, gnome_cmd_con_create_path (con, parent_dir));
                         g_free (parent_dir);
-                        dest_fn = g_strdup (g_basename (dest_path));
+                        dest_fn = g_path_get_basename (dest_path);
                     }
             }
     }



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