pidgin/pidgin

0773c993abd8
Parents 74c0f140048d
Children 38f54b5851f7
Migrate add-chat and add-buddy to the new menu
--- a/pidgin/gtkblist.c Tue Mar 31 00:59:49 2020 -0500
+++ b/pidgin/gtkblist.c Tue Mar 31 01:49:27 2020 -0500
@@ -3524,9 +3524,6 @@
/* Buddies menu */
{ "BuddiesMenu", NULL, N_("_Buddies"), NULL, NULL, NULL },
{ "JoinAChat", PIDGIN_STOCK_CHAT, N_("Join a _Chat..."), "<control>C", NULL, pidgin_blist_joinchat_show },
- { "SortMenu", NULL, N_("_Sort Buddies"), NULL, NULL, NULL },
- { "AddBuddy", GTK_STOCK_ADD, N_("_Add Buddy..."), "<control>B", NULL, pidgin_blist_add_buddy_cb },
- { "AddChat", GTK_STOCK_ADD, N_("Add C_hat..."), NULL, NULL, pidgin_blist_add_chat_cb },
/* Accounts menu */
{ "AccountsMenu", NULL, N_("_Accounts"), NULL, NULL, NULL },
@@ -3541,12 +3538,6 @@
"<menubar name='BList'>"
"<menu action='BuddiesMenu'>"
"<menuitem action='JoinAChat'/>"
- "<separator/>"
- "<menu action='SortMenu'/>"
- "<separator/>"
- "<menuitem action='AddBuddy'/>"
- "<menuitem action='AddChat'/>"
- "<separator/>"
"</menu>"
"<menu action='AccountsMenu'>"
"</menu>"
--- a/pidgin/pidginactiongroup.c Tue Mar 31 00:59:49 2020 -0500
+++ b/pidgin/pidginactiongroup.c Tue Mar 31 01:49:27 2020 -0500
@@ -55,8 +55,8 @@
PIDGIN_ACTION_NEW_MESSAGE,
// PIDGIN_ACTION_JOIN_CHAT,
PIDGIN_ACTION_GET_USER_INFO,
- // PIDGIN_ACTION_ADD_BUDDY,
- // PIDGIN_ACTION_ADD_CHAT,
+ PIDGIN_ACTION_ADD_BUDDY,
+ PIDGIN_ACTION_ADD_CHAT,
PIDGIN_ACTION_ADD_GROUP,
PIDGIN_ACTION_PRIVACY,
};
@@ -344,6 +344,20 @@
}
static void
+pidgin_action_group_add_buddy(GSimpleAction *simple, GVariant *parameter,
+ gpointer data)
+{
+ purple_blist_request_add_buddy(NULL, NULL, NULL, NULL);
+}
+
+static void
+pidgin_action_group_add_chat(GSimpleAction *simple, GVariant *parameter,
+ gpointer data)
+{
+ purple_blist_request_add_chat(NULL, NULL, NULL, NULL);
+}
+
+static void
pidgin_action_group_add_group(GSimpleAction *simple, GVariant *parameter,
gpointer data)
{
@@ -536,6 +550,12 @@
.name = PIDGIN_ACTION_ABOUT,
.activate = pidgin_action_group_about,
}, {
+ .name = PIDGIN_ACTION_ADD_BUDDY,
+ .activate = pidgin_action_group_add_buddy,
+ }, {
+ .name = PIDGIN_ACTION_ADD_CHAT,
+ .activate = pidgin_action_group_add_chat,
+ }, {
.name = PIDGIN_ACTION_ADD_GROUP,
.activate = pidgin_action_group_add_group,
}, {
--- a/pidgin/pidginactiongroup.h Tue Mar 31 00:59:49 2020 -0500
+++ b/pidgin/pidginactiongroup.h Tue Mar 31 01:49:27 2020 -0500
@@ -34,6 +34,22 @@
#define PIDGIN_ACTION_ABOUT ("about")
/**
+ * PIDGIN_ACTION_ADD_BUDDY:
+ *
+ * A constant that represents the add-buddy action to add a buddy to the
+ * contact list.
+ */
+#define PIDGIN_ACTION_ADD_BUDDY ("add-buddy")
+
+/**
+ * PIDGIN_ACTION_ADD_CHAT:
+ *
+ * A constant that represents the add-chat action to add a chat to the
+ * contact list.
+ */
+#define PIDGIN_ACTION_ADD_CHAT ("add-chat")
+
+/**
* PIDGIN_ACTION_ADD_GROUP:
*
* A constant that represents the add-group action to add a group to the