Ticket #535 (closed defect: invalid)

Opened 5 years ago

Last modified 5 years ago

~/.gtkrc-2.0 is ignored under gnome and pidgin doesn't read ~/.purple/gtkrc-2.0

Reported by: mrfree Owned by: deryni
Milestone: Component: pidgin (gtk)
Version: 2.0 Keywords:
Cc:

Description

I tried to setup a simple ~/.gtkrc-2.0 file to override the conversation windows default font

style "purplerc_style" {
}widget_class "*" style "purplerc_style"
style "*pidgin_conv_entry_style"
{font_name = "Sans 10"}
widget "*pidgin_conv_entry"style "*pidgin_conv_entry_style"

but I'm using gnome (2.16) and I find out that gnome simply ignore the .gtkrc-2.0 file so I tried to use the pidgin gtk-pref plugin, it saves the prefs in ~/.purple/gtkrc-2.0 file (the "code" I used it the same of the previous mentioned file). Nothing change in both cases.

Why pidgin doesn't read the ~/.purple/gtkrc-2.0 file created by its plugin?

Attachments

gtkrc-2.0 (182 bytes) - added by mrfree 5 years ago.
gtkrc-2.0 (generated by the plugin)

Change History

  Changed 5 years ago by lschiere

  • owner set to deryni

Etan, can you look at this?

  Changed 5 years ago by deryni

As far as I can tell pidgin should be reading that file. And a quick strace confirms that it is looking at it. What makes you think it isn't? And for the record I *hate* that Gnome does that.

Could you attach your .purple/gtkrc-2.0 file here please? When using the plugin and tweaking the settings in the plugin configuration page itself did the settings take effect?

  Changed 5 years ago by lschiere

  • pending changed from 0 to 1

  Changed 5 years ago by dougthug

I have a similar problem under both Windows and Linux/Gnome. I'm trying to set the shortcut keys, but it refuses to work.

gtk-key-theme-name = "shortcuts"

style "purplerc_style" {}
widget_class "*" style "purplerc_style"

binding "shortcuts" {
        # enter inserts a newline
        bind "Return" { "insert-at-cursor" ("\n") }
        # ctrl-s sends message
        bind "<ctrl>Return" { "message_send" () }
}

widget "*pidgin_gtkconv_entry" binding "shortcuts"

This is the entire contents from C:\Documents and Settings\me\Application Data\.purple\gtkrc-2.0. Also, I have the Pidgin GTK+ Theme Control plugin enabled and I have the GTK+ Text Shortcut Theme enabled and set to "shortcuts" (without the quotes). I figure it's a syntax problem on my part, but this bug was close so I thought I'd throw my two bits in. Thanks.

  Changed 5 years ago by dougthug

You can ignore me now. I discovered it was a syntax issue when I read the Enter vs. Control-Enter blog entry and looked at the example gtkrc. Thanks again :).

  Changed 5 years ago by deryni

  • status changed from new to closed
  • resolution set to invalid

Closing as per user comment.

One note though. The Text Shortcut Theme doesn't accept "shortcuts" as a valid value, I'm not sure why you thought it would.

  Changed 5 years ago by mrfree

Why have you closed this ticket? "dougthug" isn't the initial reporter :)

@deryni The code I reported in the first post is the one created by the pidgin gtk plugin, as-is

PS: please reopen

  Changed 5 years ago by lschiere

  • status changed from closed to reopened
  • resolution invalid deleted

  Changed 5 years ago by deryni

Bah, sorry about that, that's what I get for not reading as carefully as I should have. You are absolutely certain that the gtkrc stuff you posted here is *exactly* what the GTK+ Theme plugin created? Because that doesn't look valid at all. I'll look over the plugin later, but please double check (and try moving that file out of the way, using the plugin again, and then comparing the two files).

Changed 5 years ago by mrfree

gtkrc-2.0 (generated by the plugin)

  Changed 5 years ago by mrfree

I attached the gtk-2.0 file I just created using the pidgin gtk plugin. The only difference between this and the first I posted is the font size ;)

  Changed 5 years ago by deryni

Ok, I take it back, that file isn't actually broken it just looked odd with the missing space. So I'm back to being unsure why this isn't working. Have you ever used strace? Can you run 'strace pidgin -n > OUTPUT 2>&1' then quit pidgin when it starts and either post that file here or look through it for references to opening/reading the ~/.purple/gtkrc-2.0 file. Did tweaking the settings using the widgets in the plugin dialog work correctly? Do things work if you hit the re-read button?

  Changed 5 years ago by mrfree

This is the output part of interest (I think)

$ cat OUTPUT | grep gtkrc
lstat64("/etc/gtk-2.0/gtkrc", {st_mode=S_IFREG|0644, st_size=34, ...}) = 0
open("/etc/gtk-2.0/gtkrc", O_RDONLY|O_LARGEFILE) = 8
access("/etc/gtk-2.0/gtkrc.it_IT", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/gtk-2.0/gtkrc.it", F_OK)   = -1 ENOENT (No such file or directory)
lstat64("/home/mrfree/.gtkrc-2.0", 0xbf8a3ffc) = -1 ENOENT (No such file or directory)
access("/home/mrfree/.gtkrc-2.0.it_IT", F_OK) = -1 ENOENT (No such file or directory)
access("/home/mrfree/.gtkrc-2.0.it", F_OK) = -1 ENOENT (No such file or directory)
lstat64("/home/mrfree/.purple/gtkrc-2.0", 0xbf8a3ffc) = -1 ENOENT (No such file or directory)
access("/home/mrfree/.purple/gtkrc-2.0.it_IT", F_OK) = -1 ENOENT (No such file or directory)
access("/home/mrfree/.purple/gtkrc-2.0.it", F_OK) = -1 ENOENT (No such file or directory)
access("/home/mrfree/.themes/Clearlooks/gtk-2.0/gtkrc", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/Clearlooks/gtk-2.0/gtkrc", F_OK) = 0
lstat64("/usr/share/themes/Clearlooks/gtk-2.0/gtkrc", {st_mode=S_IFREG|0644, st_size=5035, ...}) = 0
open("/usr/share/themes/Clearlooks/gtk-2.0/gtkrc", O_RDONLY|O_LARGEFILE) = 8
access("/usr/share/themes/Clearlooks/gtk-2.0/gtkrc.it_IT", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/Clearlooks/gtk-2.0/gtkrc.it", F_OK) = -1 ENOENT (No such file or directory)
access("/home/mrfree/.themes/Default/gtk-2.0-key/gtkrc", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/Default/gtk-2.0-key/gtkrc", F_OK) = 0
lstat64("/usr/share/themes/Default/gtk-2.0-key/gtkrc", {st_mode=S_IFREG|0644, st_size=82, ...}) = 0
open("/usr/share/themes/Default/gtk-2.0-key/gtkrc", O_RDONLY|O_LARGEFILE) = 8
access("/usr/share/themes/Default/gtk-2.0-key/gtkrc.it_IT", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/Default/gtk-2.0-key/gtkrc.it", F_OK) = -1 ENOENT (No such file or directory)

In particular...

lstat64("/home/mrfree/.purple/gtkrc-2.0", 0xbf8a3ffc) = -1 ENOENT (No such file or directory)

It is strange, isn't it?

As you have suggested, I tried to change the cursor color using the plugin... and it works! So the only thing that doesn't work it the font part... it seems

  Changed 5 years ago by deryni

When loaded the plugin tweaks the settings itself and doesn't rely on the file being present. The file method exists so that the plugin doesn't need to be loaded for the settings to take effect. What does 'ls -l /home/mrfree/.purple/gtkrc-2.0' say?

  Changed 5 years ago by mrfree

Sorry... I don't knows why but the file, that before exists, doesn't exist anymore! :?

So I opened the plugin (the settings are still there) I clicked on "save in ... gtkrc-2.0" and now the file exists. strace now shows that the file is loaded correctly

lstat64("/home/mrfree/.purple/gtkrc-2.0", {st_mode=S_IFREG|0600, st_size=255, ...}) = 0
open("/home/mrfree/.purple/gtkrc-2.0", O_RDONLY|O_LARGEFILE) = 8

But the font in the conversation windows is always the same (the default one) so it isn't the one I selected in the gtk plugin

follow-up: ↓ 16   Changed 5 years ago by deryni

When you selected the font in the font dialog you saw it looking differently than you see it when it is being used in the conversation window? Or do you just expect it to look different?

in reply to: ↑ 15   Changed 5 years ago by mrfree

Replying to deryni:

When you selected the font in the font dialog you saw it looking differently than you see it when it is being used in the conversation window? Or do you just expect it to look different?

I selected a strange font (Rudelsberg) to be sure I can recognize it in the conversation window :) In the conversation windows I see Sans >10 (I think) but in the plugin I selected Rudelsberg 9

  Changed 5 years ago by seanegan

This is caused because GNOME has a "document font" that it stores in gconf. Pidgin, when running in GNOME, reads that gconf key and sets that as the custom font. This happens after the default style is set, and so anything set in gtkrc-2.0 is lost.

follow-up: ↓ 19   Changed 5 years ago by deryni

  • status changed from reopened to closed
  • resolution set to invalid

Does this need to stay open? I'm going to close this as it would seem to be working as intended.

in reply to: ↑ 18   Changed 5 years ago by Irom

Replying to deryni:

Does this need to stay open? I'm going to close this as it would seem to be working as intended.

It still doesn't work for me. I replaced all "gaim" with "pidgin" in the gtkrc-file that worked for gaim. Here's the snippet out of .gtkrc.mine. Unrelated ui-changes get applied, so the file gets sourced.

binding "pidgin-bindings"
{
# enter inserts a newline
  bind "Return" { "insert-at-cursor" ("\n") }
# ctrl-s sends message
  bind "<ctrl>s" { "message_send" () }
}                  
widget "*pidgin_gtkconv_entry" binding "pidgin-bindings"

http://pidgin.im/gtkrc-2.0 linked in the weblog is a 404, so I can't compare.

follow-up: ↓ 21   Changed 5 years ago by deryni

*pidgin_conv_entry I believe.

in reply to: ↑ 20   Changed 5 years ago by Irom

Replying to deryni:

*pidgin_conv_entry I believe.

That worked! Thanks! :)

in reply to: ↑ description   Changed 5 years ago by harik

Can this at least be fixed with a documentation change? Preferences being ignored and searching bugs marked 'invalid' in order to find the new magic word to make it work the way you want is rather obnoxious.

As was pointed out, the documentation links to a 404 error page, and it changed from *gaim_gtkconv_entry to *pidgin_conv_entry.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!