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;
{
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))));
}
{
if (!path) return;
- if (strcmp(path, "/") == 0)
+ if (strcmp(path, G_DIR_SEPARATOR_S) == 0)
{
pan_warning_folder(path, pw->window);
return;
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;
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)
{
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);
}
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);
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)
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);
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;
}
static void vdtree_setup_root(ViewDir *vd)
{
- const gchar *path = "/";
+ const gchar *path = G_DIR_SEPARATOR_S;
FileData *fd;