jun7 / rox-filer

ROX file manager
24 stars 6 forks source link

Make selecting items in list view easier #175

Closed woodenshoe-wi closed 6 years ago

woodenshoe-wi commented 6 years ago

I have been working on some code to make it easier to select items with the mouse while in list view mode. Only the icon and name columns can drag items, the rest of the columns will start a selection box.

I got the idea from another commit I wrote that allows columns to be hidden. (Both commits are included)

The changes to view_details.c were simple enough, but to get the list view window to look the way I wanted I had to add a custom cell renderer (cell_text.c). It is based on code from GTK that I modified to work the way I wanted. GTK is released under the same license as ROX-Filer, so it shouldn't be a problem.

I haven't written anything involving GTK this complicated before, and was wondering if you had any suggestions.

235ca6b

https://github.com/jun7/rox-filer/compare/master...woodenshoe-wi:jun7-list-view-select?expand=1

jun7 commented 6 years ago

Very usefull ! I never use list view though ;P The cell_text.c is only for color? If so, is there any other way to set color? it is too large for it. also we have to move gtk3 or higher in the future.

So I think, if we can't change the selection color, why don't change the draggable columns of selected rows. This makes, cut the operation to move cursor to icon/name columns to drag items. Yes bit odd but the users who likes that complex copy/move dialog also will like this I think.

woodenshoe-wi commented 6 years ago

I don't use list view much myself, it was a feature request from a Puppy Linux forum member. It is useful every once in a while to sort files or look at ownership/permissions.

The cell_text.c is only for color? If so, is there any other way to set color? it is too large for it.

If there is another way, I couldn't find it. I was hoping you knew about something that I didn't.

also we have to move to gtk3 or higher it the future.

I borrowed most of the code in cell_text.c from gtk2, so if changes are needed we can borrow them from gtk3. :-)

I opened an issue instead of a pull request because I wasn't sure you would want the code "as is" and force pushing to a branch with a pull request causes problems.

Do you mean change the "view_details_get_iter_at_point" function in view_details.c to return an iter for all columns of selected rows, but only the icon and name columns of non-selected rows?

jun7 commented 6 years ago

Do you mean change the "view_details_get_iter_at_point" function in view_details.c to return an iter for all columns of selected rows, but only the icon and name columns of non-selected rows?

yes. Isn't it usefull?

woodenshoe-wi commented 6 years ago

Ok. I will work on the changes when I have time, and then push the amended commit.

woodenshoe-wi commented 6 years ago

How does 75646fb look?

The complete set of changes would be https://github.com/jun7/rox-filer/compare/master...woodenshoe-wi:jun7-list-view-select?expand=1

jun7 commented 6 years ago

It looks good.

BTW No one use access time? It is not worth to set it to be default true though may be worth as a option. Also is modified time worth to be default true? I just wonder it.

woodenshoe-wi commented 6 years ago

No one use access time?

I wanted to make the existing columns configurable, I wasn't interested in adding more.

As long as ROX-Filer doesn't access the files, only the directory they are in, I guess you could add another one and then people could choose between mtime, ctime and atime.

I don't think all three should be default true, choose the one that makes sense. I just didn't want to make things disappear with my changes.

Issued pull request #177