| 69 } |
69 } |
| 70 return purple_menu_action_new(label, PURPLE_CALLBACK(visibility_cb), NULL, NULL); |
70 return purple_menu_action_new(label, PURPLE_CALLBACK(visibility_cb), NULL, NULL); |
| 71 } |
71 } |
| 72 |
72 |
| 73 static void |
73 static void |
| 74 show_private_list(PurplePluginAction *action, guint16 list_type, const gchar *list_description, const gchar *menu_action_name) |
74 show_private_list(PurplePluginAction *action, guint16 list_type, const gchar *title, const gchar *list_description, const gchar *menu_action_name) |
| 75 { |
75 { |
| 76 PurpleConnection *gc = (PurpleConnection *) action->context; |
76 PurpleConnection *gc = (PurpleConnection *) action->context; |
| 77 OscarData *od = purple_connection_get_protocol_data(gc); |
77 OscarData *od = purple_connection_get_protocol_data(gc); |
| 78 PurpleAccount *account = purple_connection_get_account(gc); |
78 PurpleAccount *account = purple_connection_get_account(gc); |
| 79 GSList *buddies, *filtered_buddies, *cur; |
79 GSList *buddies, *filtered_buddies, *cur; |
| 99 g_slist_free(filtered_buddies); |
99 g_slist_free(filtered_buddies); |
| 100 |
100 |
| 101 secondary = g_strdup_printf(_("You can add a buddy to this list " |
101 secondary = g_strdup_printf(_("You can add a buddy to this list " |
| 102 "by right-clicking on them and " |
102 "by right-clicking on them and " |
| 103 "selecting \"%s\""), menu_action_name); |
103 "selecting \"%s\""), menu_action_name); |
| 104 purple_notify_formatted(gc, NULL, list_description, secondary, text, NULL, NULL); |
104 purple_notify_formatted(gc, title, list_description, secondary, text, NULL, NULL); |
| 105 g_free(secondary); |
105 g_free(secondary); |
| 106 g_free(text); |
106 g_free(text); |
| 107 } |
107 } |
| 108 |
108 |
| 109 void |
109 void |
| 110 oscar_show_visible_list(PurplePluginAction *action) |
110 oscar_show_visible_list(PurplePluginAction *action) |
| 111 { |
111 { |
| 112 show_private_list(action, AIM_SSI_TYPE_PERMIT, _("These buddies will see " |
112 show_private_list(action, AIM_SSI_TYPE_PERMIT, _("Visible List"), |
| |
113 _("These buddies will see " |
| 113 "your status when you switch " |
114 "your status when you switch " |
| 114 "to \"Invisible\""), |
115 "to \"Invisible\""), |
| 115 _(APPEAR_ONLINE)); |
116 _(APPEAR_ONLINE)); |
| 116 } |
117 } |
| 117 |
118 |
| 118 void |
119 void |
| 119 oscar_show_invisible_list(PurplePluginAction *action) |
120 oscar_show_invisible_list(PurplePluginAction *action) |
| 120 { |
121 { |
| 121 show_private_list(action, AIM_SSI_TYPE_DENY, _("These buddies will always see you as offline"), _(APPEAR_OFFLINE)); |
122 show_private_list(action, AIM_SSI_TYPE_DENY, _("Invisible List"), |
| |
123 _("These buddies will always see you as offline"), |
| |
124 _(APPEAR_OFFLINE)); |
| 122 } |
125 } |