Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12024 closed patch (fixed)

Custom browser command not saved/read

Reported by: rtobar Owned by: rekkanoryo
Milestone: 2.7.4 Component: pidgin (gtk)
Version: 2.7.0 Keywords: preferences browser
Cc:

Description

Hi all,

I'm running pidgin 2.6.6. I don't use GNOME; instead, I run it over fluxbox.

I recently switched to use google-chrome, so I wanted to change the setting in pidgin to use a custom browser. Nevertheless, this is the behavior that I checked while trying to change the manual command:

  • Open Preferences
  • Switch to Browser
  • Select "Manual" from the list
  • Write "google-chrome %s" in the text field for the command
  • Switching to other tabs of the Preferences window, and then back to Browser maintained the value of the command.
  • Close the Preferences window
  • Open it again, go to Browser, then the custom command is gone
  • Also, whenever you click in an URL, it complains about the custom command not being set.

I looked through the code, and I think believe that the "browsers/command" preference should be treated as string, and not as a path. Since it's currently being treated as a path, it will fail to read/write since the "google-chrome %s" file doesn't exist obviously.

Reading more code, I realized that if I would put "/usr/bin/google-chrome" as custom command, that would work; nevertheless, the preference is meant to have more than a path, but also arguments for the executable, even the "%s" string for the URL.

The only places where I found that this property is being read/written is in gtkprefs.c and gtknotify.c. I'm attaching

Attachments (1)

manual-browser.patch (1.6 KB) - added by rtobar 9 years ago.
Patch to use "browsers/command" preference as string, not as a path

Download all attachments as: .zip

Change History (12)

Changed 9 years ago by rtobar

Patch to use "browsers/command" preference as string, not as a path

comment:1 Changed 9 years ago by QuLogic

  • Component changed from unclassified to pidgin (gtk)
  • Milestone set to Patches Needing Review
  • Owner rekkanoryo deleted

comment:2 Changed 9 years ago by QuLogic

  • Owner set to rekkanoryo

comment:3 Changed 9 years ago by rekkanoryo

I'd like to apply this patch. I need at least a full name to credit you with. An e-mail address would also be helpful.

For the record, I've added Google Chrome as a supported browser command for the next release, as well as two common incarnations of Chromium.

comment:4 follow-up: Changed 9 years ago by rtobar

Thanks for the reply. You can use rtobar@… as the email for the patch (of course, remove NOSPAM).

Cheers!

comment:5 in reply to: ↑ 4 Changed 9 years ago by rtobar

Replying to rtobar:

Thanks for the reply. You can use rtobar@… as the email for the patch (of course, remove NOSPAM).

Mmm... "rtobar at csrg dot inf dot utfsm dot cl", that's it

comment:6 Changed 9 years ago by rtobar@…

  • Milestone changed from Patches Needing Review to 2.7.4
  • Resolution set to fixed
  • Status changed from new to closed

(In e070fe0fbc8e56012bfe41e12b678b6b1a2597fb):
Make the "Manual" browser setting's command be stored as a string instead of as a path. Storing it as a path requires specifying the full path to the command when just the command name would suffice. Fixes #12024.

comment:7 follow-up: Changed 9 years ago by rekkanoryo@…

(In 05e12c9d881aec34d48d8531db0a07cf22fc267d):
Almost forgot to ChangeLog that. Refs #12024. Still need a name for the COPYRIGHT file.

comment:8 in reply to: ↑ 7 Changed 9 years ago by rtobar

Replying to rekkanoryo@…:

(In 05e12c9d881aec34d48d8531db0a07cf22fc267d):
Almost forgot to ChangeLog that. Refs #12024. Still need a name for the COPYRIGHT file.

My name is Rodrigo Tobar Carrizo

Bye!

comment:9 Changed 9 years ago by rekkanoryo@…

(In 4dcc20a7e5c588d87cd629f143fd5d1118499f65):
Change the "Manual" browser command pref's name to allow for a relatively simple migration of an existing value from the path pref to the new string pref. As I note in the comment in the migration code, I realize this will break things for and confuse those users who use the same config directory for mutliple versions of Pidgin, but I'm not inclined to devise a solution that will make that work. The solution I've implemented fixes the most important case--users who upgrade. The rest of the world will just have to move on. Refs #12024.

comment:10 Changed 9 years ago by rekkanoryo@…

(In 8068ee886614d4155f78098e201dbe4e3207918e):
Proper credit for rtobar. Refs #12024.

comment:11 Changed 9 years ago by rekkanoryo@…

(In 01217e4bdeb97f0a76dbe7224e96d04dcd01eafa):
I thought I had done this in my last commit. Clearly I'm an idiot. This fixes all the references to the browser command pref to use the new pref name that I created. Refs #12024.

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!