Mercurial > pidgin.yaz
comparison src/protocols/silc/chat.c @ 10662:54ac161a876e
[gaim-migrate @ 12199]
Plugins can now add submenus to the right-click menu of a blist node by passing a GList of actions to gaim_blist_node_action_new. I'm thinking about making GaimBlistNodeActions more like plugin prefs so that plugins can create radio and check menu items as well. We'll see if I can do that and not make it ugly/suck.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Mon, 07 Mar 2005 02:19:09 +0000 |
parents | bec9130b24d2 |
children | c4cb90065e1d |
comparison
equal
deleted
inserted
replaced
10661:f02873d475dc | 10662:54ac161a876e |
---|---|
859 | 859 |
860 if (strstr(chname, "[Private Group]")) | 860 if (strstr(chname, "[Private Group]")) |
861 return NULL; | 861 return NULL; |
862 | 862 |
863 act = gaim_blist_node_action_new(_("Get Info"), | 863 act = gaim_blist_node_action_new(_("Get Info"), |
864 silcgaim_chat_getinfo_menu, NULL); | 864 silcgaim_chat_getinfo_menu, |
865 NULL, NULL); | |
865 m = g_list_append(m, act); | 866 m = g_list_append(m, act); |
866 | 867 |
867 #if 0 /* XXX For now these are not implemented. We need better | 868 #if 0 /* XXX For now these are not implemented. We need better |
868 listview dialog from Gaim for these. */ | 869 listview dialog from Gaim for these. */ |
869 if (mode & SILC_CHANNEL_UMODE_CHANOP) { | 870 if (mode & SILC_CHANNEL_UMODE_CHANOP) { |
870 act = gaim_blist_node_action_new(_("Invite List"), | 871 act = gaim_blist_node_action_new(_("Invite List"), |
871 silcgaim_chat_invitelist, NULL); | 872 silcgaim_chat_invitelist, |
873 NULL, NULL); | |
872 m = g_list_append(m, act); | 874 m = g_list_append(m, act); |
873 | 875 |
874 act = gaim_blist_node_action_new(_("Ban List"), | 876 act = gaim_blist_node_action_new(_("Ban List"), |
875 silcgaim_chat_banlist, NULL); | 877 silcgaim_chat_banlist, |
878 NULL, NULL); | |
876 m = g_list_append(m, act); | 879 m = g_list_append(m, act); |
877 } | 880 } |
878 #endif | 881 #endif |
879 | 882 |
880 if (chu) { | 883 if (chu) { |
881 act = gaim_blist_node_action_new(_("Add Private Group"), | 884 act = gaim_blist_node_action_new(_("Add Private Group"), |
882 silcgaim_chat_prv, NULL); | 885 silcgaim_chat_prv, |
886 NULL, NULL); | |
883 m = g_list_append(m, act); | 887 m = g_list_append(m, act); |
884 } | 888 } |
885 | 889 |
886 if (mode & SILC_CHANNEL_UMODE_CHANFO) { | 890 if (mode & SILC_CHANNEL_UMODE_CHANFO) { |
887 act = gaim_blist_node_action_new(_("Channel Authentication"), | 891 act = gaim_blist_node_action_new(_("Channel Authentication"), |
888 silcgaim_chat_chauth, NULL); | 892 silcgaim_chat_chauth, |
893 NULL, NULL); | |
889 m = g_list_append(m, act); | 894 m = g_list_append(m, act); |
890 | 895 |
891 if (channel->mode & SILC_CHANNEL_MODE_FOUNDER_AUTH) { | 896 if (channel->mode & SILC_CHANNEL_MODE_FOUNDER_AUTH) { |
892 act = gaim_blist_node_action_new(_("Reset Permanent"), | 897 act = gaim_blist_node_action_new(_("Reset Permanent"), |
893 silcgaim_chat_permanent_reset, NULL); | 898 silcgaim_chat_permanent_reset, |
899 NULL, NULL); | |
894 m = g_list_append(m, act); | 900 m = g_list_append(m, act); |
895 } else { | 901 } else { |
896 act = gaim_blist_node_action_new(_("Set Permanent"), | 902 act = gaim_blist_node_action_new(_("Set Permanent"), |
897 silcgaim_chat_permanent, NULL); | 903 silcgaim_chat_permanent, |
904 NULL, NULL); | |
898 m = g_list_append(m, act); | 905 m = g_list_append(m, act); |
899 } | 906 } |
900 } | 907 } |
901 | 908 |
902 if (mode & SILC_CHANNEL_UMODE_CHANOP) { | 909 if (mode & SILC_CHANNEL_UMODE_CHANOP) { |
903 act = gaim_blist_node_action_new(_("Set User Limit"), | 910 act = gaim_blist_node_action_new(_("Set User Limit"), |
904 silcgaim_chat_ulimit, NULL); | 911 silcgaim_chat_ulimit, |
912 NULL, NULL); | |
905 m = g_list_append(m, act); | 913 m = g_list_append(m, act); |
906 | 914 |
907 if (channel->mode & SILC_CHANNEL_MODE_TOPIC) { | 915 if (channel->mode & SILC_CHANNEL_MODE_TOPIC) { |
908 act = gaim_blist_node_action_new(_("Reset Topic Restriction"), | 916 act = gaim_blist_node_action_new(_("Reset Topic Restriction"), |
909 silcgaim_chat_resettopic, NULL); | 917 silcgaim_chat_resettopic, |
918 NULL, NULL); | |
910 m = g_list_append(m, act); | 919 m = g_list_append(m, act); |
911 } else { | 920 } else { |
912 act = gaim_blist_node_action_new(_("Set Topic Restriction"), | 921 act = gaim_blist_node_action_new(_("Set Topic Restriction"), |
913 silcgaim_chat_settopic, NULL); | 922 silcgaim_chat_settopic, |
923 NULL, NULL); | |
914 m = g_list_append(m, act); | 924 m = g_list_append(m, act); |
915 } | 925 } |
916 | 926 |
917 if (channel->mode & SILC_CHANNEL_MODE_PRIVATE) { | 927 if (channel->mode & SILC_CHANNEL_MODE_PRIVATE) { |
918 act = gaim_blist_node_action_new(_("Reset Private Channel"), | 928 act = gaim_blist_node_action_new(_("Reset Private Channel"), |
919 silcgaim_chat_resetprivate, NULL); | 929 silcgaim_chat_resetprivate, |
930 NULL, NULL); | |
920 m = g_list_append(m, act); | 931 m = g_list_append(m, act); |
921 } else { | 932 } else { |
922 act = gaim_blist_node_action_new(_("Set Private Channel"), | 933 act = gaim_blist_node_action_new(_("Set Private Channel"), |
923 silcgaim_chat_setprivate, NULL); | 934 silcgaim_chat_setprivate, |
935 NULL, NULL); | |
924 m = g_list_append(m, act); | 936 m = g_list_append(m, act); |
925 } | 937 } |
926 | 938 |
927 if (channel->mode & SILC_CHANNEL_MODE_SECRET) { | 939 if (channel->mode & SILC_CHANNEL_MODE_SECRET) { |
928 act = gaim_blist_node_action_new(_("Reset Secret Channel"), | 940 act = gaim_blist_node_action_new(_("Reset Secret Channel"), |
929 silcgaim_chat_resetsecret, NULL); | 941 silcgaim_chat_resetsecret, |
942 NULL, NULL); | |
930 m = g_list_append(m, act); | 943 m = g_list_append(m, act); |
931 } else { | 944 } else { |
932 act = gaim_blist_node_action_new(_("Set Secret Channel"), | 945 act = gaim_blist_node_action_new(_("Set Secret Channel"), |
933 silcgaim_chat_setsecret, NULL); | 946 silcgaim_chat_setsecret, |
947 NULL, NULL); | |
934 m = g_list_append(m, act); | 948 m = g_list_append(m, act); |
935 } | 949 } |
936 } | 950 } |
937 | 951 |
938 return m; | 952 return m; |