Thu, 25 Aug 2022 21:34:53 -0500
Port the invite dialog to GTK4
Testing Done:
Opened the dialog via conversations -> invite and made sure it worked as expected.
Reviewed at https://reviews.imfreedom.org/r/1644/
|
41136
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This program is free software; you can redistribute it and/or modify |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation; either version 2 of the License, or |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | #include "purpleidleui.h" |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | /****************************************************************************** |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | * GInterface Implementation |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | *****************************************************************************/ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | G_DEFINE_INTERFACE(PurpleIdleUi, purple_idle_ui, G_TYPE_INVALID) |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | static void |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | purple_idle_ui_default_init(PurpleIdleUiInterface *iface) { |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | } |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | /****************************************************************************** |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | * Public API |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | *****************************************************************************/ |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | time_t |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | purple_idle_ui_get_idle_time(PurpleIdleUi *ui) { |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | PurpleIdleUiInterface *iface = NULL; |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | g_return_val_if_fail(PURPLE_IS_IDLE_UI(ui), 0); |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | iface = PURPLE_IDLE_UI_GET_IFACE(ui); |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | if(iface != NULL && iface->get_idle_time != NULL) { |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | return iface->get_idle_time(ui); |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | } |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | return 0; |
|
5397330041d6
Replace PurpleIdleUiOps with the PurpleIdleUi Interface
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | } |