pidgin/pidginnotificationaddcontact.c

Sun, 03 Nov 2024 00:05:44 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 03 Nov 2024 00:05:44 -0500
changeset 43045
308e8d0ce68c
parent 42963
049b6a96fd2a
permissions
-rw-r--r--

remove purple3-url-handler.desktop.in.in

The application that did the launching was removed long ago. Also this should
be implemented by the user interfaces and they might provide separate files to
groups schemas as well.

Testing Done:
Called in the turtles.

Reviewed at https://reviews.imfreedom.org/r/3640/

41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #include <glib/gi18n-lib.h>
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #include <purple.h>
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #include "pidgin/pidginnotificationaddcontact.h"
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 struct _PidginNotificationAddContact {
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
30 PidginNotification parent;
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 };
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
42575
580339aa47cc Make sure all of the final types in pidgin are defined as such
Gary Kramlich <grim@reaperworld.com>
parents: 42202
diff changeset
33 G_DEFINE_FINAL_TYPE(PidginNotificationAddContact,
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
34 pidgin_notification_add_contact, PIDGIN_TYPE_NOTIFICATION)
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 /******************************************************************************
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 * Callbacks
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 *****************************************************************************/
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 static void
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
40 pidgin_notification_add_contact_create_dm_cb(GObject *self,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
41 GAsyncResult *result,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
42 G_GNUC_UNUSED gpointer data)
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 {
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
44 PurpleContact *contact = PURPLE_CONTACT(self);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
45 PurpleConversation *conversation = NULL;
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
46 GError *error = NULL;
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
48 conversation = purple_contact_create_dm_finish(contact, result, &error);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
49 if(error != NULL) {
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
50 g_warning("failed to create dm for %s: %s",
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
51 purple_contact_info_get_name_for_display(PURPLE_CONTACT_INFO(contact)),
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
52 error->message);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
53
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
54 g_clear_error(&error);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
55 g_clear_object(&conversation);
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
57 return;
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
58 }
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
60 if(PURPLE_IS_CONVERSATION(conversation)) {
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
61 purple_conversation_present(conversation);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
62 }
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
63
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
64 g_clear_object(&conversation);
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 }
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
67 /******************************************************************************
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
68 * Actions
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
69 *****************************************************************************/
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 static void
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
71 pidgin_notification_add_contact_message(GtkWidget *self,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
72 G_GNUC_UNUSED const char *action_name,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
73 G_GNUC_UNUSED GVariant *parameter)
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 {
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
75 PidginNotification *pidgin_notification = PIDGIN_NOTIFICATION(self);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
76 PurpleNotification *purple_notification = NULL;
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 PurpleAddContactRequest *request = NULL;
42710
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
78 PurpleContact *contact = NULL;
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
79 PurpleConversation *conversation = NULL;
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
81 purple_notification = pidgin_notification_get_notification(pidgin_notification);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
82 request = purple_notification_add_contact_get_request(PURPLE_NOTIFICATION_ADD_CONTACT(purple_notification));
42914
27c407608b6b Update Purple.AddContactRequest to use a PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents: 42804
diff changeset
83 contact = purple_add_contact_request_get_contact(request);
42710
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
84
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
85 conversation = purple_contact_find_dm(contact);
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
86 if(PURPLE_IS_CONVERSATION(conversation)) {
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
87 purple_conversation_present(conversation);
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
88 } else {
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
89 purple_contact_create_dm_async(contact, NULL,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
90 pidgin_notification_add_contact_create_dm_cb,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
91 NULL);
42710
d122647268be Remove pidgin_dialogs_im_with_user
Gary Kramlich <grim@reaperworld.com>
parents: 42620
diff changeset
92 }
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 }
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 /******************************************************************************
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 * GObject Implementation
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 *****************************************************************************/
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 static void
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
99 pidgin_notification_add_contact_init(PidginNotificationAddContact *notification)
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 {
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
101 gtk_widget_init_template(GTK_WIDGET(notification));
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 }
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 static void
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 pidgin_notification_add_contact_class_init(PidginNotificationAddContactClass *klass)
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 {
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 gtk_widget_class_set_template_from_resource(
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 widget_class,
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
111 "/im/pidgin/Pidgin3/notificationaddcontact.ui"
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 );
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
114 #if 0
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
115 /* This is disabled because it uses the request API and we really need to
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
116 * create a real dialog for this instead.
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
117 */
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
118 gtk_widget_class_install_action(widget_class, "notification.add-contact",
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
119 NULL,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
120 pidgin_notification_add_contact_add_contact);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
121 #endif
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
122 gtk_widget_class_install_action(widget_class, "notification.message",
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
123 NULL,
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
124 pidgin_notification_add_contact_message);
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 }
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 /******************************************************************************
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 * API
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 *****************************************************************************/
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 GtkWidget *
42963
049b6a96fd2a Tweak a few things with Pidgin.NotificationAddContact
Gary Kramlich <grim@reaperworld.com>
parents: 42940
diff changeset
131 pidgin_notification_add_contact_new(PurpleNotificationAddContact *notification)
049b6a96fd2a Tweak a few things with Pidgin.NotificationAddContact
Gary Kramlich <grim@reaperworld.com>
parents: 42940
diff changeset
132 {
42940
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
133 g_return_val_if_fail(PURPLE_IS_NOTIFICATION_ADD_CONTACT(notification),
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
134 NULL);
240eb66a3795 Create Pidgin.Notification to simplify the custom widgets
Gary Kramlich <grim@reaperworld.com>
parents: 42914
diff changeset
135
41517
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 return g_object_new(
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 PIDGIN_TYPE_NOTIFICATION_ADD_CONTACT,
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 "notification", notification,
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 NULL);
5bafe75d3907 Replace the request_add Account UiOp with a new AddContact notification
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 }

mercurial