After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342795 - Sort plugin: "start from column" not usable with order selection
Sort plugin: "start from column" not usable with order selection
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-24 11:09 UTC by Steve Frécinaux
Modified: 2019-03-23 20:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Changed modal to false (360 bytes, patch)
2006-07-16 04:00 UTC, Brian McKenna
rejected Details | Review
Set combo as not editable (598 bytes, patch)
2007-02-22 23:46 UTC, Eduardo Cereto Carvalho
rejected Details | Review
save the start and end of the selection/document (2.94 KB, patch)
2010-03-13 18:44 UTC, Garrett Regier
none Details | Review

Description Steve Frécinaux 2006-05-24 11:09:31 UTC
pbor said in bug #34117 comment #9:

Apart from that, while testing I found another pretty major bug in the plugin: when you change the start from column spinbox, the spin box entry takes focus and the selection in the text is lost, so it's not possible to order just a selection.

Example: try to sort the three middle lines of

fffe
ddde
dddr
ddda
fffa

(ie the ddd ones) with "start from column: 4" gives

fffa
ddda
ddde
fffe
dddr
Comment 1 Paolo Maggi 2006-05-24 11:33:13 UTC
Being the dialog modal, I think this bug is quite easy to fix.

Comment 2 Brian McKenna 2006-07-16 04:00:17 UTC
Created attachment 68982 [details] [review]
Changed modal to false

This is the first patch I've ever made, not sure if it's in the right format.

I just changed the dialog's modal setting so that you can change the focus between the dialog and its parent. This might not a desired solution.
Comment 3 Paolo Borelli 2006-08-09 11:36:27 UTC
sorry for the late response, I though to have commented in this one but it must have happened only in my head...

Changing the dialog to to not be modal is not a suitable solution, the dialog must remain modal. What comment 1 meant, is that since the dialog is modal it should be possible to work around this issue.
Comment 4 Joachim Noreiko 2006-10-17 18:56:22 UTC
The text selection being lost is a consequence of bug 334060.
Mark as dependency?
Comment 5 Eduardo Cereto Carvalho 2007-02-22 20:27:08 UTC
Why do you say it's easy beacause the dialog is modal?
Comment 6 Eduardo Cereto Carvalho 2007-02-22 23:46:51 UTC
Created attachment 83138 [details] [review]
Set combo as not editable
Comment 7 Eduardo Cereto Carvalho 2007-02-22 23:48:15 UTC
The patch is very simple and probably not the best solution. But it just works and is my first patch ever. So you guys should Congratulate me anyway.
;)
Comment 8 Paolo Borelli 2007-02-25 14:04:10 UTC
Congrats Eduardo :)

However the patch doesn't look correct, the spin button should be editable or there is no point in having it there. What we meant by saying that the fact that the dialog is modal should allow to work around the issue is that since when the dialog is up the user cannot interact with the text, you can save the start and end of the selection when the dialog is built and then restore it before applying the sorting. A bit of a hack but it should work...
Comment 9 Eduardo Cereto Carvalho 2007-02-28 14:19:45 UTC
As i said I'm very early on all this hacking thing. And know almost nothing about gtk, glib and such.
But it doesn't seem so hard to do. I'll try to do that on weekend
Thanks a bunch
Comment 10 Garrett Regier 2010-03-13 18:44:13 UTC
Created attachment 156069 [details] [review]
save the start and end of the selection/document
Comment 11 Paolo Borelli 2010-03-13 20:44:11 UTC
patch looks good to me, could you just add a small comment along the lines of

/* store the selection range since focusing the spinbox in the combo unsects it.
   NOTE: this works becouse the dialog is modal (see bug 342795) */

Since if the modality is ever removed we have an hint about the assumption we are making


Also, can you create the patch with git format-patch and a proper commit message, so that I can credit you properly?

Thanks a lot for your help!
Comment 12 Paolo Borelli 2010-03-14 18:39:29 UTC
Actually I added the comment myself, slightly changed a couple of style details and committed. Thanks for the patch!