Windows Live Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, 29 April 2010

Plugin Authors: Save Your Users' Sanity!

Posted on 22:12 by Unknown
OK, maybe I'm being a bit sensationalist there, but it's my blog, so I'm allowed! Anyway, on to the subject matter.

Recently we've seen a few users in #pidgin (and I've received some emails too) with some strange issues that result from plugins doing things they really shouldn't but can anyway. I'm going to run down a small punch list of items for you, as plugin authors, to do to prevent your users having hard-to-diagnose issues.
  • Never use printf() in a plugin. This causes terminal disruption for Finch users and is a bad idea in general. It will probably behave unpredictably on Windows and/or in other UI's too. We provide a debugging API to avoid this kind of stuff. Instead of printf(), use purple_debug_info() or purple_debug_misc(). You can see the debug output (even during initial startup) if you run 'pidgin -d', even on Windows and even if your Pidgin is built without '--enable-debug'. For Finch, you can do 'finch -d 2> finch_debug.txt' to get your debug info.
  • Don't lie about UI requirements. If you use GTK+, you're a Pidgin plugin, not a "core" (or libpurple) plugin. If you use GNT (or if you're really brave and use ncurses directly), you're a Finch plugin. There are plenty of examples in the Pidgin and Purple Plugin Pack source trees that show you how to properly declare your UI dependency. The UI requirement is designed specifically so that plugins requiring a specific UI can't be loaded by, and thus cause problems for, other UI's. Sure, it's possible to make a UI-agnostic plugin that requires GTK+, but I guarantee it will cause at least one or two Finch users unnecessary problems.
  • Install your binaries to the correct place. If you're installing a Pidgin plugin, install to $prefix/lib/pidgin, not $prefix/lib/purple-2. If you're installing a Finch plugin, install to $prefix/lib/finch. This will prevent other UI's from needlessly trying to probe your plugin and is just general courtesy. (Note that this particular item doesn't apply to plugins for Pidgin on Windows at the moment, but may be important later.)
  • If your plugin is a protocol plugin, you absolutely are not allowed to touch UI-specific code at all. That means no GTK+, no GNT, no XUL, etc. If you need UI elements, use the request API libpurple provides. If the request API doesn't cut it, there are other approaches you can take, such as having two plugins, one of which does the actual protocol work and the other providing the UI. A better approach, though, is helping us identify where the request API is lacking so we can improve it. We know our API's aren't perfect, so when someone can show us a concrete reason why we're deficient, we will try to fix that deficiency.
Please check your plugins for these problems and help your users have a more pleasant experience with your plugins!
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in debug, finch, install, pidgin, plugins | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Random Ramblings
    This blog post is going to be a bit of . . . well, quite literally, random rambling. I guess the title of the post should make this a dead ...
  • Purple Plugin Pack 2.1.0 and 2.1.1; Plans for 2.2.0
    Well, last night I released two versions (yes, two!) of the Purple Plugin Pack. The initial release was 2.1.0, which included a new plugin ...
  • Long time...
    So, I guess it's been ages since I made a blog post. A lot has happened in that time: We released Purple Plugin Pack 2.2.0 without the ...
  • It's a bit late...
    It's a bit late for me to be posting this now, but we did recently release Pidgin 2.5.0. There are a few things about this release that...
  • Separate, but not equal? No more.
    Many Pidgin users who have tried to seek support on IRC know that the inhabitants of #pidgin have historically been quite hostile to Windo...
  • And the survey says...
    Well, we got quite a lot of user feedback in the survey that Casey ran on our site. I've read through a lot of it and thought I'd ...
  • Pidgin and the status and protocol icons
    Ok, so by now everyone knows that Gaim has become Pidgin . Well, the name isn't the only thing that changed. Pidgin has decided to dem...
  • The Quest Never Ends
    In my last blog post, I alluded to our quest to make Pidgin perfect (in our own eyes, at least). This is a quest that by its very definitio...
  • The use of arbitrary status icons in Pidgin
    Before I go any further with this post, I want to make a couple things abundantly clear. I have given up on this argument; I am expressing m...
  • Plugin Authors: Save Your Users' Sanity!
    OK, maybe I'm being a bit sensationalist there, but it's my blog, so I'm allowed! Anyway, on to the subject matter. Recently we...

Categories

  • about
  • adium
  • aim
  • application
  • authentication
  • bob
  • bosh
  • bugfix
  • buzz
  • changelog
  • changes
  • charity
  • chatroom
  • clarification
  • comments
  • complex
  • crash
  • custom emoticons
  • custom smileys
  • cvs
  • debug
  • detachable sessions
  • donation
  • duplicate ticket
  • dv labs
  • dvcs
  • emoticons
  • feedback
  • finch
  • git
  • google
  • guifications.org
  • hack
  • hang-on-exit
  • hosting
  • hostname
  • icq
  • install
  • libpurple
  • log viewer
  • message lost
  • monotone
  • msn
  • msnp15
  • myspace
  • networkredux
  • new features
  • outage
  • patches
  • pidgin
  • plagiarism
  • plugins
  • preferences window
  • prefslash
  • release
  • review needed
  • saved status
  • screen
  • security
  • server
  • services
  • smilies
  • status
  • status message
  • submissions
  • subversion
  • summer of code
  • surveys
  • svn
  • tickets
  • timeline
  • tools
  • trac
  • transient status
  • translators
  • tutorial
  • unicode
  • users
  • video
  • voice
  • website
  • windows
  • windows crash
  • xmpp
  • yahoo

Blog Archive

  • ►  2012 (1)
    • ►  November (1)
  • ►  2011 (3)
    • ►  August (1)
    • ►  February (2)
  • ▼  2010 (6)
    • ►  October (1)
    • ►  June (1)
    • ►  May (1)
    • ▼  April (2)
      • Plugin Authors: Save Your Users' Sanity!
      • Time flies...
    • ►  January (1)
  • ►  2009 (16)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (2)
    • ►  May (3)
    • ►  April (1)
    • ►  March (1)
    • ►  February (2)
    • ►  January (2)
  • ►  2008 (11)
    • ►  December (2)
    • ►  November (1)
    • ►  October (1)
    • ►  August (1)
    • ►  July (3)
    • ►  March (2)
    • ►  January (1)
  • ►  2007 (15)
    • ►  December (1)
    • ►  August (3)
    • ►  July (2)
    • ►  June (3)
    • ►  May (6)
Powered by Blogger.

About Me

Unknown
View my complete profile