[gnome-commander/gcmd-1-3] GnomeCmdFileList: removed superfluous code
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander/gcmd-1-3] GnomeCmdFileList: removed superfluous code
- Date: Sat, 11 Jul 2009 18:24:51 +0000 (UTC)
commit 4cbf1b15d116be5f1a4f95bd9f10e594a727bda9
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sat Jul 11 18:34:16 2009 +0200
GnomeCmdFileList: removed superfluous code
src/gnome-cmd-cmdline.cc | 2 +-
src/gnome-cmd-file-selector.cc | 11 +++++------
src/gnome-cmd-file-selector.h | 1 -
3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-cmd-cmdline.cc b/src/gnome-cmd-cmdline.cc
index 3898e45..87e4038 100644
--- a/src/gnome-cmd-cmdline.cc
+++ b/src/gnome-cmd-cmdline.cc
@@ -562,7 +562,7 @@ gboolean gnome_cmd_cmdline_keypressed (GnomeCmdCmdline *cmdline, GdkEventKey *ev
gboolean ret;
GdkEventKey event2 = *event;
GnomeCmdFileSelector *fs = gnome_cmd_main_win_get_fs (main_win, ACTIVE);
- GtkWidget *file_list = fs->list_widget;
+ GtkWidget *file_list = *fs->file_list();
gtk_widget_grab_focus (file_list);
fs->set_active(TRUE);
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 641329d..6986e03 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1178,9 +1178,8 @@ static void init (GnomeCmdFileSelector *fs)
// create the list
fs->file_list() = new GnomeCmdFileList; // FIXME: file_list() = ...
- fs->list_widget = GTK_WIDGET (fs->file_list());
- gtk_widget_ref (fs->list_widget);
- gtk_object_set_data_full (GTK_OBJECT (fs), "list_widget", fs->list_widget, (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_ref (*fs->file_list());
+ gtk_object_set_data_full (GTK_OBJECT (fs), "list_widget", fs->file_list(), (GtkDestroyNotify) gtk_widget_unref);
fs->file_list()->show_column(GnomeCmdFileList::COLUMN_DIR, FALSE);
// create the connection combo
@@ -1226,7 +1225,7 @@ static void init (GnomeCmdFileSelector *fs)
// pack the widgets
gtk_box_pack_start (GTK_BOX (fs), fs->con_hbox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), fs->dir_indicator, FALSE, FALSE, 0);
- gtk_container_add (GTK_CONTAINER (fs->scrolledwindow), fs->list_widget);
+ gtk_container_add (GTK_CONTAINER (fs->scrolledwindow), *fs->file_list());
gtk_box_pack_start (GTK_BOX (vbox), fs->scrolledwindow, TRUE, TRUE, 0);
padding = create_hbox (*fs, FALSE, 6);
gtk_box_pack_start (GTK_BOX (vbox), padding, FALSE, TRUE, 0);
@@ -1261,7 +1260,7 @@ static void init (GnomeCmdFileSelector *fs)
gtk_widget_show (fs->vol_label);
gtk_widget_show (fs->dir_indicator);
gtk_widget_show (fs->scrolledwindow);
- gtk_widget_show (fs->list_widget);
+ gtk_widget_show (*fs->file_list());
gtk_widget_show (fs->info_label);
fs->update_style();
@@ -1434,7 +1433,7 @@ void GnomeCmdFileSelector::set_active(gboolean value)
if (value)
{
- gtk_widget_grab_focus (list_widget);
+ gtk_widget_grab_focus (*file_list());
list->select_row(GTK_CLIST (list)->focus_row);
}
else
diff --git a/src/gnome-cmd-file-selector.h b/src/gnome-cmd-file-selector.h
index 79dbb9b..e38ee57 100644
--- a/src/gnome-cmd-file-selector.h
+++ b/src/gnome-cmd-file-selector.h
@@ -51,7 +51,6 @@ struct GnomeCmdFileSelector
GtkWidget *dir_label;
GtkWidget *scrolledwindow;
GtkWidget *info_label;
- GtkWidget *list_widget;
GtkWidget *con_combo;
GtkWidget *vol_label;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]