gnome-commander r2121 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2121 - in trunk: . src
- Date: Fri, 26 Sep 2008 17:23:54 +0000 (UTC)
Author: epiotr
Date: Fri Sep 26 17:23:54 2008
New Revision: 2121
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2121&view=rev
Log:
GnomeCmdData: more C++ rework
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-con-device.cc
trunk/src/gnome-cmd-con-ftp.cc
trunk/src/gnome-cmd-con-home.cc
trunk/src/gnome-cmd-con-smb.cc
trunk/src/gnome-cmd-data.cc
trunk/src/gnome-cmd-data.h
trunk/src/gnome-cmd-options-dialog.cc
trunk/src/imageloader.cc
Modified: trunk/src/gnome-cmd-con-device.cc
==============================================================================
--- trunk/src/gnome-cmd-con-device.cc (original)
+++ trunk/src/gnome-cmd-con-device.cc Fri Sep 26 17:23:54 2008
@@ -471,7 +471,7 @@
if (icon_path)
{
- guint dev_icon_size = gnome_cmd_data_get_dev_icon_size ();
+ guint dev_icon_size = gnome_cmd_data.dev_icon_size;
con->go_pixmap = gnome_cmd_pixmap_new_from_file (icon_path, dev_icon_size, dev_icon_size);
con->open_pixmap = gnome_cmd_pixmap_new_from_file (icon_path, dev_icon_size, dev_icon_size);
Modified: trunk/src/gnome-cmd-con-ftp.cc
==============================================================================
--- trunk/src/gnome-cmd-con-ftp.cc (original)
+++ trunk/src/gnome-cmd-con-ftp.cc Fri Sep 26 17:23:54 2008
@@ -171,7 +171,7 @@
static void init (GnomeCmdConFtp *ftp_con)
{
- guint dev_icon_size = gnome_cmd_data_get_dev_icon_size ();
+ guint dev_icon_size = gnome_cmd_data.dev_icon_size;
gint icon_size;
g_assert (gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, &icon_size, NULL));
Modified: trunk/src/gnome-cmd-con-home.cc
==============================================================================
--- trunk/src/gnome-cmd-con-home.cc (original)
+++ trunk/src/gnome-cmd-con-home.cc Fri Sep 26 17:23:54 2008
@@ -111,7 +111,7 @@
static void init (GnomeCmdConHome *home_con)
{
- guint dev_icon_size = gnome_cmd_data_get_dev_icon_size ();
+ guint dev_icon_size = gnome_cmd_data.dev_icon_size;
GnomeCmdCon *con = GNOME_CMD_CON (home_con);
Modified: trunk/src/gnome-cmd-con-smb.cc
==============================================================================
--- trunk/src/gnome-cmd-con-smb.cc (original)
+++ trunk/src/gnome-cmd-con-smb.cc Fri Sep 26 17:23:54 2008
@@ -209,7 +209,7 @@
static void
init (GnomeCmdConSmb *smb_con)
{
- guint dev_icon_size = gnome_cmd_data_get_dev_icon_size ();
+ guint dev_icon_size = gnome_cmd_data.dev_icon_size;
GnomeCmdCon *con = GNOME_CMD_CON (smb_con);
Modified: trunk/src/gnome-cmd-data.cc
==============================================================================
--- trunk/src/gnome-cmd-data.cc (original)
+++ trunk/src/gnome-cmd-data.cc Fri Sep 26 17:23:54 2008
@@ -56,8 +56,6 @@
GnomeCmdLayout layout;
GnomeCmdColorTheme color_themes[GNOME_CMD_NUM_COLOR_MODES];
gchar *list_font;
- guint icon_size;
- guint dev_icon_size;
GdkInterpType icon_scale_quality;
gchar *theme_icon_dir;
gchar *document_icon_dir;
@@ -1114,6 +1112,8 @@
cmdline_visibility = TRUE;
buttonbar_visibility = TRUE;
+ icon_size = 16;
+ dev_icon_size = 16;
list_row_height = 16;
gui_update_rate = DEFAULT_GUI_UPDATE_RATE;
@@ -1284,8 +1284,8 @@
ext_disp_mode = (GnomeCmdExtDispMode) gnome_cmd_data_get_int ("/options/ext_disp_mode", GNOME_CMD_EXT_DISP_BOTH);
right_mouse_button_mode = (GnomeCmdData::RightMouseButtonMode) gnome_cmd_data_get_int ("/options/right_mouse_button_mode", GnomeCmdData::RIGHT_BUTTON_POPUPS_MENU);
- priv->icon_size = gnome_cmd_data_get_int ("/options/icon_size", 16);
- priv->dev_icon_size = gnome_cmd_data_get_int ("/options/dev_icon_size", 16);
+ icon_size = gnome_cmd_data_get_int ("/options/icon_size", 16);
+ dev_icon_size = gnome_cmd_data_get_int ("/options/dev_icon_size", 16);
priv->icon_scale_quality = (GdkInterpType) gnome_cmd_data_get_int ("/options/icon_scale_quality", GDK_INTERP_HYPER);
priv->theme_icon_dir = gnome_cmd_data_get_string ("/options/theme_icon_dir", theme_icon_dir);
g_free (theme_icon_dir);
@@ -1635,8 +1635,8 @@
gnome_cmd_data_set_int ("/options/ext_disp_mode", ext_disp_mode);
gnome_cmd_data_set_int ("/options/right_mouse_button_mode", right_mouse_button_mode);
- gnome_cmd_data_set_int ("/options/icon_size", priv->icon_size);
- gnome_cmd_data_set_int ("/options/dev_icon_size", priv->dev_icon_size);
+ gnome_cmd_data_set_int ("/options/icon_size", icon_size);
+ gnome_cmd_data_set_int ("/options/dev_icon_size", dev_icon_size);
gnome_cmd_data_set_int ("/options/icon_scale_quality", priv->icon_scale_quality);
gnome_cmd_data_set_string ("/options/theme_icon_dir", priv->theme_icon_dir);
gnome_cmd_data_set_string ("/options/document_icon_dir", priv->document_icon_dir);
@@ -1904,32 +1904,13 @@
}
-guint gnome_cmd_data_get_icon_size ()
-{
- return gnome_cmd_data.priv->icon_size;
-}
-
-
-void gnome_cmd_data_set_icon_size (guint size)
-{
- gnome_cmd_data.priv->icon_size = size;
-}
-
-
-guint gnome_cmd_data_get_dev_icon_size ()
-{
- return gnome_cmd_data.priv->dev_icon_size;
-}
-
-
GdkInterpType gnome_cmd_data_get_icon_scale_quality ()
{
return gnome_cmd_data.priv->icon_scale_quality;
}
-void
-gnome_cmd_data_set_icon_scale_quality (GdkInterpType quality)
+void gnome_cmd_data_set_icon_scale_quality (GdkInterpType quality)
{
gnome_cmd_data.priv->icon_scale_quality = quality;
}
Modified: trunk/src/gnome-cmd-data.h
==============================================================================
--- trunk/src/gnome-cmd-data.h (original)
+++ trunk/src/gnome-cmd-data.h Fri Sep 26 17:23:54 2008
@@ -117,6 +117,8 @@
gboolean cmdline_visibility;
gboolean buttonbar_visibility;
+ guint icon_size;
+ guint dev_icon_size;
gint list_row_height;
guint gui_update_rate;
@@ -187,10 +189,6 @@
const gchar *gnome_cmd_data_get_term ();
void gnome_cmd_data_set_term (const gchar *shell);
-guint gnome_cmd_data_get_icon_size ();
-void gnome_cmd_data_set_icon_size (guint size);
-
-guint gnome_cmd_data_get_dev_icon_size ();
GdkInterpType gnome_cmd_data_get_icon_scale_quality ();
void gnome_cmd_data_set_icon_scale_quality (GdkInterpType quality);
Modified: trunk/src/gnome-cmd-options-dialog.cc
==============================================================================
--- trunk/src/gnome-cmd-options-dialog.cc (original)
+++ trunk/src/gnome-cmd-options-dialog.cc Fri Sep 26 17:23:54 2008
@@ -534,7 +534,7 @@
gtk_object_set_data (GTK_OBJECT (parent), "mime_icon_settings_frame", cat);
gtk_box_pack_start (GTK_BOX (vbox), cat, FALSE, FALSE, 0);
- spin = create_spin (parent, "iconsize_spin", 8, 64, gnome_cmd_data_get_icon_size());
+ spin = create_spin (parent, "iconsize_spin", 8, 64, gnome_cmd_data.icon_size);
table_add (table, spin, 1, 0, (GtkAttachOptions) GTK_FILL);
scale = create_scale (parent, "iconquality_scale", gnome_cmd_data_get_icon_scale_quality (), 0, 3);
table_add (table, scale, 1, 1, (GtkAttachOptions) GTK_FILL);
@@ -588,7 +588,7 @@
gnome_cmd_data_set_theme_icon_dir (gtk_entry_get_text (GTK_ENTRY (theme_icondir_entry)));
gnome_cmd_data_set_document_icon_dir (gtk_entry_get_text (GTK_ENTRY (doc_icondir_entry)));
- gnome_cmd_data_set_icon_size (gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (iconsize_spin)));
+ gnome_cmd_data.icon_size = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (iconsize_spin));
GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (iconquality_scale));
gnome_cmd_data_set_icon_scale_quality ((GdkInterpType) adj->value);
Modified: trunk/src/imageloader.cc
==============================================================================
--- trunk/src/imageloader.cc (original)
+++ trunk/src/imageloader.cc Fri Sep 26 17:23:54 2008
@@ -313,7 +313,7 @@
// Scale the pixmap if needed
- h = gnome_cmd_data_get_icon_size();
+ h = gnome_cmd_data.icon_size;
if (h != gdk_pixbuf_get_height (pixbuf))
{
scale = (gfloat)h/(gfloat)gdk_pixbuf_get_height (pixbuf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]