Mercurial > pidgin.yaz
comparison src/protocols/msn/msn.c @ 8713:7024b595b6ae
[gaim-migrate @ 9467]
" Expansion from my original protocol prefs to plugin prefs.
Things are handled a bit different in this iteration of
it, but I have already modified msn and jabber to use
it, and included an example plugin to show how to use
it. It will also generate pages with doxygen. The
example plugin doesn't not contain any translatable
strings seeing as we're in the string freeze. And it's
an example, whats the point of translating it..?
Also, I tweaked the documentation for 2 functions in
gtkprefs, gaim_gtk_prefs_dropdown and
gaim_gtk_prefs_dropdown_from_list. Nothing major in
that, just made it say that the list should be a list
of pairs label/value.
Also there's 5 new files that will need to be added to cvs:
src/pluginpref.h
src/pluginpref.c
src/gtkpluginpref.h
src/gtkpluginpref.c
plugins/pluginpref_example.c
the tarball already has them structured correctly and
contains the diff" --Gary Kramlich - amc_grim
and the german translator pointed out that sean missed the novell file for POTFILES.in
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 19 Apr 2004 21:12:45 +0000 |
parents | 725413cc9fb9 |
children | 92cbf9713795 |
comparison
equal
deleted
inserted
replaced
8712:a4ff6e79c5fc | 8713:7024b595b6ae |
---|---|
23 | 23 |
24 #include "msn.h" | 24 #include "msn.h" |
25 #include "accountopt.h" | 25 #include "accountopt.h" |
26 #include "msg.h" | 26 #include "msg.h" |
27 #include "page.h" | 27 #include "page.h" |
28 #include "pluginpref.h" | |
28 #include "prefs.h" | 29 #include "prefs.h" |
29 #include "session.h" | 30 #include "session.h" |
30 #include "state.h" | 31 #include "state.h" |
31 #include "utils.h" | 32 #include "utils.h" |
32 #include "multi.h" | 33 #include "multi.h" |
1608 msn_got_info, data); | 1609 msn_got_info, data); |
1609 | 1610 |
1610 g_free(url); | 1611 g_free(url); |
1611 } | 1612 } |
1612 | 1613 |
1614 static GaimPluginPrefFrame * | |
1615 get_plugin_pref_frame(GaimPlugin *plugin) { | |
1616 GaimPluginPrefFrame *frame; | |
1617 GaimPluginPref *ppref; | |
1618 | |
1619 frame = gaim_plugin_pref_frame_new(); | |
1620 | |
1621 ppref = gaim_plugin_pref_new_with_label(_("Conversations")); | |
1622 gaim_plugin_pref_frame_add(frame, ppref); | |
1623 | |
1624 ppref = gaim_plugin_pref_new_with_name_and_label( | |
1625 "/plugins/prpl/msn/conv_close_notice", | |
1626 _("Display conversation closed notices")); | |
1627 gaim_plugin_pref_frame_add(frame, ppref); | |
1628 | |
1629 ppref = gaim_plugin_pref_new_with_name_and_label( | |
1630 "/plugins/prpl/msn/conv_timeout_notice", | |
1631 _("Display timeout notices")); | |
1632 gaim_plugin_pref_frame_add(frame, ppref); | |
1633 | |
1634 return frame; | |
1635 } | |
1636 | |
1637 static GaimPluginUiInfo prefs_info = { | |
1638 get_plugin_pref_frame | |
1639 }; | |
1640 | |
1613 static GaimPluginProtocolInfo prpl_info = | 1641 static GaimPluginProtocolInfo prpl_info = |
1614 { | 1642 { |
1615 OPT_PROTO_MAIL_CHECK /* | OPT_PROTO_BUDDY_ICON */, | 1643 OPT_PROTO_MAIL_CHECK /* | OPT_PROTO_BUDDY_ICON */, |
1616 NULL, | |
1617 NULL, | 1644 NULL, |
1618 NULL, | 1645 NULL, |
1619 msn_list_icon, | 1646 msn_list_icon, |
1620 msn_list_emblems, | 1647 msn_list_emblems, |
1621 msn_status_text, | 1648 msn_status_text, |
1695 NULL, /**< load */ | 1722 NULL, /**< load */ |
1696 NULL, /**< unload */ | 1723 NULL, /**< unload */ |
1697 NULL, /**< destroy */ | 1724 NULL, /**< destroy */ |
1698 | 1725 |
1699 NULL, /**< ui_info */ | 1726 NULL, /**< ui_info */ |
1700 &prpl_info /**< extra_info */ | 1727 &prpl_info, /**< extra_info */ |
1728 &prefs_info /**< prefs_info */ | |
1701 }; | 1729 }; |
1702 | 1730 |
1703 static void | 1731 static void |
1704 init_plugin(GaimPlugin *plugin) | 1732 init_plugin(GaimPlugin *plugin) |
1705 { | 1733 { |
1706 GaimAccountOption *option; | 1734 GaimAccountOption *option; |
1707 struct proto_pref *ppref; | |
1708 | 1735 |
1709 option = gaim_account_option_string_new(_("Login server"), "server", | 1736 option = gaim_account_option_string_new(_("Login server"), "server", |
1710 MSN_SERVER); | 1737 MSN_SERVER); |
1711 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, | 1738 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
1712 option); | 1739 option); |
1723 my_protocol = plugin; | 1750 my_protocol = plugin; |
1724 | 1751 |
1725 gaim_prefs_add_none("/plugins/prpl/msn"); | 1752 gaim_prefs_add_none("/plugins/prpl/msn"); |
1726 gaim_prefs_add_bool("/plugins/prpl/msn/conv_close_notice", TRUE); | 1753 gaim_prefs_add_bool("/plugins/prpl/msn/conv_close_notice", TRUE); |
1727 gaim_prefs_add_bool("/plugins/prpl/msn/conv_timeout_notice", TRUE); | 1754 gaim_prefs_add_bool("/plugins/prpl/msn/conv_timeout_notice", TRUE); |
1728 | |
1729 ppref = g_new0(struct proto_pref, 1); | |
1730 ppref->key = NULL; | |
1731 ppref->label = _("Conversations"); | |
1732 prpl_info.protocol_prefs = g_list_append(prpl_info.protocol_prefs, ppref); | |
1733 | |
1734 ppref = g_new0(struct proto_pref, 1); | |
1735 ppref->key = "/plugins/prpl/msn/conv_close_notice"; | |
1736 ppref->label = _("Display conversation closed notices"); | |
1737 prpl_info.protocol_prefs = g_list_append(prpl_info.protocol_prefs, ppref); | |
1738 | |
1739 ppref = g_new0(struct proto_pref, 1); | |
1740 ppref->key = "/plugins/prpl/msn/conv_timeout_notice"; | |
1741 ppref->label = _("Display timeout notices"); | |
1742 prpl_info.protocol_prefs = g_list_append(prpl_info.protocol_prefs, ppref); | |
1743 } | 1755 } |
1744 | 1756 |
1745 GAIM_INIT_PLUGIN(msn, init_plugin, info); | 1757 GAIM_INIT_PLUGIN(msn, init_plugin, info); |