gnome-commander r2123 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2123 - in trunk: . src
- Date: Fri, 26 Sep 2008 17:30:51 +0000 (UTC)
Author: epiotr
Date: Fri Sep 26 17:30:50 2008
New Revision: 2123
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2123&view=rev
Log:
gnome_cmd_file_list_focus_file() -> GnomeCmdFileList::focus_file()
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-file-list.cc
trunk/src/gnome-cmd-file-list.h
trunk/src/gnome-cmd-file-props-dialog.cc
trunk/src/gnome-cmd-file-selector.cc
trunk/src/gnome-cmd-mkdir-dialog.cc
trunk/src/gnome-cmd-rename-dialog.cc
trunk/src/gnome-cmd-search-dialog.cc
Modified: trunk/src/gnome-cmd-file-list.cc
==============================================================================
--- trunk/src/gnome-cmd-file-list.cc (original)
+++ trunk/src/gnome-cmd-file-list.cc Fri Sep 26 17:30:50 2008
@@ -1645,35 +1645,33 @@
}
-void gnome_cmd_file_list_focus_file (GnomeCmdFileList *fl, const gchar *focus_file, gboolean scroll_to_file)
+void GnomeCmdFileList::focus_file(const gchar *focus_file, gboolean scroll_to_file)
{
- g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
-
- for (GList *tmp = fl->get_visible_files(); tmp; tmp = tmp->next)
+ for (GList *tmp = get_visible_files(); tmp; tmp = tmp->next)
{
- GnomeCmdFile *finfo = (GnomeCmdFile *) tmp->data;
+ GnomeCmdFile *f = (GnomeCmdFile *) tmp->data;
- 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);
- gint row = get_row_from_file (fl, finfo);
+ gint row = get_row_from_file (this, f);
if (row == -1)
return;
- if (strcmp (finfo->info->name, focus_file) == 0)
+ if (strcmp (f->info->name, focus_file) == 0)
{
- fl->priv->cur_file = row;
- focus_file_at_row (fl, row);
+ priv->cur_file = row;
+ focus_file_at_row (this, row);
if (scroll_to_file)
- gtk_clist_moveto (*fl, row, 0, 0, 0);
+ gtk_clist_moveto (*this, row, 0, 0, 0);
return;
}
}
/* The file was not found, remember the filename in case the file gets
added to the list in the future (after a FAM event etc). */
- g_free (fl->priv->focus_later);
- fl->priv->focus_later = g_strdup (focus_file);
+ g_free (priv->focus_later);
+ priv->focus_later = g_strdup (focus_file);
}
Modified: trunk/src/gnome-cmd-file-list.h
==============================================================================
--- trunk/src/gnome-cmd-file-list.h (original)
+++ trunk/src/gnome-cmd-file-list.h Fri Sep 26 17:30:50 2008
@@ -99,6 +99,7 @@
void restore_selection();
void select_row(gint row);
+ void focus_file(const gchar *focus_file, gboolean scroll_to_file=TRUE);
void toggle();
void toggle_and_step();
@@ -180,8 +181,6 @@
return !f || strcmp (f->info->name, "..") == 0 ? NULL : f;
}
-void gnome_cmd_file_list_focus_file (GnomeCmdFileList *fl, const gchar *focus_file, gboolean scroll_to_file);
-
void gnome_cmd_file_list_compare_directories (GnomeCmdFileList *fl1, GnomeCmdFileList *fl2);
GnomeCmdFile *gnome_cmd_file_list_get_file_at_row (GnomeCmdFileList *fl, gint row);
Modified: trunk/src/gnome-cmd-file-props-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-file-props-dialog.cc (original)
+++ trunk/src/gnome-cmd-file-props-dialog.cc Fri Sep 26 17:30:50 2008
@@ -219,7 +219,7 @@
result = gnome_cmd_file_rename (data->finfo, filename);
if (result==GNOME_VFS_OK)
- gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list(), filename, TRUE);
+ gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list()->focus_file(filename, TRUE);
}
if (result == GNOME_VFS_OK)
Modified: trunk/src/gnome-cmd-file-selector.cc
==============================================================================
--- trunk/src/gnome-cmd-file-selector.cc (original)
+++ trunk/src/gnome-cmd-file-selector.cc Fri Sep 26 17:30:50 2008
@@ -716,7 +716,7 @@
// focus the current dir when going back to the parent dir
if (focus_dir)
- gnome_cmd_file_list_focus_file (file_list(), focus_dir, FALSE);
+ file_list()->focus_file(focus_dir, FALSE);
g_free (dir);
}
Modified: trunk/src/gnome-cmd-mkdir-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-mkdir-dialog.cc (original)
+++ trunk/src/gnome-cmd-mkdir-dialog.cc Fri Sep 26 17:30:50 2008
@@ -120,7 +120,7 @@
string mkdir_uri_str = stringify (gnome_vfs_uri_to_string (mkdir_uri, GNOME_VFS_URI_HIDE_NONE));
gnome_cmd_dir_file_created (dialog->priv->dir, mkdir_uri_str.c_str());
- gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list(), focus_filename.c_str(), TRUE);
+ gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list()->focus_file(focus_filename.c_str(), TRUE);
new_dir_focused = TRUE;
}
}
Modified: trunk/src/gnome-cmd-rename-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-rename-dialog.cc (original)
+++ trunk/src/gnome-cmd-rename-dialog.cc Fri Sep 26 17:30:50 2008
@@ -62,7 +62,7 @@
GnomeVFSResult result = gnome_cmd_file_rename (dialog->priv->finfo, new_fname);
if (result==GNOME_VFS_OK)
- gnome_cmd_file_list_focus_file (gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list(), new_fname, TRUE);
+ gnome_cmd_main_win_get_fs (main_win, ACTIVE)->file_list()->focus_file(new_fname, TRUE);
gnome_cmd_file_unref (dialog->priv->finfo);
gtk_widget_destroy (widget);
Modified: trunk/src/gnome-cmd-search-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-search-dialog.cc (original)
+++ trunk/src/gnome-cmd-search-dialog.cc Fri Sep 26 17:30:50 2008
@@ -644,7 +644,7 @@
GnomeCmdFileSelector *fs = gnome_cmd_main_win_get_fs (main_win, ACTIVE);
fs->goto_directory(dpath);
- gnome_cmd_file_list_focus_file (fs->file_list(), gnome_cmd_file_get_name (finfo), TRUE);
+ fs->file_list()->focus_file(gnome_cmd_file_get_name (finfo), TRUE);
g_free (fpath);
g_free (dpath);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]