gnome-commander r1943 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1943 - in trunk: . src
- Date: Tue, 5 Aug 2008 16:41:39 +0000 (UTC)
Author: epiotr
Date: Tue Aug 5 16:41:39 2008
New Revision: 1943
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1943&view=rev
Log:
Code cleanup
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-file-selector.cc
trunk/src/gnome-cmd-file-selector.h
trunk/src/gnome-cmd-file.cc
trunk/src/gnome-cmd-file.h
Modified: trunk/src/gnome-cmd-file-selector.cc
==============================================================================
--- trunk/src/gnome-cmd-file-selector.cc (original)
+++ trunk/src/gnome-cmd-file-selector.cc Tue Aug 5 16:41:39 2008
@@ -103,8 +103,8 @@
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- GnomeCmdFile *finfo = gnome_cmd_file_list_get_selected_file (fs->list);
- gnome_cmd_file_list_show_dir_size (fs->list, finfo);
+ GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fs->list);
+ gnome_cmd_file_list_show_dir_size (fs->list, f);
}
@@ -130,22 +130,22 @@
for (GList *tmp = all_files; tmp; tmp = tmp->next)
{
- GnomeCmdFile *finfo = (GnomeCmdFile *) tmp->data;
+ GnomeCmdFile *f = (GnomeCmdFile *) tmp->data;
- switch (finfo->info->type)
+ switch (f->info->type)
{
case GNOME_VFS_FILE_TYPE_DIRECTORY:
- if (strcmp(finfo->info->name, "..") != 0)
+ if (strcmp(f->info->name, "..") != 0)
{
num_dirs++;
- if (gnome_cmd_file_has_tree_size (finfo))
- total_bytes += gnome_cmd_file_get_tree_size (finfo);
+ if (gnome_cmd_file_has_tree_size (f))
+ total_bytes += gnome_cmd_file_get_tree_size (f);
}
break;
case GNOME_VFS_FILE_TYPE_REGULAR:
num_files++;
- total_bytes += finfo->info->size;
+ total_bytes += f->info->size;
break;
default:
@@ -156,19 +156,19 @@
GList *sel_files = gnome_cmd_file_list_get_marked_files (fs->list);
for (GList *tmp = sel_files; tmp; tmp = tmp->next)
{
- GnomeCmdFile *finfo = (GnomeCmdFile *) tmp->data;
+ GnomeCmdFile *f = (GnomeCmdFile *) tmp->data;
- switch (finfo->info->type)
+ switch (f->info->type)
{
case GNOME_VFS_FILE_TYPE_DIRECTORY:
num_sel_dirs++;
- if (gnome_cmd_file_has_tree_size (finfo))
- sel_bytes += gnome_cmd_file_get_tree_size (finfo);
+ if (gnome_cmd_file_has_tree_size (f))
+ sel_bytes += gnome_cmd_file_get_tree_size (f);
break;
case GNOME_VFS_FILE_TYPE_REGULAR:
num_sel_files++;
- sel_bytes += finfo->info->size;
+ sel_bytes += f->info->size;
break;
default:
@@ -247,7 +247,7 @@
}
-static gboolean file_is_wanted (GnomeCmdFileSelector *fs, GnomeVFSFileInfo *info)
+static gboolean file_is_wanted (GnomeVFSFileInfo *info)
{
if (info->type == GNOME_VFS_FILE_TYPE_UNKNOWN
&& gnome_cmd_data_get_type_filter (GNOME_VFS_FILE_TYPE_UNKNOWN))
@@ -323,10 +323,10 @@
// sort out the files to show
for (gnome_cmd_dir_get_files (dir, &list); list; list = list->next)
{
- GnomeCmdFile *finfo = GNOME_CMD_FILE (list->data);
+ GnomeCmdFile *f = GNOME_CMD_FILE (list->data);
- if (file_is_wanted (fs, finfo->info))
- list2 = g_list_append (list2, finfo);
+ if (file_is_wanted (f->info))
+ list2 = g_list_append (list2, f);
}
// Create a parent dir file (..) if appropriate
@@ -366,11 +366,11 @@
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- GnomeCmdFile *finfo = gnome_cmd_file_list_get_selected_file (GNOME_CMD_FILE_LIST (fs->list));
+ GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (GNOME_CMD_FILE_LIST (fs->list));
- if (GNOME_CMD_IS_FILE (finfo))
+ if (GNOME_CMD_IS_FILE (f))
{
- GtkWidget *dialog = gnome_cmd_make_copy_dialog_new (finfo, fs->priv->cwd);
+ GtkWidget *dialog = gnome_cmd_make_copy_dialog_new (f, fs->priv->cwd);
gtk_widget_ref (dialog);
gtk_widget_show (dialog);
@@ -407,11 +407,10 @@
GnomeCmdFileSelector *fs)
{
GtkCList *clist = GTK_CLIST (fs->list);
- GnomeCmdFile *finfo;
+ GnomeCmdFile *f;
GnomeCmdDir *to, *cwd;
GList *uri_list = NULL;
gchar *to_fn = NULL;
- int row;
GnomeVFSXferOptions xferOptions;
// Find out what operation to perform
@@ -438,7 +437,8 @@
// Find the row that the file was dropped on
y -= (clist->column_title_area.height - GTK_CONTAINER (clist)->border_width);
if (y < 0) return;
- row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->list), x, y);
+
+ int row = gnome_cmd_clist_get_row (GNOME_CMD_CLIST (fs->list), x, y);
// Transform the drag data to a list with uris
uri_list = strings_to_uris ((gchar *) selection_data->data);
@@ -449,18 +449,18 @@
to_fn = gnome_vfs_unescape_string (gnome_vfs_uri_extract_short_name (uri), 0);
}
- finfo = gnome_cmd_file_list_get_file_at_row (fs->list, row);
+ f = gnome_cmd_file_list_get_file_at_row (fs->list, row);
cwd = gnome_cmd_file_selector_get_directory (fs);
- if (finfo && finfo->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
+ if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
{
/* The drop was over a directory in the list, which means that the
* xfer should be done to that directory instead of the current one in the list
*/
- if (strcmp (finfo->info->name, "..") == 0)
+ if (strcmp (f->info->name, "..") == 0)
to = gnome_cmd_dir_get_parent (cwd);
else
- to = gnome_cmd_dir_get_child (cwd, finfo->info->name);
+ to = gnome_cmd_dir_get_child (cwd, f->info->name);
}
else
to = cwd;
@@ -606,9 +606,9 @@
if (row > -1)
{
- GnomeCmdFile *finfo = gnome_cmd_file_list_get_file_at_row (fs->list, row);
+ GnomeCmdFile *f = gnome_cmd_file_list_get_file_at_row (fs->list, row);
- if (finfo->info->type != GNOME_VFS_FILE_TYPE_DIRECTORY)
+ if (f->info->type != GNOME_VFS_FILE_TYPE_DIRECTORY)
row = -1;
gnome_cmd_clist_set_drag_row (GNOME_CMD_CLIST (clist), row);
@@ -620,15 +620,15 @@
}
-static void init_dnd (GnomeCmdFileSelector *fs)
+inline void init_dnd (GnomeCmdFileSelector *fs)
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
// Set up drag source
- gtk_signal_connect (GTK_OBJECT (fs->list), "drag_begin", GTK_SIGNAL_FUNC (drag_begin), fs);
- gtk_signal_connect (GTK_OBJECT (fs->list), "drag_end", GTK_SIGNAL_FUNC (drag_end), fs);
- gtk_signal_connect (GTK_OBJECT (fs->list), "drag_leave", GTK_SIGNAL_FUNC (drag_leave), fs);
- gtk_signal_connect (GTK_OBJECT (fs->list), "drag_data_delete", GTK_SIGNAL_FUNC (drag_data_delete), fs);
+ gtk_signal_connect (GTK_OBJECT (fs->list), "drag-begin", GTK_SIGNAL_FUNC (drag_begin), fs);
+ gtk_signal_connect (GTK_OBJECT (fs->list), "drag-end", GTK_SIGNAL_FUNC (drag_end), fs);
+ gtk_signal_connect (GTK_OBJECT (fs->list), "drag-leave", GTK_SIGNAL_FUNC (drag_leave), fs);
+ gtk_signal_connect (GTK_OBJECT (fs->list), "drag-data-delete", GTK_SIGNAL_FUNC (drag_data_delete), fs);
// Set up drag destination
gtk_drag_dest_set (GTK_WIDGET (fs->list),
@@ -636,9 +636,9 @@
drop_types, G_N_ELEMENTS (drop_types),
(GdkDragAction) (GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK));
- gtk_signal_connect (GTK_OBJECT (fs->list), "drag_motion", GTK_SIGNAL_FUNC (drag_motion), fs);
- gtk_signal_connect (GTK_OBJECT (fs->list), "drag_leave", GTK_SIGNAL_FUNC (drag_leave), fs);
- gtk_signal_connect (GTK_OBJECT (fs->list), "drag_data_received", GTK_SIGNAL_FUNC (drag_data_received), fs);
+ gtk_signal_connect (GTK_OBJECT (fs->list), "drag-motion", GTK_SIGNAL_FUNC (drag_motion), fs);
+ gtk_signal_connect (GTK_OBJECT (fs->list), "drag-leave", GTK_SIGNAL_FUNC (drag_leave), fs);
+ gtk_signal_connect (GTK_OBJECT (fs->list), "drag-data-received", GTK_SIGNAL_FUNC (drag_data_received), fs);
}
@@ -756,27 +756,27 @@
}
-static void do_file_specific_action (GnomeCmdFileSelector *fs, GnomeCmdFile *finfo)
+static void do_file_specific_action (GnomeCmdFileSelector *fs, GnomeCmdFile *f)
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- g_return_if_fail (finfo!=NULL);
- g_return_if_fail (finfo->info!=NULL);
+ g_return_if_fail (f!=NULL);
+ g_return_if_fail (f->info!=NULL);
- if (finfo->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
+ if (f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
{
gnome_cmd_file_list_invalidate_tree_size (fs->list);
- if (strcmp (finfo->info->name, "..") == 0)
+ if (strcmp (f->info->name, "..") == 0)
goto_directory (fs, "..");
else
- gnome_cmd_file_selector_set_directory (fs, GNOME_CMD_DIR (finfo));
+ gnome_cmd_file_selector_set_directory (fs, GNOME_CMD_DIR (f));
}
}
-inline gboolean file_is_in_list (GnomeCmdFileSelector *fs, GnomeCmdFile *finfo)
+inline gboolean file_is_in_list (GnomeCmdFileSelector *fs, GnomeCmdFile *f)
{
- return g_list_index (gnome_cmd_file_list_get_all_files (fs->list), finfo) != -1;
+ return g_list_index (gnome_cmd_file_list_get_all_files (fs->list), f) != -1;
}
@@ -784,12 +784,12 @@
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- GnomeCmdFile *finfo = gnome_cmd_file_list_get_selected_file (fs->list);
+ GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fs->list);
- if (finfo && gnome_cmd_data_get_cmdline_visibility ())
+ if (f && gnome_cmd_data_get_cmdline_visibility ())
{
- gchar *text = fullpath ? gnome_cmd_file_get_quoted_real_path (finfo) :
- gnome_cmd_file_get_quoted_name (finfo);
+ gchar *text = fullpath ? gnome_cmd_file_get_quoted_real_path (f) :
+ gnome_cmd_file_get_quoted_name (f);
gnome_cmd_cmdline_append_text (gnome_cmd_main_win_get_cmdline (main_win), text);
gnome_cmd_cmdline_focus (gnome_cmd_main_win_get_cmdline (main_win));
@@ -824,59 +824,59 @@
}
-static void on_dir_file_created (GnomeCmdDir *dir, GnomeCmdFile *finfo, GnomeCmdFileSelector *fs)
+static void on_dir_file_created (GnomeCmdDir *dir, GnomeCmdFile *f, GnomeCmdFileSelector *fs)
{
g_return_if_fail (GNOME_CMD_IS_DIR (dir));
- g_return_if_fail (GNOME_CMD_IS_FILE (finfo));
+ g_return_if_fail (GNOME_CMD_IS_FILE (f));
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- if (!file_is_wanted (fs, finfo->info))
+ if (!file_is_wanted (f->info))
return;
- gnome_cmd_file_list_insert_file (fs->list, finfo);
+ gnome_cmd_file_list_insert_file (fs->list, f);
update_selected_files_label (fs);
}
-static void on_dir_file_deleted (GnomeCmdDir *dir, GnomeCmdFile *finfo, GnomeCmdFileSelector *fs)
+static void on_dir_file_deleted (GnomeCmdDir *dir, GnomeCmdFile *f, GnomeCmdFileSelector *fs)
{
g_return_if_fail (GNOME_CMD_IS_DIR (dir));
- g_return_if_fail (GNOME_CMD_IS_FILE (finfo));
+ g_return_if_fail (GNOME_CMD_IS_FILE (f));
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- if (fs->priv->cwd == dir && file_is_in_list (fs, finfo))
+ if (fs->priv->cwd == dir && file_is_in_list (fs, f))
{
- gnome_cmd_file_list_remove_file (fs->list, finfo);
+ gnome_cmd_file_list_remove_file (fs->list, f);
update_selected_files_label (fs);
}
}
-static void on_dir_file_changed (GnomeCmdDir *dir, GnomeCmdFile *finfo, GnomeCmdFileSelector *fs)
+static void on_dir_file_changed (GnomeCmdDir *dir, GnomeCmdFile *f, GnomeCmdFileSelector *fs)
{
g_return_if_fail (GNOME_CMD_IS_DIR (dir));
- g_return_if_fail (GNOME_CMD_IS_FILE (finfo));
+ g_return_if_fail (GNOME_CMD_IS_FILE (f));
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- if (file_is_in_list (fs, finfo))
+ if (file_is_in_list (fs, f))
{
- gnome_cmd_file_invalidate_metadata (finfo);
- gnome_cmd_file_list_update_file (GNOME_CMD_FILE_LIST (fs->list), finfo);
+ gnome_cmd_file_invalidate_metadata (f);
+ gnome_cmd_file_list_update_file (GNOME_CMD_FILE_LIST (fs->list), f);
update_selected_files_label (fs);
}
}
-static void on_dir_file_renamed (GnomeCmdDir *dir, GnomeCmdFile *finfo, GnomeCmdFileSelector *fs)
+static void on_dir_file_renamed (GnomeCmdDir *dir, GnomeCmdFile *f, GnomeCmdFileSelector *fs)
{
g_return_if_fail (GNOME_CMD_IS_DIR (dir));
- g_return_if_fail (GNOME_CMD_IS_FILE (finfo));
+ g_return_if_fail (GNOME_CMD_IS_FILE (f));
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
- if (file_is_in_list (fs, finfo))
+ if (file_is_in_list (fs, f))
{
- // gnome_cmd_file_invalidate_metadata (finfo, TAG_FILE);
- gnome_cmd_file_list_update_file (GNOME_CMD_FILE_LIST (fs->list), finfo);
+ // gnome_cmd_file_invalidate_metadata (f, TAG_FILE);
+ gnome_cmd_file_list_update_file (GNOME_CMD_FILE_LIST (fs->list), f);
GnomeCmdFileListColumnID sort_col = gnome_cmd_file_list_get_sort_column (GNOME_CMD_FILE_LIST (fs->list));
@@ -998,11 +998,11 @@
}
-static void on_list_file_clicked (GnomeCmdFileList *fl, GnomeCmdFile *finfo, GdkEventButton *event, GnomeCmdFileSelector *fs)
+static void on_list_file_clicked (GnomeCmdFileList *fl, GnomeCmdFile *f, GdkEventButton *event, GnomeCmdFileSelector *fs)
{
if (event->type == GDK_2BUTTON_PRESS)
if (event->button == 1)
- do_file_specific_action (fs, finfo);
+ do_file_specific_action (fs, f);
}
@@ -1963,7 +1963,7 @@
g_return_val_if_fail (event != NULL, FALSE);
g_return_val_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs), FALSE);
- GnomeCmdFile *finfo;
+ GnomeCmdFile *f;
if (state_is_ctrl_shift (event->state))
{
@@ -2032,9 +2032,9 @@
return TRUE;
case GDK_Page_Down:
- finfo = gnome_cmd_file_list_get_selected_file (fs->list);
- if (finfo && finfo->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- do_file_specific_action (fs, finfo);
+ f = gnome_cmd_file_list_get_selected_file (fs->list);
+ if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
+ do_file_specific_action (fs, f);
return TRUE;
case GDK_Return:
@@ -2064,9 +2064,9 @@
case GDK_Right:
case GDK_KP_Right:
- finfo = gnome_cmd_file_list_get_selected_file (fs->list);
- if (finfo && finfo->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- do_file_specific_action (fs, finfo);
+ f = gnome_cmd_file_list_get_selected_file (fs->list);
+ if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
+ do_file_specific_action (fs, f);
stop_kp (GTK_OBJECT (fs->list));
return TRUE;
@@ -2090,11 +2090,11 @@
}
-void gnome_cmd_file_selector_create_symlink (GnomeCmdFileSelector *fs, GnomeCmdFile *finfo)
+void gnome_cmd_file_selector_create_symlink (GnomeCmdFileSelector *fs, GnomeCmdFile *f)
{
const gchar *labels[] = {_("Symlink name:")};
- gchar *fname = get_utf8 (gnome_cmd_file_get_name (finfo));
+ gchar *fname = get_utf8 (gnome_cmd_file_get_name (f));
gchar *text = g_strdup_printf (gnome_cmd_data_get_symlink_prefix (), fname);
g_free (fname);
@@ -2106,7 +2106,7 @@
gnome_cmd_string_dialog_set_value (GNOME_CMD_STRING_DIALOG (dialog), 0, text);
g_free (text);
- fs->priv->sym_file = finfo;
+ fs->priv->sym_file = f;
gtk_widget_show (dialog);
}
@@ -2119,8 +2119,8 @@
for (; files; files=files->next)
{
- GnomeCmdFile *finfo = (GnomeCmdFile *) files->data;
- gchar *fname = get_utf8 (gnome_cmd_file_get_name (finfo));
+ GnomeCmdFile *f = (GnomeCmdFile *) files->data;
+ gchar *fname = get_utf8 (gnome_cmd_file_get_name (f));
gchar *symlink_name = g_strdup_printf (gnome_cmd_data_get_symlink_prefix (), fname);
GnomeVFSURI *uri = gnome_cmd_dir_get_child_uri (fs->priv->cwd, symlink_name);
@@ -2132,7 +2132,7 @@
do
{
- result = gnome_vfs_create_symbolic_link (uri, gnome_cmd_file_get_uri_str (finfo));
+ result = gnome_vfs_create_symbolic_link (uri, gnome_cmd_file_get_uri_str (f));
if (result == GNOME_VFS_OK)
{
Modified: trunk/src/gnome-cmd-file-selector.h
==============================================================================
--- trunk/src/gnome-cmd-file-selector.h (original)
+++ trunk/src/gnome-cmd-file-selector.h Tue Aug 5 16:41:39 2008
@@ -77,8 +77,7 @@
GtkType gnome_cmd_file_selector_get_type (void);
-
-GtkWidget* gnome_cmd_file_selector_new (void);
+GtkWidget *gnome_cmd_file_selector_new (void);
GnomeCmdDir *gnome_cmd_file_selector_get_directory (GnomeCmdFileSelector *fs);
void gnome_cmd_file_selector_set_directory (GnomeCmdFileSelector *fs, GnomeCmdDir *dir);
@@ -123,7 +122,7 @@
gboolean gnome_cmd_file_selector_keypressed (GnomeCmdFileSelector *fs, GdkEventKey *event);
-void gnome_cmd_file_selector_create_symlink (GnomeCmdFileSelector *fs, GnomeCmdFile *finfo);
+void gnome_cmd_file_selector_create_symlink (GnomeCmdFileSelector *fs, GnomeCmdFile *f);
void gnome_cmd_file_selector_create_symlinks (GnomeCmdFileSelector *fs, GList *files);
void gnome_cmd_file_selector_update_conbuttons_visibility (GnomeCmdFileSelector *fs);
Modified: trunk/src/gnome-cmd-file.cc
==============================================================================
--- trunk/src/gnome-cmd-file.cc (original)
+++ trunk/src/gnome-cmd-file.cc Tue Aug 5 16:41:39 2008
@@ -57,17 +57,17 @@
};
-inline gboolean has_parent_dir (GnomeCmdFile *finfo)
+inline gboolean has_parent_dir (GnomeCmdFile *f)
{
- return finfo->priv->dir_handle && finfo->priv->dir_handle->ref;
+ return f->priv->dir_handle && f->priv->dir_handle->ref;
}
-inline GnomeCmdDir *get_parent_dir (GnomeCmdFile *finfo)
+inline GnomeCmdDir *get_parent_dir (GnomeCmdFile *f)
{
- g_return_val_if_fail (finfo->priv->dir_handle != NULL, NULL);
+ g_return_val_if_fail (f->priv->dir_handle != NULL, NULL);
- return GNOME_CMD_DIR (finfo->priv->dir_handle->ref);
+ return GNOME_CMD_DIR (f->priv->dir_handle->ref);
}
@@ -164,41 +164,41 @@
GnomeCmdFile *gnome_cmd_file_new (GnomeVFSFileInfo *info, GnomeCmdDir *dir)
{
- GnomeCmdFile *finfo = (GnomeCmdFile *) gtk_type_new (gnome_cmd_file_get_type ());
+ GnomeCmdFile *f = (GnomeCmdFile *) gtk_type_new (gnome_cmd_file_get_type ());
- gnome_cmd_file_setup (finfo, info, dir);
+ gnome_cmd_file_setup (f, info, dir);
- return finfo;
+ return f;
}
-void gnome_cmd_file_invalidate_metadata (GnomeCmdFile *finfo)
+void gnome_cmd_file_invalidate_metadata (GnomeCmdFile *f)
{
- g_return_if_fail (finfo != NULL);
+ g_return_if_fail (f != NULL);
- delete finfo->metadata;
- finfo->metadata = NULL;
+ delete f->metadata;
+ f->metadata = NULL;
}
-void gnome_cmd_file_setup (GnomeCmdFile *finfo, GnomeVFSFileInfo *info, GnomeCmdDir *dir)
+void gnome_cmd_file_setup (GnomeCmdFile *f, GnomeVFSFileInfo *info, GnomeCmdDir *dir)
{
- g_return_if_fail (finfo != NULL);
+ g_return_if_fail (f != NULL);
- finfo->info = info;
- GNOME_CMD_FILE_INFO (finfo)->info = info;
- finfo->collate_key = g_utf8_collate_key_for_filename (info->name, -1);
+ f->info = info;
+ GNOME_CMD_FILE_INFO (f)->info = info;
+ f->collate_key = g_utf8_collate_key_for_filename (info->name, -1);
if (dir)
{
- finfo->priv->dir_handle = gnome_cmd_dir_get_handle (dir);
- handle_ref (finfo->priv->dir_handle);
+ f->priv->dir_handle = gnome_cmd_dir_get_handle (dir);
+ handle_ref (f->priv->dir_handle);
- GNOME_CMD_FILE_INFO (finfo)->uri = gnome_cmd_dir_get_child_uri (dir, finfo->info->name);
- gnome_vfs_uri_ref (GNOME_CMD_FILE_INFO (finfo)->uri);
+ GNOME_CMD_FILE_INFO (f)->uri = gnome_cmd_dir_get_child_uri (dir, f->info->name);
+ gnome_vfs_uri_ref (GNOME_CMD_FILE_INFO (f)->uri);
}
- gnome_vfs_file_info_ref (finfo->info);
+ gnome_vfs_file_info_ref (f->info);
}
@@ -278,29 +278,29 @@
}
-GnomeVFSResult gnome_cmd_file_rename (GnomeCmdFile *finfo, const gchar *new_name)
+GnomeVFSResult gnome_cmd_file_rename (GnomeCmdFile *f, const gchar *new_name)
{
- g_return_val_if_fail (finfo, GNOME_VFS_ERROR_CORRUPTED_DATA);
- g_return_val_if_fail (finfo->info, GNOME_VFS_ERROR_CORRUPTED_DATA);
+ g_return_val_if_fail (f, GNOME_VFS_ERROR_CORRUPTED_DATA);
+ g_return_val_if_fail (f->info, GNOME_VFS_ERROR_CORRUPTED_DATA);
- gchar *old_uri_str = gnome_cmd_file_get_uri_str (finfo);
+ gchar *old_uri_str = gnome_cmd_file_get_uri_str (f);
- GnomeVFSFileInfo *new_info = gnome_vfs_file_info_dup (finfo->info);
+ GnomeVFSFileInfo *new_info = gnome_vfs_file_info_dup (f->info);
g_return_val_if_fail (new_info, GNOME_VFS_ERROR_CORRUPTED_DATA);
g_free (new_info->name);
new_info->name = g_strdup (new_name);
- GnomeVFSURI *uri = gnome_cmd_file_get_uri (finfo);
+ GnomeVFSURI *uri = gnome_cmd_file_get_uri (f);
GnomeVFSResult result = gnome_vfs_set_file_info_uri (uri, new_info, GNOME_VFS_SET_FILE_INFO_NAME);
gnome_vfs_uri_unref (uri);
- if (result == GNOME_VFS_OK && has_parent_dir (finfo))
+ if (result == GNOME_VFS_OK && has_parent_dir (f))
{
- gnome_cmd_file_update_info (finfo, new_info);
- gnome_cmd_dir_file_renamed (get_parent_dir (finfo), finfo, old_uri_str);
- if (GNOME_CMD_IS_DIR (finfo))
- gnome_cmd_dir_update_path (GNOME_CMD_DIR (finfo));
+ gnome_cmd_file_update_info (f, new_info);
+ gnome_cmd_dir_file_renamed (get_parent_dir (f), f, old_uri_str);
+ if (GNOME_CMD_IS_DIR (f))
+ gnome_cmd_dir_update_path (GNOME_CMD_DIR (f));
}
return result;
@@ -316,28 +316,28 @@
}
-gchar *gnome_cmd_file_get_path (GnomeCmdFile *finfo)
+gchar *gnome_cmd_file_get_path (GnomeCmdFile *f)
{
- g_return_val_if_fail (finfo != NULL, NULL);
- g_return_val_if_fail (finfo->info != NULL, NULL);
+ g_return_val_if_fail (f != NULL, NULL);
+ g_return_val_if_fail (f->info != NULL, NULL);
- if (strcmp (finfo->info->name, G_DIR_SEPARATOR_S) == 0)
+ if (strcmp (f->info->name, G_DIR_SEPARATOR_S) == 0)
return g_strdup (G_DIR_SEPARATOR_S);
GnomeCmdPath *path;
gchar *path_str;
- if (!has_parent_dir (finfo))
+ if (!has_parent_dir (f))
{
- if (GNOME_CMD_IS_DIR (finfo))
+ if (GNOME_CMD_IS_DIR (f))
{
- path = gnome_cmd_dir_get_path (GNOME_CMD_DIR (finfo));
+ path = gnome_cmd_dir_get_path (GNOME_CMD_DIR (f));
return g_strdup (gnome_cmd_path_get_path (path));
}
g_assert ("Non directory file without owning directory");
}
- path = gnome_cmd_path_get_child (gnome_cmd_dir_get_path (get_parent_dir (finfo)), finfo->info->name);
+ path = gnome_cmd_path_get_child (gnome_cmd_dir_get_path (get_parent_dir (f)), f->info->name);
path_str = g_strdup (gnome_cmd_path_get_path (path));
gtk_object_destroy (GTK_OBJECT (path));
@@ -345,9 +345,9 @@
}
-gchar *gnome_cmd_file_get_real_path (GnomeCmdFile *finfo)
+gchar *gnome_cmd_file_get_real_path (GnomeCmdFile *f)
{
- GnomeVFSURI *uri = gnome_cmd_file_get_uri (finfo);
+ GnomeVFSURI *uri = gnome_cmd_file_get_uri (f);
gchar *path = gnome_vfs_unescape_string (gnome_vfs_uri_get_path (uri), NULL);
gnome_vfs_uri_unref (uri);
@@ -356,9 +356,9 @@
}
-gchar *gnome_cmd_file_get_quoted_real_path (GnomeCmdFile *finfo)
+gchar *gnome_cmd_file_get_quoted_real_path (GnomeCmdFile *f)
{
- gchar *path = gnome_cmd_file_get_real_path (finfo);
+ gchar *path = gnome_cmd_file_get_real_path (f);
gchar *ret = path ? quote_if_needed (path) : NULL;
g_free (path);
@@ -367,9 +367,9 @@
}
-gchar *gnome_cmd_file_get_dirname (GnomeCmdFile *finfo)
+gchar *gnome_cmd_file_get_dirname (GnomeCmdFile *f)
{
- GnomeVFSURI *uri = gnome_cmd_file_get_uri (finfo);
+ GnomeVFSURI *uri = gnome_cmd_file_get_uri (f);
gchar *path = gnome_vfs_uri_extract_dirname (uri);
gnome_vfs_uri_unref (uri);
@@ -378,9 +378,9 @@
}
-gchar *gnome_cmd_file_get_unescaped_dirname (GnomeCmdFile *finfo)
+gchar *gnome_cmd_file_get_unescaped_dirname (GnomeCmdFile *f)
{
- GnomeVFSURI *uri = gnome_cmd_file_get_uri (finfo);
+ GnomeVFSURI *uri = gnome_cmd_file_get_uri (f);
gchar *path = gnome_vfs_uri_extract_dirname (uri);
gnome_vfs_uri_unref (uri);
gchar *unescaped_path = gnome_vfs_unescape_string (path, NULL);
@@ -390,31 +390,31 @@
}
-GnomeVFSURI *gnome_cmd_file_get_uri (GnomeCmdFile *finfo)
+GnomeVFSURI *gnome_cmd_file_get_uri (GnomeCmdFile *f)
{
- g_return_val_if_fail (GNOME_CMD_IS_FILE (finfo), NULL);
+ g_return_val_if_fail (GNOME_CMD_IS_FILE (f), NULL);
- if (!has_parent_dir (finfo))
+ if (!has_parent_dir (f))
{
- if (GNOME_CMD_IS_DIR (finfo))
+ if (GNOME_CMD_IS_DIR (f))
{
- GnomeCmdPath *path = gnome_cmd_dir_get_path (GNOME_CMD_DIR (finfo));
- GnomeCmdCon *con = gnome_cmd_dir_get_connection (GNOME_CMD_DIR (finfo));
+ GnomeCmdPath *path = gnome_cmd_dir_get_path (GNOME_CMD_DIR (f));
+ GnomeCmdCon *con = gnome_cmd_dir_get_connection (GNOME_CMD_DIR (f));
return gnome_cmd_con_create_uri (con, path);
}
else
g_assert ("Non directory file without owning directory");
}
- return gnome_cmd_dir_get_child_uri (get_parent_dir (finfo), finfo->info->name);
+ return gnome_cmd_dir_get_child_uri (get_parent_dir (f), f->info->name);
}
-gchar *gnome_cmd_file_get_uri_str (GnomeCmdFile *finfo, GnomeVFSURIHideOptions hide_options)
+gchar *gnome_cmd_file_get_uri_str (GnomeCmdFile *f, GnomeVFSURIHideOptions hide_options)
{
- g_return_val_if_fail (GNOME_CMD_IS_FILE (finfo), NULL);
+ g_return_val_if_fail (GNOME_CMD_IS_FILE (f), NULL);
- GnomeVFSURI *uri = gnome_cmd_file_get_uri (finfo);
+ GnomeVFSURI *uri = gnome_cmd_file_get_uri (f);
gchar *uri_str = gnome_vfs_uri_to_string (uri, hide_options);
gnome_vfs_uri_unref (uri);
@@ -570,19 +570,19 @@
}
-const gchar *gnome_cmd_file_get_type_string (GnomeCmdFile *finfo)
+const gchar *gnome_cmd_file_get_type_string (GnomeCmdFile *f)
{
static gchar type_str[MAX_TYPE_LENGTH];
- g_return_val_if_fail (finfo != NULL, NULL);
- g_return_val_if_fail (finfo->info != NULL, NULL);
+ g_return_val_if_fail (f != NULL, NULL);
+ g_return_val_if_fail (f->info != NULL, NULL);
- type2string (finfo->info->type, type_str, MAX_TYPE_LENGTH);
+ type2string (f->info->type, type_str, MAX_TYPE_LENGTH);
return type_str;
}
-const gchar *gnome_cmd_file_get_type_desc (GnomeCmdFile *finfo)
+const gchar *gnome_cmd_file_get_type_desc (GnomeCmdFile *f)
{
static const gchar *type_strings[] = {
N_("Unknown file type"),
@@ -595,87 +595,87 @@
N_("Symbolic link")
};
- g_return_val_if_fail (finfo != NULL, NULL);
- g_return_val_if_fail (finfo->info != NULL, NULL);
+ g_return_val_if_fail (f != NULL, NULL);
+ g_return_val_if_fail (f->info != NULL, NULL);
- if (!finfo->info->symlink_name)
- return type_strings[finfo->info->type];
+ if (!f->info->symlink_name)
+ return type_strings[f->info->type];
return type_strings[GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK];
}
-GdkPixmap *gnome_cmd_file_get_type_pixmap (GnomeCmdFile *finfo)
+GdkPixmap *gnome_cmd_file_get_type_pixmap (GnomeCmdFile *f)
{
- g_return_val_if_fail (finfo != NULL, NULL);
- g_return_val_if_fail (finfo->info != NULL, NULL);
+ g_return_val_if_fail (f != NULL, NULL);
+ g_return_val_if_fail (f->info != NULL, NULL);
GdkPixmap *pm;
GdkBitmap *mask;
- IMAGE_get_pixmap_and_mask (finfo->info->type, finfo->info->mime_type, finfo->info->symlink_name != NULL, &pm, &mask);
+ IMAGE_get_pixmap_and_mask (f->info->type, f->info->mime_type, f->info->symlink_name != NULL, &pm, &mask);
return pm;
}
-GdkBitmap *gnome_cmd_file_get_type_mask (GnomeCmdFile *finfo)
+GdkBitmap *gnome_cmd_file_get_type_mask (GnomeCmdFile *f)
{
- g_return_val_if_fail (finfo != NULL, NULL);
- g_return_val_if_fail (finfo->info != NULL, NULL);
+ g_return_val_if_fail (f != NULL, NULL);
+ g_return_val_if_fail (f->info != NULL, NULL);
GdkPixmap *pm;
GdkBitmap *mask;
- IMAGE_get_pixmap_and_mask (finfo->info->type, finfo->info->mime_type, finfo->info->symlink_name != NULL, &pm, &mask);
+ IMAGE_get_pixmap_and_mask (f->info->type, f->info->mime_type, f->info->symlink_name != NULL, &pm, &mask);
return mask;
}
-const gchar *gnome_cmd_file_get_mime_type (GnomeCmdFile *finfo)
+const gchar *gnome_cmd_file_get_mime_type (GnomeCmdFile *f)
{
- g_return_val_if_fail (finfo != NULL, NULL);
- g_return_val_if_fail (finfo->info != NULL, NULL);
+ g_return_val_if_fail (f != NULL, NULL);
+ g_return_val_if_fail (f->info != NULL, NULL);
- return gnome_vfs_file_info_get_mime_type (finfo->info);
+ return gnome_vfs_file_info_get_mime_type (f->info);
}
-const gchar *gnome_cmd_file_get_mime_type_desc (GnomeCmdFile *finfo)
+const gchar *gnome_cmd_file_get_mime_type_desc (GnomeCmdFile *f)
{
- g_return_val_if_fail (finfo != NULL, NULL);
- g_return_val_if_fail (finfo->info != NULL, NULL);
+ g_return_val_if_fail (f != NULL, NULL);
+ g_return_val_if_fail (f->info != NULL, NULL);
- return finfo->info->mime_type ? gnome_vfs_mime_get_description (finfo->info->mime_type) : NULL;
+ return f->info->mime_type ? gnome_vfs_mime_get_description (f->info->mime_type) : NULL;
}
-gboolean gnome_cmd_file_has_mime_type (GnomeCmdFile *finfo, const gchar *mime_type)
+gboolean gnome_cmd_file_has_mime_type (GnomeCmdFile *f, const gchar *mime_type)
{
- g_return_val_if_fail (finfo != NULL, FALSE);
- g_return_val_if_fail (finfo->info != NULL, FALSE);
- g_return_val_if_fail (finfo->info->mime_type != NULL, FALSE);
+ g_return_val_if_fail (f != NULL, FALSE);
+ g_return_val_if_fail (f->info != NULL, FALSE);
+ g_return_val_if_fail (f->info->mime_type != NULL, FALSE);
g_return_val_if_fail (mime_type != NULL, FALSE);
- return strcmp (finfo->info->mime_type, mime_type) == 0;
+ return strcmp (f->info->mime_type, mime_type) == 0;
}
-gboolean gnome_cmd_file_mime_begins_with (GnomeCmdFile *finfo, const gchar *mime_type_start)
+gboolean gnome_cmd_file_mime_begins_with (GnomeCmdFile *f, const gchar *mime_type_start)
{
- g_return_val_if_fail (finfo != NULL, FALSE);
- g_return_val_if_fail (finfo->info != NULL, FALSE);
- g_return_val_if_fail (finfo->info->mime_type != NULL, FALSE);
+ g_return_val_if_fail (f != NULL, FALSE);
+ g_return_val_if_fail (f->info != NULL, FALSE);
+ g_return_val_if_fail (f->info->mime_type != NULL, FALSE);
g_return_val_if_fail (mime_type_start != NULL, FALSE);
- return strncmp (finfo->info->mime_type, mime_type_start, strlen(mime_type_start)) == 0;
+ return strncmp (f->info->mime_type, mime_type_start, strlen(mime_type_start)) == 0;
}
-void gnome_cmd_file_show_properties (GnomeCmdFile *finfo)
+void gnome_cmd_file_show_properties (GnomeCmdFile *f)
{
- GtkWidget *dialog = gnome_cmd_file_props_dialog_create (finfo);
+ GtkWidget *dialog = gnome_cmd_file_props_dialog_create (f);
if (!dialog) return;
gtk_widget_ref (dialog);
@@ -719,30 +719,30 @@
}
-void gnome_cmd_file_view (GnomeCmdFile *finfo, gint internal_viewer)
+void gnome_cmd_file_view (GnomeCmdFile *f, gint internal_viewer)
{
- g_return_if_fail (finfo != NULL);
- g_return_if_fail (has_parent_dir (finfo));
+ g_return_if_fail (f != NULL);
+ g_return_if_fail (has_parent_dir (f));
gchar *path_str;
GnomeCmdPath *path;
GnomeVFSURI *src_uri, *dest_uri;
// If the file is local there is no need to download it
- if (gnome_cmd_dir_is_local (get_parent_dir (finfo)))
+ if (gnome_cmd_dir_is_local (get_parent_dir (f)))
{
- gchar *fpath = gnome_cmd_file_get_real_path (finfo);
+ gchar *fpath = gnome_cmd_file_get_real_path (f);
do_view_file (fpath, internal_viewer);
g_free (fpath);
return;
}
// The file is remote, let's download it to a temporary file first
- path_str = get_temp_download_filepath (gnome_cmd_file_get_name (finfo));
+ path_str = get_temp_download_filepath (gnome_cmd_file_get_name (f));
if (!path_str) return;
path = gnome_cmd_plain_path_new (path_str);
- src_uri = gnome_cmd_file_get_uri (finfo);
+ src_uri = gnome_cmd_file_get_uri (f);
dest_uri = gnome_cmd_con_create_uri (get_home_con (), path);
g_printerr ("Copying to: %s\n", path_str);
@@ -757,15 +757,15 @@
}
-void gnome_cmd_file_edit (GnomeCmdFile *finfo)
+void gnome_cmd_file_edit (GnomeCmdFile *f)
{
- g_return_if_fail (finfo != NULL);
+ g_return_if_fail (f != NULL);
- if (!gnome_cmd_file_is_local (finfo))
+ if (!gnome_cmd_file_is_local (f))
return;
- gchar *fpath = gnome_cmd_file_get_quoted_real_path (finfo);
- gchar *dpath = gnome_cmd_file_get_unescaped_dirname (finfo);
+ gchar *fpath = gnome_cmd_file_get_quoted_real_path (f);
+ gchar *dpath = gnome_cmd_file_get_unescaped_dirname (f);
gchar *command = g_strdup_printf (gnome_cmd_data_get_editor (), fpath);
run_command_indir (command, dpath, FALSE);
@@ -776,91 +776,91 @@
}
-void gnome_cmd_file_show_cap_cut (GnomeCmdFile *finfo)
+void gnome_cmd_file_show_cap_cut (GnomeCmdFile *f)
{
}
-void gnome_cmd_file_show_cap_copy (GnomeCmdFile *finfo)
+void gnome_cmd_file_show_cap_copy (GnomeCmdFile *f)
{
}
-void gnome_cmd_file_show_cap_paste (GnomeCmdFile *finfo)
+void gnome_cmd_file_show_cap_paste (GnomeCmdFile *f)
{
}
-void gnome_cmd_file_update_info (GnomeCmdFile *finfo, GnomeVFSFileInfo *info)
+void gnome_cmd_file_update_info (GnomeCmdFile *f, GnomeVFSFileInfo *info)
{
- g_return_if_fail (finfo != NULL);
+ g_return_if_fail (f != NULL);
g_return_if_fail (info != NULL);
- g_free (finfo->collate_key);
- gnome_vfs_file_info_unref (finfo->info);
+ g_free (f->collate_key);
+ gnome_vfs_file_info_unref (f->info);
gnome_vfs_file_info_ref (info);
- finfo->info = info;
- finfo->collate_key = g_utf8_collate_key_for_filename (info->name, -1);
+ f->info = info;
+ f->collate_key = g_utf8_collate_key_for_filename (info->name, -1);
}
-gboolean gnome_cmd_file_is_local (GnomeCmdFile *finfo)
+gboolean gnome_cmd_file_is_local (GnomeCmdFile *f)
{
- g_return_val_if_fail (GNOME_CMD_IS_FILE (finfo), FALSE);
+ g_return_val_if_fail (GNOME_CMD_IS_FILE (f), FALSE);
- return gnome_cmd_dir_is_local (get_parent_dir (finfo));
+ return gnome_cmd_dir_is_local (get_parent_dir (f));
}
-gboolean gnome_cmd_file_is_executable (GnomeCmdFile *finfo)
+gboolean gnome_cmd_file_is_executable (GnomeCmdFile *f)
{
- g_return_val_if_fail (GNOME_CMD_IS_FILE (finfo), FALSE);
+ g_return_val_if_fail (GNOME_CMD_IS_FILE (f), FALSE);
- if (finfo->info->type != GNOME_VFS_FILE_TYPE_REGULAR)
+ if (f->info->type != GNOME_VFS_FILE_TYPE_REGULAR)
return FALSE;
- if (!gnome_cmd_file_is_local (finfo))
+ if (!gnome_cmd_file_is_local (f))
return FALSE;
user_t *user = OWNER_get_program_user ();
if (!user)
return FALSE;
- if (user->uid == finfo->info->uid
- && finfo->info->permissions & GNOME_VFS_PERM_USER_EXEC)
+ if (user->uid == f->info->uid
+ && f->info->permissions & GNOME_VFS_PERM_USER_EXEC)
return TRUE;
- if (user->gid == finfo->info->gid
- && finfo->info->permissions & GNOME_VFS_PERM_GROUP_EXEC)
+ if (user->gid == f->info->gid
+ && f->info->permissions & GNOME_VFS_PERM_GROUP_EXEC)
return TRUE;
- if (finfo->info->permissions & GNOME_VFS_PERM_OTHER_EXEC)
+ if (f->info->permissions & GNOME_VFS_PERM_OTHER_EXEC)
return TRUE;
return FALSE;
}
-void gnome_cmd_file_is_deleted (GnomeCmdFile *finfo)
+void gnome_cmd_file_is_deleted (GnomeCmdFile *f)
{
- g_return_if_fail (GNOME_CMD_IS_FILE (finfo));
+ g_return_if_fail (GNOME_CMD_IS_FILE (f));
- if (has_parent_dir (finfo))
+ if (has_parent_dir (f))
{
- gchar *uri_str = gnome_cmd_file_get_uri_str (finfo);
- gnome_cmd_dir_file_deleted (get_parent_dir (finfo), uri_str);
+ gchar *uri_str = gnome_cmd_file_get_uri_str (f);
+ gnome_cmd_dir_file_deleted (get_parent_dir (f), uri_str);
g_free (uri_str);
}
}
-void gnome_cmd_file_execute (GnomeCmdFile *finfo)
+void gnome_cmd_file_execute (GnomeCmdFile *f)
{
- gchar *fpath = gnome_cmd_file_get_real_path (finfo);
+ gchar *fpath = gnome_cmd_file_get_real_path (f);
gchar *dpath = g_path_get_dirname (fpath);
- gchar *cmd = g_strdup_printf ("./%s", finfo->info->name);
+ gchar *cmd = g_strdup_printf ("./%s", f->info->name);
- run_command_indir (cmd, dpath, app_needs_terminal (finfo));
+ run_command_indir (cmd, dpath, app_needs_terminal (f));
g_free (fpath);
g_free (dpath);
@@ -980,17 +980,17 @@
}
-void gnome_cmd_file_invalidate_tree_size (GnomeCmdFile *finfo)
+void gnome_cmd_file_invalidate_tree_size (GnomeCmdFile *f)
{
- g_return_if_fail (GNOME_CMD_IS_FILE (finfo));
+ g_return_if_fail (GNOME_CMD_IS_FILE (f));
- finfo->priv->tree_size = -1;
+ f->priv->tree_size = -1;
}
-gboolean gnome_cmd_file_has_tree_size (GnomeCmdFile *finfo)
+gboolean gnome_cmd_file_has_tree_size (GnomeCmdFile *f)
{
- g_return_val_if_fail (finfo != NULL, FALSE);
+ g_return_val_if_fail (f != NULL, FALSE);
- return finfo->priv->tree_size != -1;
+ return f->priv->tree_size != -1;
}
Modified: trunk/src/gnome-cmd-file.h
==============================================================================
--- trunk/src/gnome-cmd-file.h (original)
+++ trunk/src/gnome-cmd-file.h Tue Aug 5 16:41:39 2008
@@ -56,16 +56,16 @@
GtkType gnome_cmd_file_get_type (void);
GnomeCmdFile *gnome_cmd_file_new (GnomeVFSFileInfo *info, GnomeCmdDir *dir);
-void gnome_cmd_file_setup (GnomeCmdFile *finfo, GnomeVFSFileInfo *info, GnomeCmdDir *dir);
+void gnome_cmd_file_setup (GnomeCmdFile *f, GnomeVFSFileInfo *info, GnomeCmdDir *dir);
-void gnome_cmd_file_invalidate_metadata (GnomeCmdFile *finfo);
+void gnome_cmd_file_invalidate_metadata (GnomeCmdFile *f);
-void gnome_cmd_file_ref (GnomeCmdFile *finfo);
-void gnome_cmd_file_unref (GnomeCmdFile *finfo);
+void gnome_cmd_file_ref (GnomeCmdFile *f);
+void gnome_cmd_file_unref (GnomeCmdFile *f);
-GnomeVFSResult gnome_cmd_file_chmod (GnomeCmdFile *finfo, GnomeVFSFilePermissions perm);
-GnomeVFSResult gnome_cmd_file_chown (GnomeCmdFile *finfo, uid_t uid, gid_t gid);
-GnomeVFSResult gnome_cmd_file_rename (GnomeCmdFile *finfo, const gchar *new_name);
+GnomeVFSResult gnome_cmd_file_chmod (GnomeCmdFile *f, GnomeVFSFilePermissions perm);
+GnomeVFSResult gnome_cmd_file_chown (GnomeCmdFile *f, uid_t uid, gid_t gid);
+GnomeVFSResult gnome_cmd_file_rename (GnomeCmdFile *f, const gchar *new_name);
inline gchar *gnome_cmd_file_get_name (GnomeCmdFile *file)
{
@@ -77,42 +77,42 @@
gchar *gnome_cmd_file_get_quoted_name (GnomeCmdFile *file);
-gchar *gnome_cmd_file_get_path (GnomeCmdFile *finfo);
-gchar *gnome_cmd_file_get_real_path (GnomeCmdFile *finfo);
-gchar *gnome_cmd_file_get_quoted_real_path (GnomeCmdFile *finfo);
-gchar *gnome_cmd_file_get_dirname (GnomeCmdFile *finfo);
-gchar *gnome_cmd_file_get_unescaped_dirname (GnomeCmdFile *finfo);
-GnomeVFSURI *gnome_cmd_file_get_uri (GnomeCmdFile *finfo);
-gchar *gnome_cmd_file_get_uri_str (GnomeCmdFile *finfo, GnomeVFSURIHideOptions hide_options=GNOME_VFS_URI_HIDE_NONE);
-
-const gchar *gnome_cmd_file_get_extension (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_owner (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_group (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_adate (GnomeCmdFile *finfo, gboolean overide_disp_setting);
-const gchar *gnome_cmd_file_get_mdate (GnomeCmdFile *finfo, gboolean overide_disp_setting);
-const gchar *gnome_cmd_file_get_cdate (GnomeCmdFile *finfo, gboolean overide_disp_setting);
-const gchar *gnome_cmd_file_get_size (GnomeCmdFile *finfo);
-GnomeVFSFileSize gnome_cmd_file_get_tree_size (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_tree_size_as_str (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_perm (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_mime_type_desc (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_mime_type (GnomeCmdFile *finfo);
-gboolean gnome_cmd_file_has_mime_type (GnomeCmdFile *finfo, const gchar *mime_type);
-gboolean gnome_cmd_file_mime_begins_with (GnomeCmdFile *finfo, const gchar *mime_type_start);
-
-const gchar *gnome_cmd_file_get_type_string (GnomeCmdFile *finfo);
-const gchar *gnome_cmd_file_get_type_desc (GnomeCmdFile *finfo);
-GdkPixmap *gnome_cmd_file_get_type_pixmap (GnomeCmdFile *finfo);
-GdkBitmap *gnome_cmd_file_get_type_mask (GnomeCmdFile *finfo);
+gchar *gnome_cmd_file_get_path (GnomeCmdFile *f);
+gchar *gnome_cmd_file_get_real_path (GnomeCmdFile *f);
+gchar *gnome_cmd_file_get_quoted_real_path (GnomeCmdFile *f);
+gchar *gnome_cmd_file_get_dirname (GnomeCmdFile *f);
+gchar *gnome_cmd_file_get_unescaped_dirname (GnomeCmdFile *f);
+GnomeVFSURI *gnome_cmd_file_get_uri (GnomeCmdFile *f);
+gchar *gnome_cmd_file_get_uri_str (GnomeCmdFile *f, GnomeVFSURIHideOptions hide_options=GNOME_VFS_URI_HIDE_NONE);
+
+const gchar *gnome_cmd_file_get_extension (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_owner (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_group (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_adate (GnomeCmdFile *f, gboolean overide_disp_setting);
+const gchar *gnome_cmd_file_get_mdate (GnomeCmdFile *f, gboolean overide_disp_setting);
+const gchar *gnome_cmd_file_get_cdate (GnomeCmdFile *f, gboolean overide_disp_setting);
+const gchar *gnome_cmd_file_get_size (GnomeCmdFile *f);
+GnomeVFSFileSize gnome_cmd_file_get_tree_size (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_tree_size_as_str (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_perm (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_mime_type_desc (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_mime_type (GnomeCmdFile *f);
+gboolean gnome_cmd_file_has_mime_type (GnomeCmdFile *f, const gchar *mime_type);
+gboolean gnome_cmd_file_mime_begins_with (GnomeCmdFile *f, const gchar *mime_type_start);
+
+const gchar *gnome_cmd_file_get_type_string (GnomeCmdFile *f);
+const gchar *gnome_cmd_file_get_type_desc (GnomeCmdFile *f);
+GdkPixmap *gnome_cmd_file_get_type_pixmap (GnomeCmdFile *f);
+GdkBitmap *gnome_cmd_file_get_type_mask (GnomeCmdFile *f);
-void gnome_cmd_file_show_properties (GnomeCmdFile *finfo);
+void gnome_cmd_file_show_properties (GnomeCmdFile *f);
void gnome_cmd_file_show_chown_dialog (GList *files);
void gnome_cmd_file_show_chmod_dialog (GList *files);
-void gnome_cmd_file_view (GnomeCmdFile *finfo, gint internal_viewer);
-void gnome_cmd_file_edit (GnomeCmdFile *finfo);
-void gnome_cmd_file_show_cap_cut (GnomeCmdFile *finfo);
-void gnome_cmd_file_show_cap_copy (GnomeCmdFile *finfo);
-void gnome_cmd_file_show_cap_paste (GnomeCmdFile *finfo);
+void gnome_cmd_file_view (GnomeCmdFile *f, gint internal_viewer);
+void gnome_cmd_file_edit (GnomeCmdFile *f);
+void gnome_cmd_file_show_cap_cut (GnomeCmdFile *f);
+void gnome_cmd_file_show_cap_copy (GnomeCmdFile *f);
+void gnome_cmd_file_show_cap_paste (GnomeCmdFile *f);
//FIXME: These names suck when we have a class called GnomeCmdFileList...
GList *gnome_cmd_file_list_copy (GList *files);
@@ -120,16 +120,16 @@
void gnome_cmd_file_list_ref (GList *files);
void gnome_cmd_file_list_unref (GList *files);
-void gnome_cmd_file_update_info (GnomeCmdFile *finfo, GnomeVFSFileInfo *info);
-gboolean gnome_cmd_file_is_local (GnomeCmdFile *finfo);
-gboolean gnome_cmd_file_is_executable (GnomeCmdFile *finfo);
-void gnome_cmd_file_is_deleted (GnomeCmdFile *finfo);
-void gnome_cmd_file_execute (GnomeCmdFile *finfo);
+void gnome_cmd_file_update_info (GnomeCmdFile *f, GnomeVFSFileInfo *info);
+gboolean gnome_cmd_file_is_local (GnomeCmdFile *f);
+gboolean gnome_cmd_file_is_executable (GnomeCmdFile *f);
+void gnome_cmd_file_is_deleted (GnomeCmdFile *f);
+void gnome_cmd_file_execute (GnomeCmdFile *f);
-gboolean gnome_cmd_file_needs_update (GnomeCmdFile *finfo);
+gboolean gnome_cmd_file_needs_update (GnomeCmdFile *f);
//misc tree size functions
-void gnome_cmd_file_invalidate_tree_size (GnomeCmdFile *finfo);
-gboolean gnome_cmd_file_has_tree_size (GnomeCmdFile *finfo);
+void gnome_cmd_file_invalidate_tree_size (GnomeCmdFile *f);
+gboolean gnome_cmd_file_has_tree_size (GnomeCmdFile *f);
#endif // __GNOME_CMD_FILE_H__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]