! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Move panel item doesn't scroll list to new position
Status:
RESOLVED: FIXED
Severity:
trivial
Product:
Xfce4-panel

Comments

Description Raphael Groner 2013-12-27 23:47:12 CET
Created attachment 5282 
scroll the list automatically to show the new item position

When the user moves a panel item out of the visible area in the list view of "items" tab in panel preferences dialog, the list won't scroll automatically to show the newly positioned item and so keep it visible.

Please see the attached patch to fix this.
Comment 1 Raphael Groner 2013-12-29 11:01:25 CET
Created attachment 5285 
scroll panel item list automatically on movement (improved)
Comment 2 Raphael Groner 2013-12-29 11:03:09 CET
See also 
http://www.gtkforums.com/viewtopic.php?t=3801
Comment 3 Raphael Groner 2014-01-01 19:54:00 CET
ping?
Comment 4 Andrzej editbugs 2014-01-02 22:37:22 CET
Hi,

The fix works fine if I move the plugin via up/down buttons or DnD in the dialog box. But it does not work if I move it via right-click on the plugin *itself* and move it to another place on the panel. (The list in the dialog box is updated but the moved plugin may not be visible).

Can you check if this could be easily fixed. If so, I'd prefer a single patch. If not, then let me know about it - the patch is already doing something useful so I can push it as is.

Also, please can you add description and your name/email addres to the patch. The procedure is as follows:

$ git checkout -b my_branch
$ git gui
[describe & commit your fix here]
$ git format-patch master
[this will produce the patch the xfce4-panel directory]
Comment 5 Raphael Groner 2014-01-06 16:53:10 CET
(In reply to Andrzej from comment #4)
Sorry for the long delay of my answer. Thank you for testing my patch.

> Hi,
> 
> The fix works fine if I move the plugin via up/down buttons or DnD in the
> dialog box. But it does not work if I move it via right-click on the plugin
> *itself* and move it to another place on the panel. (The list in the dialog
> box is updated but the moved plugin may not be visible).

I think that I understand what you mean. But this seems to be another very special use case and is not related directly to my patch. I have never tried to move items on the panel itself while the preferences dialog is shown. Moving items on the panel itself isn't handled in the patched panel/panel-preferences-dialog.c file, only the list update that is loosing the current selection. So we don't know if we should keep the last selected item visibile (if any) or select the actual moved one (could be another one than the previous selection).  

> Can you check if this could be easily fixed. If so, I'd prefer a single
> patch. If not, then let me know about it - the patch is already doing
> something useful so I can push it as is.

Your issue may be another feature request. Please consider to open another bug for that.

Anyways, I would be glad if my patch can go into master and is included in any of the next official panel releases.
Comment 6 Raphael Groner 2014-01-06 16:54:01 CET
Created attachment 5302 
scroll the items list automatically to keep the moved item visible at the new position
Comment 7 Andrzej editbugs 2014-01-07 03:32:24 CET
I've pushed your patch with minor modifications. BTW, git
remote didn't like your email address (probably because of {} characters) so
I had to flatten the patch.

I've also pushed another change that attempts to preserve the cursor position
when rebuilding the list store. You were right - this was a separate issue.
Comment 8 Steve Dodier-Lazaro editbugs 2015-02-16 20:25:30 CET
Raph, Andrzej: thanks for the patches. I'm closing the report.

Bug #10582

Reported by:
Raphael Groner
Reported on: 2013-12-27
Last modified on: 2015-02-16

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
4.10.1

Attachments

Additional information