# HG changeset patch # User zas_ # Date 1211367613 0 # Node ID eda074e91dddd10361943acd1d8e6a8b175b38a9 # Parent 9973edfd86f6762c81022bee218468fc9149e1ed Use G_DIR_SEPARATOR_S where applicable. diff -r 9973edfd86f6 -r eda074e91ddd src/filedata.c --- a/src/filedata.c Wed May 21 10:52:38 2008 +0000 +++ b/src/filedata.c Wed May 21 11:00:13 2008 +0000 @@ -139,7 +139,7 @@ static void file_data_set_path(FileData *fd, const gchar *path) { - if (strcmp(path, "/") == 0) + if (strcmp(path, G_DIR_SEPARATOR_S) == 0) { fd->path = g_strdup(path); fd->name = fd->path; diff -r 9973edfd86f6 -r eda074e91ddd src/layout.c --- a/src/layout.c Wed May 21 10:52:38 2008 +0000 +++ b/src/layout.c Wed May 21 11:00:13 2008 +0000 @@ -150,7 +150,7 @@ { gint pos = -1; /* put the '/' back, if we are in tab completion for a dir and result was path change */ - gtk_editable_insert_text(GTK_EDITABLE(lw->path_entry), "/", -1, &pos); + gtk_editable_insert_text(GTK_EDITABLE(lw->path_entry), G_DIR_SEPARATOR_S, -1, &pos); gtk_editable_set_position(GTK_EDITABLE(lw->path_entry), strlen(gtk_entry_get_text(GTK_ENTRY(lw->path_entry)))); } diff -r 9973edfd86f6 -r eda074e91ddd src/pan-view.c --- a/src/pan-view.c Wed May 21 10:52:38 2008 +0000 +++ b/src/pan-view.c Wed May 21 11:00:13 2008 +0000 @@ -1162,7 +1162,7 @@ { if (!path) return; - if (strcmp(path, "/") == 0) + if (strcmp(path, G_DIR_SEPARATOR_S) == 0) { pan_warning_folder(path, pw->window); return; @@ -2570,7 +2570,7 @@ GtkWidget *ct_button; gint hide_dlg; - if (path && strcmp(path, "/") == 0) + if (path && strcmp(path, G_DIR_SEPARATOR_S) == 0) { pan_warning_folder(path, NULL); return TRUE; diff -r 9973edfd86f6 -r eda074e91ddd src/ui_bookmark.c --- a/src/ui_bookmark.c Wed May 21 10:52:38 2008 +0000 +++ b/src/ui_bookmark.c Wed May 21 11:00:13 2008 +0000 @@ -503,7 +503,7 @@ static gchar *bookmark_string(const gchar *name, const gchar *path, const gchar *icon) { if (!name) name = _("New Bookmark"); - if (icon && strncmp(icon, "/", 1) != 0) icon = NULL; + if (icon && strncmp(icon, G_DIR_SEPARATOR_S, 1) != 0) icon = NULL; if (icon) { diff -r 9973edfd86f6 -r eda074e91ddd src/ui_pathsel.c --- a/src/ui_pathsel.c Wed May 21 10:52:38 2008 +0000 +++ b/src/ui_pathsel.c Wed May 21 11:00:13 2008 +0000 @@ -1214,7 +1214,7 @@ else { gchar *buf = remove_level_from_path(path); - if (buf && buf[0] == '/' && isdir(buf)) + if (buf && buf[0] == G_DIR_SEPARATOR && isdir(buf)) { dest_populate(dd, buf); } @@ -1223,7 +1223,7 @@ gint pos = -1; dest_populate(dd, (gchar *)homedir()); - if (path) gtk_editable_insert_text(GTK_EDITABLE(dd->entry), "/", -1, &pos); + if (path) gtk_editable_insert_text(GTK_EDITABLE(dd->entry), G_DIR_SEPARATOR_S, -1, &pos); if (path) gtk_editable_insert_text(GTK_EDITABLE(dd->entry), path, -1, &pos); } g_free(buf); diff -r 9973edfd86f6 -r eda074e91ddd src/view_dir.c --- a/src/view_dir.c Wed May 21 10:52:38 2008 +0000 +++ b/src/view_dir.c Wed May 21 11:00:13 2008 +0000 @@ -356,7 +356,7 @@ ViewDir *vd = data; gchar *path; - if (!vd->path || strcmp(vd->path, "/") == 0) return; + if (!vd->path || strcmp(vd->path, G_DIR_SEPARATOR_S) == 0) return; path = remove_level_from_path(vd->path); if (vd->select_func) @@ -585,7 +585,7 @@ G_CALLBACK(vd_popup_destroy_cb), vd); menu_item_add_stock_sensitive(menu, _("_Up to parent"), GTK_STOCK_GO_UP, - (vd->path && strcmp(vd->path, "/") != 0), + (vd->path && strcmp(vd->path, G_DIR_SEPARATOR_S) != 0), G_CALLBACK(vd_pop_menu_up_cb), vd); menu_item_add_divider(menu); diff -r 9973edfd86f6 -r eda074e91ddd src/view_dir_tree.c --- a/src/view_dir_tree.c Wed May 21 10:52:38 2008 +0000 +++ b/src/view_dir_tree.c Wed May 21 11:00:13 2008 +0000 @@ -231,7 +231,7 @@ list = g_list_reverse(list); - list = g_list_prepend(list, g_strdup("/")); + list = g_list_prepend(list, g_strdup(G_DIR_SEPARATOR_S)); return list; } @@ -895,7 +895,7 @@ static void vdtree_setup_root(ViewDir *vd) { - const gchar *path = "/"; + const gchar *path = G_DIR_SEPARATOR_S; FileData *fd;