! 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 !
Tab mode - can't switch back to Insert Tabs - always says Insert Tabs
Status:
RESOLVED: DUPLICATE
Product:
Mousepad
Component:
General

Comments

Description cubetronic 2015-09-08 08:22:57 CEST
Created attachment 6451 
Display whitespace is ON. 1 tab-tab, 1 spaces-tab, 1 failed-tab

Location:
Edit | Preferences | Editor | Tab mode:

Summary:
1. "Tab mode" can't be switched back to "Insert Tabs"
2. "Tab mode" will always appear to be set to "Insert Tabs"

Reproduction:
1. Change "Tab mode" to "Insert Spaces"
2. Go back and view the setting. It appears to be set to "Insert Tabs"
3. Press the Tab key in the file, it will create spaces.
4. Go back to the setting, and even though it already says "Insert Tabs", actually click "Insert Tabs" and press Close.
5. Press the Tab key in the file, it will still create spaces.

Attempted Workaround:
I uninstalled Mousepad, deleted ~/.config/Mousepad with its contents, rebooted, and re-installed Mousepad, but the settings are the same. I created a couple new users so I could test the bug a few more times.

Environment:
Mousepad in Cinnamon on Arch Linux.
Packages: mousepad 0.4.0-1, cinnamon 2.6.13-3, linux 4.1.6-1
Comment 1 cubetronic 2015-09-08 08:58:23 CEST
tested in xfce4. same results.

xfce4-session 4.12.1-2
Comment 2 cubetronic 2015-09-09 01:02:15 CEST
Work-Around Found:

Select "Insert Spaces", then immediately select "Insert Tabs" before closing that window.

Then close the window, and the Tab key will make Tabs again.

This bug, and the workaround, have been confirmed by another user on a different system somewhere else. They are using Mousepad from the package: 0.4.0-0ubuntu1 (in Lubuntu 15.04 I think).
Comment 3 Matthew Brush editbugs 2015-09-09 01:26:03 CEST
Also there's debug assertion failures on the terminal:

> (mousepad:18119): Gdk-CRITICAL **: gdk_device_ungrab: assertion 
> 'GDK_IS_DEVICE (device)' failed
> 
> (mousepad:18119): Gtk-CRITICAL **: gtk_device_grab_remove:
> assertion 'GDK_IS_DEVICE (device)' failed

I have no idea what GdkDevice is but I suspect it's not used directly in Mousepad (haven't looked yet).

A simpler work-around is to use the menu, Document->Tab Size->Insert Spaces checkbox works properly. I suspect the issue with that setting in the prefs dialog is some weird sync issue with GSettings and the GUI, I think there are one or two other little things like that which needs fixing in the new prefs dialog.
Comment 4 Andre Miranda editbugs 2015-09-23 19:09:30 CEST
Related: Bug 11046
Comment 5 Laurentius 2018-01-17 14:31:50 CET
This bug still affects me.
I can confirm the work-around(s)

Linuxmint 18.3 XFCE. Mousepad 0.4.0
Comment 6 vinc 2018-06-24 13:55:02 CEST
Mousepad 0.4.1 - the bug still remains.
Comment 7 Andre Miranda editbugs 2018-06-24 20:14:25 CEST
Matthew,
Is there any reason why mousepad uses gsettings? Leafpad inheritance?
Would you mind to replace it with xfconf? I might be able give it a try, so mousepad would be more Xfce-friendly and it's likely that these bugs should be resolved.
Comment 8 Matthew Brush editbugs 2018-06-26 20:12:57 CEST
The reason is that when I ported it from using a plain text file with custom format, GSettings was already available and I assumed apps would be ported to use it instead of staying with the (now redundant) xfconf. Another reason was to not have extra dependencies, it seems silly to drag in a whole separate, Xfce-specific dependency/configuration system when there's already one in memory from GLib/GIO. The last reason is because GSettings allows using a plain text/key file backend, and so not requiring DBus or any IPC at all.

I don't think it's GSettings' fault for bugs like this, rather the way I used it, causing weird binding cycles between the different GUI components. IMO, it would be best to just use GSettings properly :)
Comment 9 Theo Linkspfeifer editbugs 2019-04-24 13:32:41 CEST
This was recently fixed. See: Bug 15075

*** This bug has been marked as a duplicate of bug 15075 ***

Bug #12197

Reported by:
cubetronic
Reported on: 2015-09-08
Last modified on: 2019-04-24

People

Assignee:
Matthew Brush
CC List:
4 users

Version

Target Milestone:
Mousepad 0.2.x

Attachments

Additional information