changeset 458:7a69309b91c8

Allow the user to set the drag'n drop icon size through Preferences > Advanced > Behavior > Drag'n drop icon size. It is saved to rc file as dnd_icon_size.
author zas_
date Mon, 21 Apr 2008 10:09:01 +0000
parents 5e9c24d3b3a8
children b88948eff0fa
files src/dnd.c src/globals.c src/preferences.c src/rcfile.c src/typedefs.h
diffstat 5 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dnd.c	Sun Apr 20 23:17:35 2008 +0000
+++ b/src/dnd.c	Mon Apr 21 10:09:01 2008 +0000
@@ -32,7 +32,7 @@
 gint dnd_file_drop_types_count = 2;
 
 
-#define DND_ICON_SIZE 48
+#define DND_ICON_SIZE (options->dnd_icon_size)
 
 
 static void pixbuf_draw_border(GdkPixbuf *pixbuf, gint w, gint h)
--- a/src/globals.c	Sun Apr 20 23:17:35 2008 +0000
+++ b/src/globals.c	Mon Apr 21 10:09:01 2008 +0000
@@ -29,6 +29,7 @@
 	options->color_profile.screen_type = 0;
 	options->color_profile.use_image = TRUE;
 
+	options->dnd_icon_size = 48;
 	options->duplicates_similarity_threshold = 99;
 	options->enable_metadata_dirs = FALSE;
 
--- a/src/preferences.c	Sun Apr 20 23:17:35 2008 +0000
+++ b/src/preferences.c	Mon Apr 21 10:09:01 2008 +0000
@@ -267,6 +267,7 @@
 	options->tree_descend_subdirs = c_options->tree_descend_subdirs;
 
 	options->open_recent_list_maxsize = c_options->open_recent_list_maxsize;
+	options->dnd_icon_size = c_options->dnd_icon_size;
 
 #ifdef DEBUG
 	debug = debug_c;
@@ -1406,6 +1407,9 @@
 
 	pref_spin_new_int(group, _("Open recent list maximum size"), NULL,
 			  1, 50, 1, options->open_recent_list_maxsize, &c_options->open_recent_list_maxsize);
+	
+	pref_spin_new_int(group, _("Drag'n drop icon size"), NULL,
+			  16, 256, 16, options->dnd_icon_size, &c_options->dnd_icon_size);
 
 	group = pref_group_new(vbox, FALSE, _("Navigation"), GTK_ORIENTATION_VERTICAL);
 
--- a/src/rcfile.c	Sun Apr 20 23:17:35 2008 +0000
+++ b/src/rcfile.c	Mon Apr 21 10:09:01 2008 +0000
@@ -318,6 +318,7 @@
 
 	WRITE_BOOL(mousewheel_scrolls);
 	WRITE_INT(open_recent_list_maxsize);
+	WRITE_INT(dnd_icon_size);
 	WRITE_BOOL(place_dialogs_under_mouse);
 
 
@@ -608,7 +609,7 @@
 		READ_BOOL(mousewheel_scrolls);
 
 		READ_INT(open_recent_list_maxsize);
-
+		READ_INT(dnd_icon_size);
 		READ_BOOL(place_dialogs_under_mouse);
 
 
--- a/src/typedefs.h	Sun Apr 20 23:17:35 2008 +0000
+++ b/src/typedefs.h	Mon Apr 21 10:09:01 2008 +0000
@@ -760,6 +760,7 @@
 	gint duplicates_similarity_threshold;
 
 	gint open_recent_list_maxsize;
+	gint dnd_icon_size;
 
 	/* file ops */
 	struct {