From ed984560646d1e19a1c59c80b0119b6f345f5e98 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 2 Jun 2000 12:51:38 +0000 Subject: [PATCH] r290: Small Icon truncation now works. Possibly fixed a rare long-standing redraw problem. --- ROX-Filer/Help/Changes | 15 +++++++++++---- ROX-Filer/Help/TODO | 6 ++---- ROX-Filer/src/choices.c | 6 +++--- ROX-Filer/src/collection.c | 3 +++ ROX-Filer/src/filer.c | 5 +++-- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index 23ff75d8..bc6c1314 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -6,16 +6,23 @@ 02-Jun-2000 ~~~~~~~~~~~ Made the help button look a bit nicer and changed the Find and Permissions -action windows to use the icon instead of a text button. Removed the 3D -borders from the help and toolbar buttons when not selected (looks much -better!). +action windows to use the icon instead of a text button. +Removed the 3D borders from the help and toolbar buttons when not selected +(looks much better!). Setting a run action by dragging to a symlink now +dereferences the link (suggested by Ewan Mac Mahon). + +Default search path for Choices is now: + ~/Choices:/usr/local/share/Choices:/usr/share/Choices + +Fixed (possibly) a bug which sometimes causes the redraw to miss bits. This +probably slows everything down, but the next Gtk+ release should do double +buffering so all this will get changed then... 01-Jun-2000 ~~~~~~~~~~~ Added a Help icon to the toolbar, which does the same as choosing `Show ROX-Filer Help' from the menu. - 25-May-2000 ~~~~~~~~~~~ Started adding some code to truncate long filenames (not finished yet). diff --git a/ROX-Filer/Help/TODO b/ROX-Filer/Help/TODO index ac992f4c..0eff2d91 100644 --- a/ROX-Filer/Help/TODO +++ b/ROX-Filer/Help/TODO @@ -14,8 +14,6 @@ GNOME toolbar - doesn't work properly when detached. Is this a GTK+ problem? - 'Other Action' doesn't work -Set Run Action: deref symlinks - Moving a directory (outside of the filer) causes an error when you try to access it (OK), but the error is still reported when you open the directory in its new location until you click refresh. @@ -41,9 +39,9 @@ Better icon arrangement (different column widths?) More permissions checking in Find? -Fully configurable toolbar. Allow clicking button 2 on buttons. +Fully configurable toolbar. -Can't create a panel if the filer is already running. +Can't create a panel if the filer is already running (can use --new option). Use an environment variable to override the platform-name guessing in AppRun. diff --git a/ROX-Filer/src/choices.c b/ROX-Filer/src/choices.c index 6d2d3a75..ddb09ad4 100644 --- a/ROX-Filer/src/choices.c +++ b/ROX-Filer/src/choices.c @@ -78,8 +78,8 @@ void choices_init(void) dir_list = g_new(gchar *, 4); dir_list[0] = g_strconcat(getenv("HOME"), "/Choices", NULL); - dir_list[1] = g_strdup("/usr/local/Choices"); - dir_list[2] = g_strdup("/usr/Choices"); + dir_list[1] = g_strdup("/usr/local/share/Choices"); + dir_list[2] = g_strdup("/usr/share/Choices"); dir_list[3] = NULL; } @@ -146,7 +146,7 @@ void choices_free_list(GPtrArray *list) /* Get the pathname of a choices file to load. Eg: * * choices_find_path_load("menus", "ROX-Filer") - * -> "/usr/local/Choices/ROX-Filer/menus". + * -> "/usr/local/share/Choices/ROX-Filer/menus". * * The return values may be NULL - use built-in defaults - otherwise * g_free() the result. diff --git a/ROX-Filer/src/collection.c b/ROX-Filer/src/collection.c index 8aa7f08a..d55f9438 100644 --- a/ROX-Filer/src/collection.c +++ b/ROX-Filer/src/collection.c @@ -830,7 +830,10 @@ static void collection_draw(GtkWidget *widget, GdkRectangle *area) collection = COLLECTION(widget); + /* This doesn't always work - I think Gtk+ may be doing some + * kind of expose-event compression... if (collection->paint_level > PAINT_NORMAL) + */ collection_paint(collection, area); } diff --git a/ROX-Filer/src/filer.c b/ROX-Filer/src/filer.c index eb312e2f..20dae500 100644 --- a/ROX-Filer/src/filer.c +++ b/ROX-Filer/src/filer.c @@ -123,7 +123,7 @@ static gboolean o_sort_nocase = FALSE; static gboolean o_single_click = FALSE; static gboolean o_new_window_on_1 = FALSE; /* Button 1 => New window */ gboolean o_unique_filer_windows = FALSE; -static gint o_small_truncate = 144; +static gint o_small_truncate = 250; static gint o_large_truncate = 89; static GtkAdjustment *adj_small_truncate; static GtkAdjustment *adj_large_truncate; @@ -400,7 +400,8 @@ static int calc_width(FilerWindow *filer_window, DirItem *item) return MAX_ICON_WIDTH + 12 + MAX(item->details_width, item->name_width); case SMALL_ICONS: - return SMALL_ICON_WIDTH + 12 + item->name_width; + w = MIN(item->name_width, o_small_truncate); + return SMALL_ICON_WIDTH + 12 + w; default: w = MIN(item->name_width, o_large_truncate); return MAX(pix_width, w) + 4; -- 2.11.4.GIT