gnome-commander r1728 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1728 - in trunk: . src
- Date: Fri, 25 Apr 2008 23:20:47 +0100 (BST)
Author: epiotr
Date: Fri Apr 25 22:20:47 2008
New Revision: 1728
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1728&view=rev
Log:
Added gnome_cmd_file_list_get_column_default_width() function
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-data.cc
trunk/src/gnome-cmd-file-list.cc
trunk/src/gnome-cmd-file-list.h
Modified: trunk/src/gnome-cmd-data.cc
==============================================================================
--- trunk/src/gnome-cmd-data.cc (original)
+++ trunk/src/gnome-cmd-data.cc Fri Apr 25 22:20:47 2008
@@ -1444,7 +1444,7 @@
for (gint i=0; i<FILE_LIST_NUM_COLUMNS; i++)
{
gchar *tmp = g_strdup_printf ("/gnome-commander-size/column-widths/fs_col_width%d", i);
- data->priv->fs_col_width[i] = get_int (tmp, file_list_column[i].default_width);
+ data->priv->fs_col_width[i] = get_int (tmp, gnome_cmd_file_list_get_column_default_width ((GnomeCmdFileListColumnID) i));
g_free (tmp);
}
Modified: trunk/src/gnome-cmd-file-list.cc
==============================================================================
--- trunk/src/gnome-cmd-file-list.cc (original)
+++ trunk/src/gnome-cmd-file-list.cc Fri Apr 25 22:20:47 2008
@@ -75,6 +75,18 @@
static guint file_list_signals[LAST_SIGNAL] = { 0 };
+
+typedef struct
+{
+ guint id;
+ const gchar *title;
+ guint default_width;
+ GtkJustification justification;
+ gboolean default_sort_direction;
+ GCompareDataFunc sort_func;
+} GnomeCmdFileListColumn;
+
+
static gint sort_by_name (GnomeCmdFile *f1, GnomeCmdFile *f2, GnomeCmdFileList *fl);
static gint sort_by_ext (GnomeCmdFile *f1, GnomeCmdFile *f2, GnomeCmdFileList *fl);
static gint sort_by_dir (GnomeCmdFile *f1, GnomeCmdFile *f2, GnomeCmdFileList *fl);
@@ -1300,6 +1312,12 @@
}
+guint gnome_cmd_file_list_get_column_default_width (GnomeCmdFileListColumnID col)
+{
+ return file_list_column[col].default_width;
+}
+
+
GnomeCmdFileListColumnID gnome_cmd_file_list_get_sort_column (GnomeCmdFileList *fl)
{
g_return_val_if_fail (GNOME_CMD_IS_FILE_LIST (fl), FILE_LIST_COLUMN_ICON);
Modified: trunk/src/gnome-cmd-file-list.h
==============================================================================
--- trunk/src/gnome-cmd-file-list.h (original)
+++ trunk/src/gnome-cmd-file-list.h Fri Apr 25 22:20:47 2008
@@ -89,18 +89,6 @@
enum {FILE_LIST_SORT_ASCENDING=FALSE, FILE_LIST_SORT_DESCENDING=TRUE};
-typedef struct
-{
- guint id;
- const gchar *title;
- guint default_width;
- GtkJustification justification;
- gboolean default_sort_direction;
- GCompareDataFunc sort_func;
-} GnomeCmdFileListColumn;
-
-
-extern GnomeCmdFileListColumn file_list_column[];
extern GtkTargetEntry drag_types[];
extern GtkTargetEntry drop_types[];
@@ -117,6 +105,7 @@
}
GnomeCmdFileListColumnID gnome_cmd_file_list_get_sort_column (GnomeCmdFileList *fl);
+guint gnome_cmd_file_list_get_column_default_width (GnomeCmdFileListColumnID col);
void gnome_cmd_file_list_update_style (GnomeCmdFileList *fl);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]