Skip to content

Commit

Permalink
Allow the user to set the drag'n drop icon size through
Browse files Browse the repository at this point in the history
Preferences > Advanced > Behavior > Drag'n drop icon size.
It is saved to rc file as dnd_icon_size.
  • Loading branch information
Laurent Monin committed Apr 21, 2008
1 parent c10bf95 commit d3339b5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GtkTargetEntry dnd_file_drop_types[] = {
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)
Expand Down
1 change: 1 addition & 0 deletions src/globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ConfOptions *init_options(ConfOptions *options)
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;

Expand Down
4 changes: 4 additions & 0 deletions src/preferences.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ static void config_window_apply(void)
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;
Expand Down Expand Up @@ -1406,6 +1407,9 @@ static void config_tab_advanced(GtkWidget *notebook)

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);

Expand Down
3 changes: 2 additions & 1 deletion src/rcfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ void save_options(void)

WRITE_BOOL(mousewheel_scrolls);
WRITE_INT(open_recent_list_maxsize);
WRITE_INT(dnd_icon_size);
WRITE_BOOL(place_dialogs_under_mouse);


Expand Down Expand Up @@ -608,7 +609,7 @@ void load_options(void)
READ_BOOL(mousewheel_scrolls);

READ_INT(open_recent_list_maxsize);

READ_INT(dnd_icon_size);
READ_BOOL(place_dialogs_under_mouse);


Expand Down
1 change: 1 addition & 0 deletions src/typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ struct _ConfOptions
gint duplicates_similarity_threshold;

gint open_recent_list_maxsize;
gint dnd_icon_size;

/* file ops */
struct {
Expand Down

0 comments on commit d3339b5

Please sign in to comment.