gnome-commander r2137 - in branches/gcmd-1-3: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2137 - in branches/gcmd-1-3: . src
- Date: Tue, 30 Sep 2008 16:07:34 +0000 (UTC)
Author: epiotr
Date: Tue Sep 30 16:07:34 2008
New Revision: 2137
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2137&view=rev
Log:
GnomeCmdData: more C++ rework
Modified:
branches/gcmd-1-3/ChangeLog
branches/gcmd-1-3/src/gnome-cmd-data.cc
branches/gcmd-1-3/src/gnome-cmd-data.h
branches/gcmd-1-3/src/gnome-cmd-file-list.cc
branches/gcmd-1-3/src/gnome-cmd-main-win.cc
Modified: branches/gcmd-1-3/src/gnome-cmd-data.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-data.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-data.cc Tue Sep 30 16:07:34 2008
@@ -59,7 +59,6 @@
GdkInterpType icon_scale_quality;
gchar *theme_icon_dir;
gchar *document_icon_dir;
- guint fs_col_width[GnomeCmdFileList::NUM_COLUMNS];
guint bookmark_dialog_col_width[BOOKMARK_DIALOG_NUM_COLUMNS];
GtkReliefStyle btn_relief;
gboolean device_only_icon;
@@ -1116,6 +1115,7 @@
icon_size = 16;
dev_icon_size = 16;
list_row_height = 16;
+ memset(fs_col_width, 0, sizeof(fs_col_width));
gui_update_rate = DEFAULT_GUI_UPDATE_RATE;
cmdline_history = NULL;
@@ -1262,7 +1262,7 @@
for (gint i=0; i<GnomeCmdFileList::NUM_COLUMNS; i++)
{
gchar *tmp = g_strdup_printf ("/gnome-commander-size/column-widths/fs_col_width%d", i);
- priv->fs_col_width[i] = get_int (tmp, GnomeCmdFileList::get_column_default_width((GnomeCmdFileList::ColumnID) i));
+ fs_col_width[i] = get_int (tmp, GnomeCmdFileList::get_column_default_width((GnomeCmdFileList::ColumnID) i));
g_free (tmp);
}
@@ -1700,7 +1700,7 @@
for (gint i=0; i<GnomeCmdFileList::NUM_COLUMNS; i++)
{
gchar *tmp = g_strdup_printf ("/gnome-commander-size/column-widths/fs_col_width%d", i);
- gnome_config_set_int (tmp, priv->fs_col_width[i]);
+ gnome_config_set_int (tmp, fs_col_width[i]);
g_free (tmp);
}
@@ -1961,24 +1961,6 @@
}
-void gnome_cmd_data_set_fs_col_width (guint column, gint width)
-{
- if (column > GnomeCmdFileList::NUM_COLUMNS)
- return;
-
- gnome_cmd_data.priv->fs_col_width[column] = width;
-}
-
-
-gint gnome_cmd_data_get_fs_col_width (guint column)
-{
- if (column > GnomeCmdFileList::NUM_COLUMNS)
- return 0;
-
- return gnome_cmd_data.priv->fs_col_width[column];
-}
-
-
void gnome_cmd_data_set_bookmark_dialog_col_width (guint column, gint width)
{
gnome_cmd_data.priv->bookmark_dialog_col_width[column] = width;
Modified: branches/gcmd-1-3/src/gnome-cmd-data.h
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-data.h (original)
+++ branches/gcmd-1-3/src/gnome-cmd-data.h Tue Sep 30 16:07:34 2008
@@ -120,6 +120,7 @@
guint icon_size;
guint dev_icon_size;
gint list_row_height;
+ guint fs_col_width[GnomeCmdFileList::NUM_COLUMNS];
guint gui_update_rate;
GList *cmdline_history;
@@ -201,9 +202,6 @@
const gchar *gnome_cmd_data_get_document_icon_dir ();
void gnome_cmd_data_set_document_icon_dir (const gchar *dir);
-gint gnome_cmd_data_get_fs_col_width (guint column);
-void gnome_cmd_data_set_fs_col_width (guint column, gint width);
-
gint gnome_cmd_data_get_bookmark_dialog_col_width (guint column);
void gnome_cmd_data_set_bookmark_dialog_col_width (guint column, gint width);
Modified: branches/gcmd-1-3/src/gnome-cmd-file-list.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-list.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-list.cc Tue Sep 30 16:07:34 2008
@@ -545,7 +545,7 @@
for (gint i=GnomeCmdFileList::COLUMN_ICON; i<GnomeCmdFileList::NUM_COLUMNS; i++)
{
- gtk_clist_set_column_width (*fl, i, gnome_cmd_data_get_fs_col_width (i));
+ gtk_clist_set_column_width (*fl, i, gnome_cmd_data.fs_col_width[i]);
gtk_clist_set_column_justification (*fl, i, file_list_column[i].justification);
}
Modified: branches/gcmd-1-3/src/gnome-cmd-main-win.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-main-win.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-main-win.cc Tue Sep 30 16:07:34 2008
@@ -523,7 +523,7 @@
if (!column_resize_lock)
{
column_resize_lock = TRUE;
- gnome_cmd_data_set_fs_col_width ((guint) column, width);
+ gnome_cmd_data.fs_col_width[column] = width;
gtk_clist_set_column_width (other_clist, column, width);
column_resize_lock = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]