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

« back to all changes in this revision

Viewing changes to libpurple/protocols/msn/group.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:
25
25
#include "group.h"
26
26
 
27
27
MsnGroup *
28
 
msn_group_new(MsnUserList *userlist, int id, const char *name)
 
28
msn_group_new(MsnUserList *userlist, const char *id, const char *name)
29
29
{
30
30
        MsnGroup *group;
31
31
 
32
 
        g_return_val_if_fail(id >= 0,      NULL);
 
32
        g_return_val_if_fail(id != NULL,      NULL);
33
33
        g_return_val_if_fail(name != NULL, NULL);
34
34
 
35
35
        group = g_new0(MsnGroup, 1);
36
36
 
37
37
        msn_userlist_add_group(userlist, group);
38
38
 
39
 
        group->id      = id;
 
39
        group->id      = g_strdup(id);
40
40
        group->name    = g_strdup(name);
41
41
 
42
42
        return group;
47
47
{
48
48
        g_return_if_fail(group != NULL);
49
49
 
 
50
        g_free(group->id);
50
51
        g_free(group->name);
51
52
        g_free(group);
52
53
}
53
54
 
54
55
void
55
 
msn_group_set_id(MsnGroup *group, int id)
 
56
msn_group_set_id(MsnGroup *group, const char *id)
56
57
{
57
58
        g_return_if_fail(group != NULL);
58
 
        g_return_if_fail(id >= 0);
 
59
        g_return_if_fail(id != NULL);
59
60
 
60
 
        group->id = id;
 
61
        g_free(group->id);
 
62
        group->id = g_strdup(id);
61
63
}
62
64
 
63
65
void
66
68
        g_return_if_fail(group != NULL);
67
69
        g_return_if_fail(name  != NULL);
68
70
 
69
 
        if (group->name != NULL)
70
 
                g_free(group->name);
71
 
 
 
71
        g_free(group->name);
72
72
        group->name = g_strdup(name);
73
73
}
74
74
 
75
 
int
 
75
char*
76
76
msn_group_get_id(const MsnGroup *group)
77
77
{
78
 
        g_return_val_if_fail(group != NULL, -1);
 
78
        g_return_val_if_fail(group != NULL, NULL);
79
79
 
80
80
        return group->id;
81
81
}