Mon, 06 Dec 2021 23:11:42 -0600
Move conversation management from gtkconv.c to PidginConversationWindow.
This replaces the conversation window's notebook with a treeview and is the
first steps in keeping conversations alive even when they're closed in the
Pidgin ui.
Testing Done:
Opened an im, closed the window, opened the same im again. Opened multiple ims and a chat, verified all functioned as expected.
Reviewed at https://reviews.imfreedom.org/r/1108/
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PIDGIN_CONVERSATION_WINDOW_H |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PIDGIN_CONVERSATION_WINDOW_H |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <gtk/gtk.h> |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
34 | #include <purple.h> |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
35 | |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | G_BEGIN_DECLS |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | |
|
41124
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
38 | /** |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
39 | * PidginConversationWindow: |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
40 | * |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
41 | * #PidginConversationWindow is a widget that contains #PidginConversations. |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
42 | * |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
43 | * Since: 3.0.0 |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
44 | */ |
|
95555046173e
Convert pidgin from gtk-doc to gi-docgen
Gary Kramlich <grim@reaperworld.com>
parents:
40577
diff
changeset
|
45 | |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | #define PIDGIN_TYPE_CONVERSATION_WINDOW (pidgin_conversation_window_get_type()) |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | G_DECLARE_FINAL_TYPE(PidginConversationWindow, pidgin_conversation_window, |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | PIDGIN, CONVERSATION_WINDOW, GtkApplicationWindow) |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | /** |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * pidgin_conversation_window_new: |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | * |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | * Creates a new #PidginConversationWindow instance. |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | * |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * Returns: (transfer full): The new #PidginConversationWindow instance. |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | */ |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | GtkWidget *pidgin_conversation_window_new(void); |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | /** |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
60 | * pidgin_conversation_window_get_default: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
61 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
62 | * Gets or creates the default conversation window. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
63 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
64 | * Returns: (transfer none): The default #PidginConversationWindow. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
65 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
66 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
67 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
68 | GtkWidget *pidgin_conversation_window_get_default(void); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
69 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
70 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
71 | * pidgin_conversation_window_add: |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | * @window: The #PidginConversationWindow instance. |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
73 | * @conversation: The #PurpleConversation to add to @window. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
74 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
75 | * Adds @conversation to @window. If @conversation is already in @window, this |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
76 | * does nothing. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
77 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
78 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
79 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
80 | void pidgin_conversation_window_add(PidginConversationWindow *window, PurpleConversation *conversation); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
81 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
82 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
83 | * pidgin_conversation_window_remove: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
84 | * @window: The #PidginConversationWindow instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
85 | * @conversation: The #PurpleConversation to remove from @window. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
86 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
87 | * Removes @conversation from @window. If @conversation is not in @window, this |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
88 | * does nothing. |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | * |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
90 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
91 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
92 | void pidgin_conversation_window_remove(PidginConversationWindow *window, PurpleConversation *conversation); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
93 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
94 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
95 | * pidgin_conversation_window_get_count: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
96 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
97 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
98 | * Gets the number of conversations that @window contains. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
99 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
100 | * Returns: The number of conversations that @window contains. |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | * |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
102 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
103 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
104 | guint pidgin_conversation_window_get_count(PidginConversationWindow *window); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
105 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
106 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
107 | * pidgin_conversation_window_get_selected: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
108 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
109 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
110 | * Gets the currently selected PurpleConversation or %NULL if there is no |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
111 | * selection. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
112 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
113 | * Returns: (transfer full): The selected PurpleConversation or %NULL. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
114 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
115 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
116 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
117 | PurpleConversation *pidgin_conversation_window_get_selected(PidginConversationWindow *window); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
118 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
119 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
120 | * pidgin_conversation_window_select: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
121 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
122 | * @conversation: The conversation to select. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
123 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
124 | * Selects @conversation, making it the active conversation. |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | * |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | * Since: 3.0.0 |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
127 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
128 | void pidgin_conversation_window_select(PidginConversationWindow *window, PurpleConversation *conversation); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
129 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
130 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
131 | * pidgin_conversation_window_select_previous: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
132 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
133 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
134 | * Switches to the conversation previous to the currently selected |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
135 | * conversation. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
136 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
137 | * If no conversation is selected, the last conversation will be selected. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
138 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
139 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
140 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
141 | void pidgin_conversation_window_select_previous(PidginConversationWindow *window); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
142 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
143 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
144 | * pidgin_conversation_window_select_next: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
145 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
146 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
147 | * Switches to the conversation next of the currently selected conversation. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
148 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
149 | * If no conversation is selected, the first conversation will be selected. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
150 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
151 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
152 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
153 | void pidgin_conversation_window_select_next(PidginConversationWindow *window); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
154 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
155 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
156 | * pidgin_conversation_window_select_first: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
157 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
158 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
159 | * Selects the first conversation in @window. If there are no conversations in |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
160 | * @window this does nothing. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
161 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
162 | * Since: 3.0.0 |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | */ |
|
41184
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
164 | void pidgin_conversation_window_select_first(PidginConversationWindow *window); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
165 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
166 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
167 | * pidgin_conversation_window_select_last: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
168 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
169 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
170 | * Selects the last conversation in @window. If there are no conversations in |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
171 | * @window this does nothing. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
172 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
173 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
174 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
175 | void pidgin_conversation_window_select_last(PidginConversationWindow *window); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
176 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
177 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
178 | * pidgin_conversation_window_select_nth: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
179 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
180 | * @nth: The index of the conversation to switch to. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
181 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
182 | * Switches to the @nth conversation. @nth is a 0 based index, so the first |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
183 | * conversation is at index 0. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
184 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
185 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
186 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
187 | void pidgin_conversation_window_select_nth(PidginConversationWindow *window, guint nth); |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
188 | |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
189 | /** |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
190 | * pidgin_conversation_window_conversation_is_selected: |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
191 | * @window: The conversation window instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
192 | * @conversation: The conversation instance. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
193 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
194 | * Checks whether @conversation is the active conversation in @window. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
195 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
196 | * Returns: %TRUE if @conversation is active. |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
197 | * |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
198 | * Since: 3.0.0 |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
199 | */ |
|
05b5c210352b
Move conversation management from gtkconv.c to PidginConversationWindow.
Gary Kramlich <grim@reaperworld.com>
parents:
41124
diff
changeset
|
200 | gboolean pidgin_conversation_window_conversation_is_selected(PidginConversationWindow *window, PurpleConversation *conversation); |
|
40577
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
201 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
202 | G_END_DECLS |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
203 | |
|
953d563429b8
Create a new PidginConversationWindow widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
204 | #endif /* PIDGIN_CONVERSATION_WINDOW_H */ |