~ubuntu-branches/ubuntu/hardy/pidgin/hardy

« back to all changes in this revision

Viewing changes to libpurple/protocols/gg/gg-utils.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2007-12-21 02:48:06 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071221024806-pd44a5k9tiyh12mp
Tags: 1:2.3.1-2ubuntu1
* Sync with Debian, remaining Ubuntu changes; (LP: #177811)
  - Set Maintainer to Ubuntu Core Developers.
  - Add build-deps on liblaunchpad-integration-dev, intltool,
    libnm-glib-dev (for --enable-nm) (Ubuntu #112720).
  - Drop build-deps on libsilc-1.1-2-dev | libsilc-dev (>= 1.1.1) as 
    this library is in universe.
  - Drop the libpurple0 recommends on libpurple-bin.
  - Add a gaim transitionnal package for upgrades.
  - Ship compatibility symlinks via debian/gaim.links.
  - Pass --enable-nm to configure to enable NetworkManager support.
  - Pass --disable-silc to configure to disable silc support even if 
    it's installed in the build environment.
  - Add X-Ubuntu-Gettext-Domain to the desktop file and update the
    translation templates in common-install-impl::.
   - Update debian/prefs.xml to set the notify plugin prefs
    /plugins/gtk/X11/notify/* and set /pidgin/plugins/loaded to load 
    the notify plugin; Ubuntu: #13389.
  - Add LPI integration patch, 02_lpi.
  - Add patch 04_let_crasher_for_apport to stop catching the SIGSEGV signal
    and let apport handle it.
  - Add patch 05_default_to_irc_ubuntu_com to set the default IRC 
    server to irc.ubuntu.com.
  - Add autoconf patch, 70_autoconf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
}
113
113
/* }}} */
114
114
 
 
115
void ggp_status_fake_to_self(PurpleAccount *account)
 
116
{
 
117
        PurplePresence *presence;
 
118
        PurpleStatus *status;
 
119
        const char *status_id;
 
120
        const char *msg;
 
121
 
 
122
        if (! purple_find_buddy(account, purple_account_get_username(account)))
 
123
                return;
 
124
 
 
125
        presence = purple_account_get_presence(account);
 
126
        status = purple_presence_get_active_status(presence);
 
127
        msg = purple_status_get_attr_string(status, "message");
 
128
        if (msg && !*msg)
 
129
                msg = NULL;
 
130
 
 
131
        status_id = purple_status_get_id(status);
 
132
        if (strcmp(status_id, "invisible") == 0) {
 
133
                status_id = "offline";
 
134
        }
 
135
 
 
136
        if (msg) {
 
137
                if (strlen(msg) > GG_STATUS_DESCR_MAXSIZE) {
 
138
                        msg = purple_markup_slice(msg, 0, GG_STATUS_DESCR_MAXSIZE);
 
139
                }
 
140
        }
 
141
        purple_prpl_got_user_status(account, purple_account_get_username(account),
 
142
                                    status_id,
 
143
                                    msg ? "message" : NULL, msg, NULL);
 
144
}
 
145
 
115
146
 
116
147
/* vim: set ts=8 sts=0 sw=8 noet: */