! 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 !
“text” properties reset when closing preferences
Status:
RESOLVED: FIXED
Product:
Xfce4-terminal
Component:
General

Comments

Description Yves-Alexis Perez editbugs 2010-03-21 12:23:49 CET
Hey,

I have a weird bug in Terminal (0.4.4 and 0.4.3 at least). All the “text” properties are reset to none when closing the preferences files:

Term
WordChars
TitleInitial

The behavior seems recent but I can't see when it occurred. It might be related to a GTK+ upgrade though.
Comment 1 Yves-Alexis Perez editbugs 2010-03-21 14:12:19 CET
When trying to debug, I've added printf() to terminal_screen_update_word_chars() and here is the result:

----
corsac@hidalgo: terminal/Terminal
(Terminal:16439): Terminal-DEBUG: D-Bus reply error: Name "org.xfce.Terminal3" does not exist (terminal-error-quark: 3)
(Terminal:16439): Terminal-DEBUG: Monitoring "/home/corsac/.config/Terminal/terminalrc" for changes.
debug: word_chars = -A-Za-z0-9,./?%&#:_~+

// terminal is started

// preferences window is opened

// preferences window is closed
debug: word_chars = 
debug: word_chars = 
----

So it seems that the swapped-signal::notify::word-chars signal is called with an empty parameter twice when closing the preferences window.

GTK+ is 2.18.9-1
Comment 2 Yves-Alexis Perez editbugs 2010-03-21 14:21:54 CET
It doesn't seem to happen on my Debian testing box which uses GTK+ 2.18.6 so I'll try to downgrade
Comment 3 Yves-Alexis Perez editbugs 2010-03-21 14:27:03 CET
Ok, confirmed, downgrading GTK+ to 2.18.6 fixes the problem.
Comment 4 Yves-Alexis Perez editbugs 2010-03-21 14:51:31 CET
I've reported GTK+ bug 613489 (https://bugzilla.gnome.org/show_bug.cgi?id=613489)

Basically it seems that using 2.18.9 the signal is sent twice when closing preferences window, and by that time the string returned by the g_object_get() is empty (but not NULL)
Comment 5 Yves-Alexis Perez editbugs 2010-03-21 15:01:22 CET
Adding a check for strlen() >0 seems to workaround in terminal_screen_update_word_chars() but it'll still store the value in the config file, I guess because of the BIND_PROPERTY() found in terminal-preferences.c
Comment 6 Nick Schermer editbugs 2010-03-21 15:53:22 CET
Created attachment 2900 
Disconnect bindings before dialog close

Could one of you folks try this patch?
Comment 7 Nick Schermer editbugs 2010-03-21 15:58:03 CET
Rewriting the file is normal. It avoid corrupted files (write tmp file, on succeed unlink old config and rename the tmp file).

Although this is obviously a bug in gtk, it is not too hard to work around it.
Comment 8 Yves-Alexis Perez editbugs 2010-03-21 16:09:09 CET
patch seems to work fine against master. Any chance you could comment on GTK+ bug?
Comment 9 Yves-Alexis Perez editbugs 2010-03-21 16:45:27 CET
And any chance to push a release so 0.4.4 would contain the various “binary renaming” fixes and that one?
Comment 10 Nick Schermer editbugs 2010-03-21 16:47:22 CET
No idea, they're fiddling around with the entry buffer a lot lately.

Have to look at the status of the renaming stuff, do you have any remaining issues? Else I can release a new version.
Comment 11 Yves-Alexis Perez editbugs 2010-03-21 16:50:54 CET
(might be easier on IRC :)(In reply to comment #10)
> No idea, they're fiddling around with the entry buffer a lot lately.

Yeah, on the GTK+ bug I've added a comment, it seems related to http://bugzilla.gnome.org/612505
> 
> Have to look at the status of the renaming stuff, do you have any remaining
> issues? Else I can release a new version.

At the moment it seems I'm manually renaming manpages and the .desktop file. Glade/gtkbuilder files are also named Terminal.glade in /usr/share/Terminal but the filename is hardcoded in the source afaics.
Comment 12 Yves-Alexis Perez editbugs 2010-03-22 15:27:59 CET
Workaround for people running into this issue, until fixed GTK+ or a workaround Terminal package appears:

* revert your .config/Terminal/terminalrc:

TitleInitial=Terminal
Term=xterm
WordChars=-A-Za-z0-9,./?%&#:_~+

* don't go back to the preferences until it's fixed
Comment 13 Nick Schermer editbugs 2010-04-17 18:33:49 CEST
*** Bug 6398 has been marked as a duplicate of this bug. ***

Bug #6331

Reported by:
Yves-Alexis Perez
Reported on: 2010-03-21
Last modified on: 2010-04-17
Duplicates (1):
  • 6398 $TERM setting and other settings are not saved in the terminarc config file

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Attachments

Additional information