Skip to content

Commit

Permalink
Update to V1.7 see ChangeLog for details
Browse files Browse the repository at this point in the history
  • Loading branch information
padgettr committed Jan 20, 2018
1 parent 46048c6 commit b9256a9
Show file tree
Hide file tree
Showing 31 changed files with 799 additions and 580 deletions.
5 changes: 4 additions & 1 deletion BUGS
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
This is a list of bugs during early development, now fixed. Later changes are recorded in ChangeLog.
All versions to 1.6:
BUG: There must be at least one external thumbnailer defined; work-around: leave the application/dicom in place, even if the suggested script doesn't exist.
FIXED: version 1.7: Use a different model for thumbnailing - include the internal thumbnailer in the thumbnailer array so there is always one entry.
Below is a list of bugs during early development, now fixed. Later changes are recorded in ChangeLog.

Version 1.2:
BUG: Child process (cp / mv / rm in particular) hangs if many errors are encountered. Due to pipe buffer being full.
Expand Down
13 changes: 13 additions & 0 deletions ChangeLog
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,18 @@ rfm-1.3: config.h format changed to allow user defined toolbar buttons.
***** 1.5.10 is the last version with GTK2 compatibility *****

1.6.0 Use gtk_menu_popup_at_pointer() instead of gtk_menu_popup(). NOTE: this breaks compatibility with GTK2. Added GdkEvent *drop_event to RFM_dndMenu: this contains the drop event. Note that using NULL for the event in gtk_menu_popup_at_pointer() for DnD works, but warnings issued. Using NULL works in weston, but the menu is in the wrong place. Using the drop event doesn't work in wayland, silently fails and no menu is displayed.
1.6.1 If stat fails (e.g. broken symlink) modify icon with a broken image tag. Added new icon into icons.h and modify add_item(). Also got rid of hash store for symlink icons.
1.6.2 If an external thumbnailer generates temporary files inside the current rfm parent directory, but fails, the failure is not registered in the rfm code. Although the file is removed from the thumbnail queue, because a temporary file was created in the current parent dir, rfm triggers a directory re-read which resets the thumb queue and the whole process starts again! The problem here was imagemagick's convert function, which seems to generate a temporary file in the current directory. Altered code in external_thumbnailer() to always exec thumbnail code in the thumbnail directory (which is assumed to exist).
1.6.3 More changes to thumbnailing: tidy up gen_thumbnails(), don't add inotify watch on thumbnail dir if do_thumbs!=1, add rfm_thumbQueue to RFM_flags to store main loop source ID for thumbnail queue. Consolidate all thumbnail stop functions to reset_thumb_job_queue() and explicitly remove and existing thumb queue idle sources.
Correct a bug: If a new item is detected by inotify and added to the tree model, this was automatically sorted. However, thumbnailing was not re-initialised, so thumb_hash was out of sync with new model iters after sorting, resulting in incorrect files being thumbnailed under some circumstances. Add new RFM_flag rfm_sortColumn to store the current sort column. The sort column is now selected in fill_store(). Sorting is disabled for inotify updates, new items appear at the end of the model.
1.6.4 Alter the behaviour of the file menu if multiple files are selected: Add struct RFM_rootMenu and set as an object (as for the other menus). Remove selection_changed(); obtain selection list on click. Altered popup_file_menu(): if multiple files are selected with the same mime root, but different mime sub types, only show menu items appropriate to all types of mime root. If the files are completely different mime types, only show menu items suitable for any file type.
Cleanups - remove GLists for files and obtain selections lists as required. Remove n_parent_items global variable - not required.
Revert '/' patern matching in 1.5.9 - no longer required.
Correct bug where RFM_Thumbnailers thumbnailers had to have at least one entry: now internal thumbnailer is that one entry and must be present!
Change 'anything' in config.h to '*' for matching any mime type.
Remove RFM_ICON_PREFIX and window decoration code - no longer required.
Use GUnixMountMonitor to monitor mounts instead of opening a file descriptor on /proc/mounts. Investigated using GIO for mount handling, but decided to stick with POSIX access.

***** Start version 1.7 due to changes in config.h *****

1.7.0 Initial version 12-01-2018
Empty file modified INSTALL
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion LICENSE
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT/X Consortium License

Copyright (c) 2010-2016 Rodney Padgett
Copyright (c) 2010-2018 Rodney Padgett

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
Expand Down
2 changes: 1 addition & 1 deletion Makefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for RFM - Rod's File Manager

VERSION = 1.6.0
VERSION = 1.7

GTK_VERSION = gtk+-3.0
CPPFLAGS =
Expand Down
41 changes: 18 additions & 23 deletions README
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Introduction
------------
rfm is a basic filemanager for use with dwm (http:https://dwm.suckless.org/) on linux.
The aim of the project was:
* good thumbnailing capabilities
* flexible thumbnailing capabilities
* file handling by mime type
* use drag and drop for file operations
* show status of mount points defined in fstab
Expand Down Expand Up @@ -62,10 +62,10 @@ static const char *f_cp[] = { "/bin/cp", "-p", "-R", "-f", NULL };
static const char *f_mv[] = { "/bin/mv", "-f", NULL };

static RFM_RunActions run_actions[] = {
/* name mime root mime sub type argument run options */
{ "Copy", "anything", "anything", f_cp, RFM_EXEC_INTERNAL },
{ "Move", "anything", "anything", f_mv, RFM_EXEC_INTERNAL },
{ "Delete", "anything", "anything", f_rm, RFM_EXEC_INTERNAL },
/* name mime root mime sub type argument run options */
{ "Copy", "*", "*", f_cp, RFM_EXEC_INTERNAL },
{ "Move", "*", "*", f_mv, RFM_EXEC_INTERNAL },
{ "Delete", "*", "*", f_rm, RFM_EXEC_INTERNAL },
}

The argument is a pointer to an array containing the details of the command to run in linux execv() style; from
Expand Down Expand Up @@ -124,9 +124,14 @@ of the same name. Otherwise, the operation will be performed without prompting.
Thumbnails
----------
GTK+ has built in imaging for many different file types; however, you can also define your own thumbnailer
for specific mime types in config.h. An example is given in config.def.h for DICOM medical imaging files.
In this case it calls a script which generates a thumbnail using the DICOM toolkit dcmtk, and then converts
the resulting file to a png with the appropriate header using ImageMagick.
for specific mime types in config.h. The first entry in RFM_Thumbnailers is for the internal GTK based
thumbnailer; this must be present. Additional thumbnailers may be defined: an example is given in
config.def.h for DICOM medical imaging files. In this case it calls a script which generates a thumbnail
using the DICOM toolkit dcmtk, and then converts the resulting file to a png with the appropriate header
using ImageMagick.

NOTE: EXTERNAL THUMBNAILERS MUST NOT MODIFY THE CURRENT RFM PARENT DIRECTORY WHEN GENERATING IMAGES!
Any temprorary image files should be stored elsewhere.

Tool bar
--------
Expand All @@ -137,7 +142,7 @@ Stop - Stop the current thumbnailing operation
Refresh - Left Click: Refresh mounts list / current view; Right Click: to refresh and toggle display order
Info - Show running background tasks.

Tool bar buttons can be added using config.h. See config.h for further details.
Tool bar buttons can be added using config.h. See config.def.h for further details.

NOTE: a right click on the refresh button will switch the sort mode from
alphabetical order to file modified time order (latest files first) before refreshing.
Expand Down Expand Up @@ -174,13 +179,6 @@ Edit config.h and add e.g.

This will force rfm to use the Tango icon theme, if installed.

When using certain icon themes, in order to get the full range of mime icons, you may need to add

#define RFM_ICON_PREFIX "gnome-mime"

to your config.h. It is recommended to avoid this; for example, the elementary and oxygen (kde) icon themes
have a good selection of mime type icons and does not require an icon_prefix to use them all.

Icon sizes are controlled by:
#define RFM_TOOL_SIZE 22
#define RFM_ICON_SIZE 48
Expand Down Expand Up @@ -224,14 +222,14 @@ You can add the following to config.h in the approprate places to open an object
with the default XDG app:
static const char *xdg_open[] = { "/usr/bin/xdg-open", NULL };
...
{ "xdg-open", "anything", "anything", xdg_open, RFM_EXEC_NONE }
{ "xdg-open", "*", "*", xdg_open, RFM_EXEC_NONE }

This will cause xdg-open to appear in the action menu for every object.

Users of dwm might prefer to add:

static const char *open_with[] = { "/usr/local/bin/open_with_dmenu.sh", NULL };
{ "Open with...", "anything", "anything", open_with, RFM_EXEC_NONE },
{ "Open with...", "*", "*", open_with, RFM_EXEC_NONE },

as a catch all to use dmenu for opening files. The helper script open_with_dmenu.sh is included in the scripts dir.

Expand All @@ -255,12 +253,9 @@ Summary Notes
* If pango markup is used, you need to escape any markup characters in filename etc, i.e. use
something like sed 's/\&/\&amp\;/g; s/</\&lt\;/g; s/>/\&gt\;/g' to replace & with &amp; < with &lt;
and > with &gt;
* Valid UTF-8 characters are required in any output.
* If the number of output chars (stdin / stderr) to be displayed exceeds RFM_MX_MSGBOX_CHARS
* Valid UTF-8 characters are required in any output.
* If the number of output chars (stdin / stderr) to be displayed exceeds RFM_MX_MSGBOX_CHARS
the output will always be shown in a scrollable text window regardless of the run option setting.
7. GTK3 3.13 draws client window decorations on dwm gtk windows. The default for RFM (from version 1.3.10)
is not to show any window decorations. If you want to show window decorations (e.g. in a non-tiling window
manager) add #define RFM_SHOW_WINDOW_DECORATIONS to config.h

Aknowledgements / references
----------------------------
Expand Down
Loading

0 comments on commit b9256a9

Please sign in to comment.