Yes, GTK+ 3.14 has been out for some time now, and it's even been available in Arch's official repos for a little while as well. Unfortunately I haven't been able to find enough time to work on donna as of late, and I didn't follow GTK's developement closely, so when 3.14 was released I had a few patches to rebase, and some to rewrite completely (think rubber band handling, since the internals are now full of gestures).
But I have some (good) news for you, finally.
What's new to next?
First of all, a few things have finally been pushed to branch
next so let's
quickly go over the main ones :
Filters are now a thing.
That is, donna now has a provider "filter" that handles them, and obviously that means a filter can be represented with a node, as is common in donnatella.
The main benefit from this is that now filters can be defined in config, and assigned a name, alias and/or icon name. So when one wants to use a filter, a simple reference to its alias will do the trick, and should that filter need to be updated, it only happens in one simple place. Also, when used in menus they can have a nice name ("e.g. "From yesterday") and/or icon to make things easier.
The location of a filter is that actual filter string itself, with two specials
cases: if it starts with a pipe sign, then what follows is an alias. Note that
when asking for e.g.
filter:|y the node you'll get will be that of the actual
filter, i.e. with for full location e.g.
filter:A1d And, the node
(i.e. with an empty location) refers to a lack of filter, which is a way to set
no filter, or what commands (such as
tv_get_visual_filter()) will return when
no filter is set.
Commands as containers
The node for a command is usually an item that can be triggered. Usually, because it is now possible to prefix the command's name/location with the lesser than sign, in order to get a container instead.
This is obviously only supported for commands that return either a node, or an array of nodes. Then, getting the children of the node/container will trigger the command, returning what the command returned.
This can be useful in e.g. (context) menus; Speaking of which...
A new type of item in context menus
A new context-type
combined has been added when defining a user item in a
context menu. It works like the regular item, with option
trigger for the
trigger/item part, but also reads option
container for the full location of
a container, used for the submenu part of the item.
Obviously, this is intended for used with option "submenus" set to "combine" and allows to define both the item & the submenu part of an item.
Most-Recently Used lists
A new provider "mru" has been added, allowing to manager MRU lists of nodes or
strings. In the later case, the node for the MRU will be an item and the only
way to get items is via command
In the former case, the node will be a container, usable just as any other (e.g. in treeviews, menus, etc).
Not unlike filters, asking for the node of an MRU will automatically create it
if it doesn't yet exist, though command
mru_new() allows to perform a
creation, failing if the MRU already exists.
Add $DONNATELLA_CONFIG_DIR and extend $PATH
The environment used when executing things from donna (e.g. from provider exec)
will have an extra variable
DONNATELLA_CONFIG_DIR set to the current
configuration directory, which might be useful for scripts.
Similarly, the $PATH will be extended (unless boolean option
was set to false) to end with
$DONNATELLA_CONFIG_DIR/bin as well as
subfolder "donnatella/bin" of all system config directories (
to e.g. easily run donna-specific scripts.
As an example...
By default the "Selection Filter" item in the list's context menu now makes use
of about all of this, being a item that can be triggered, then using a script
that deals with an MRU of filters, and a submenu made from using some of the new
nodes_add() to get recently used filters from an MRU as well as
listing all available filters.
So if you're curious about all those changes and wantto known more, have a look at the git log as well as configuration options (and related scripts) regarding the "Selection Filter" menu item.
Of course a few bugs have been fixed and other minor/internal changes took place. Amongst which is the compatibility with GTK+ 3.14 and the updated patches, also known as gtk3-donnatella.
As hinted earlier, major changes took place in the rubber band handling, as it's been rewritten in GTK+ which now uses GtkGesture to handle all of this. It shouldn't however make any difference from a user point of view, and everything should continue working as before in donna.
As always, after updating you'll have to update your configuration as well to benefit from all the changes. Here's the diff for this time around, since the last time:
- diff --git a/misc/donnatella.conf b/misc/donnatella.conf
- index 1ab177f..b9810df 100644
- --- a/misc/donnatella.conf
- +++ b/misc/donnatella.conf
- @@ -136,6 +136,7 @@ key_mode_select_foreground=white
- last_location=command:tv_set_location (:active, @config_get_string (donna/last_location))
- marks=command:mark_load (,1)
- registers=command:register_load_all (,1)
- +filters=command:filter_load ()
- # enable when using layout "tm"
- @@ -205,7 +206,7 @@ context_menu_colheader=columns<!columns>,-,:sort_order<!sort_order>,:second_sort
- # some color filters
- @@ -231,25 +232,25 @@ foreground-rgba=rgb(108,0,0)
- # modified less than an hour ago
- # modified today
- # modified yesterday
- # modified this week
- @@ -783,11 +784,9 @@ trigger=command:tv_start_interactive_search (%o)
- -trigger=command:tv_set_visual_filter (%o, @config_get_string (filters/%k), 1)
- +trigger=command:tv_set_visual_filter (%o, filter:|%k, 1)
- -trigger=command:tv_set_visual_filter (%o, @config_set_string (filters/%k, @ask_text (Enter filter %k,,@config_try_get_string (filters/%k, @tv_get_visual_filter (%o)))), 1)
- +trigger=command:tv_set_visual_filter (%o, @get_node_from (filter, @ask_text (Enter visual filter,, @node_get_property (@tv_get_visual_filter (%o), location))))
- # VF: by age
- @@ -797,16 +796,16 @@ custom_chars=HMSdmVY
- -trigger=command:tv_set_visual_filter (%o, time:A%m%c)
- +trigger=command:tv_set_visual_filter (%o, filter:time:A%m%c)
- -trigger=command:tv_set_visual_filter (%o, time:A<=%m%c)
- +trigger=command:tv_set_visual_filter (%o, filter:time:A<=%m%c)
- # VF: by size
- -trigger=command:tv_set_visual_filter (%o, size:<=%mM)
- +trigger=command:tv_set_visual_filter (%o, filter:size:<=%mM)
- -trigger=command:tv_set_visual_filter (%o, size:>=%mM)
- +trigger=command:tv_set_visual_filter (%o, filter:size:>=%mM)
- # F2 to rename
- @@ -1054,8 +1053,12 @@ name=Invert Selection
- trigger=command:tv_selection (%o, i, :all)
- name=Selection Filter...
- -trigger=command:tv_selection_nodes (%o, d, @nodes_filter (@tv_get_nodes (%o, :all), @ask_text (Selection Filter,Enter the selection filter to apply), %o))
- +trigger=&donna-sel_filter %o
- +container=@<nodes_add (@nodes_add(@mru_get_nodes (mru:sel_filter)), filter:/)
- # Timestamp stuff
- @@ -1091,6 +1094,12 @@ children:node-type=items
- left_click=command:tv_goto_line (:active, s+f, @nodes_io (%n, c, @tv_get_location (:active), @ask_text (New Items,Enter the name of the item to create,@node_get_property(%n,name))))
- +# Selection Filters
- +left_click=command:tv_selection_nodes (:active, d, @nodes_filter (@tv_get_nodes (:active, :all), @mru_add_node (mru:sel_filter, %n), :active))
- # to show children but not hidden/dotFiles
- @@ -1181,6 +1190,42 @@ terminal=term
- +name=No filtering
- +name=Within the hour
- +name=This week
- +filter=desc:* video
- +filter=desc:* image
- +filter=desc:* archive*
- @@ -1201,25 +1246,4 @@ node=config:/
- -# FILTERS
- -# used to unset current VF (via ff)
- -# today
- -# yesterday
- -# this week
- -# videos
- -v=desc:* video
- -# images
- -i=desc:* image
- -# archives
- -a=desc:* archive*
- # EOF
Where to get it?
For a a complete list of all changes/bug fixes please refer to the git log.
And in case you read all that and are wondering what donnatella is, or are looking for more information, download links, etc please refer to donnatella.
As always, bug reports, suggestions or any other form of constructive criticism is very much welcome. You can open issues on github, use the thread on Arch Linux forums, or simply email me.