From c17fcb018ee03c49b3835d40f4b916b957932c3c Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 17 Jun 2003 09:30:47 +0000 Subject: [PATCH] r2801: Bugfix: Resize on style change didn't do anything (Andy Hanton). Bugfix: Dragging to panel and pinboard directories didn't offer the DnD menu (reported by BluPhoenyx). --- ROX-Filer/Help/Changes | 8 +++++++- ROX-Filer/Help/TODO | 4 ++++ ROX-Filer/src/display.c | 13 ++++++++++++- ROX-Filer/src/panel.c | 9 +++++++++ ROX-Filer/src/pinboard.c | 9 +++++++++ 5 files changed, 41 insertions(+), 2 deletions(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index 89941887..70572da8 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -2,9 +2,15 @@ A RISC OS-like filer for X by Thomas Leonard +16-Jun-2003 +~~~~~~~~~~~ +Bugfix: Resize on style change didn't do anything (Andy Hanton). +Bugfix: Dragging to panel and pinboard directories didn't offer the DnD + menu (reported by BluPhoenyx). + 11-Jun-2003 ~~~~~~~~~~~ -New SetBackdrop() SOAP method (Matthew Weier OPhinney). +New SetBackdrop() SOAP method (Matthew Weier O'Phinney). 04-Jun-2003 ~~~~~~~~~~~ diff --git a/ROX-Filer/Help/TODO b/ROX-Filer/Help/TODO index 9ebe303b..5868b9ec 100644 --- a/ROX-Filer/Help/TODO +++ b/ROX-Filer/Help/TODO @@ -6,6 +6,10 @@ This is a list of features that should/will be added when I have time (or when someone sends patches!). + BUGS + +Dragging to a pinboard icon doesn't offer the DnD menu. + FEATURES FOR 2.1 Going Up in List View loses the focus and scroll position. diff --git a/ROX-Filer/src/display.c b/ROX-Filer/src/display.c index a5d2b938..b119ff02 100644 --- a/ROX-Filer/src/display.c +++ b/ROX-Filer/src/display.c @@ -395,16 +395,27 @@ void display_set_layout(FilerWindow *filer_window, DetailsType details, gboolean force_resize) { + gboolean style_changed = FALSE; + g_return_if_fail(filer_window != NULL); + if (filer_window->display_style_wanted != style + || filer_window->details_type != details) + { + style_changed = TRUE; + } + display_style_set(filer_window, style); display_details_set(filer_window, details); /* Recreate layouts because wrapping may have changed */ view_style_changed(filer_window->view, VIEW_UPDATE_NAME); - if (force_resize || o_filer_auto_resize.int_value != RESIZE_NEVER) + if (force_resize || o_filer_auto_resize.int_value == RESIZE_ALWAYS + || (o_filer_auto_resize.int_value == RESIZE_STYLE && style_changed)) + { view_autosize(filer_window->view); + } } /* Set the 'Show Thumbnails' flag for this window */ diff --git a/ROX-Filer/src/panel.c b/ROX-Filer/src/panel.c index a3e797f7..d8c294df 100644 --- a/ROX-Filer/src/panel.c +++ b/ROX-Filer/src/panel.c @@ -1032,6 +1032,15 @@ static gboolean drag_motion(GtkWidget *widget, type = dnd_motion_item(context, &item); + if ((context->actions & GDK_ACTION_ASK) && o_dnd_left_menu.int_value + && type != drop_dest_prog) + { + guint state; + gdk_window_get_pointer(NULL, NULL, NULL, &state); + if (state & GDK_BUTTON1_MASK) + action = GDK_ACTION_ASK; + } + if (!item) type = NULL; out: diff --git a/ROX-Filer/src/pinboard.c b/ROX-Filer/src/pinboard.c index 25f0823a..57cfee4e 100644 --- a/ROX-Filer/src/pinboard.c +++ b/ROX-Filer/src/pinboard.c @@ -1510,6 +1510,15 @@ static gboolean drag_motion(GtkWidget *widget, type = dnd_motion_item(context, &item); + if ((context->actions & GDK_ACTION_ASK) && o_dnd_left_menu.int_value + && type != drop_dest_prog) + { + guint state; + gdk_window_get_pointer(NULL, NULL, NULL, &state); + if (state & GDK_BUTTON1_MASK) + action = GDK_ACTION_ASK; + } + if (!item) type = NULL; out: -- 2.11.4.GIT