Sat, 14 Nov 2020 03:15:43 -0600
Create a new ContactList that will eventually fully replace PidginBuddyList
Create a new PidginContactList window and move the application actions to PidginApplication.
Testing Done:
* Verified menus are properly disabled while offline
* Verified menu items that require a protocol with chats enables the chat menu items as well as the room list menu items
* Verified that the menu items can become enabled while the menus are opened
* Verified that the application actions are activatable via dbus
* Verified that the plugin manager action was migrated successfully
* Verified that the account manager action was migrated successfully
Reviewed at https://reviews.imfreedom.org/r/174/
| 39223 | 1 | /* pidgin |
| 2 | * | |
| 3 | * Pidgin is the legal property of its developers, whose names are too numerous | |
| 4 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 5 | * source distribution. | |
| 6 | * | |
| 7 | * This program is free software; you can redistribute it and/or modify | |
| 8 | * it under the terms of the GNU General Public License as published by | |
| 9 | * the Free Software Foundation; either version 2 of the License, or | |
| 10 | * (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 18 | * along with this program; if not, write to the Free Software | |
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | |
| 20 | * | |
| 21 | */ | |
| 22 | ||
| 23 | #include <pidgin/pidgintalkatu.h> | |
| 24 | ||
| 25 | GtkWidget * | |
| 26 | pidgin_talkatu_editor_new_for_connection(PurpleConnection *pc) { | |
|
40484
7df95db772d8
Update a a few things that were changed in talkatu
Gary Kramlich <grim@reaperworld.com>
parents:
39223
diff
changeset
|
27 | GtkWidget *editor = NULL, *input = NULL; |
| 39223 | 28 | |
| 29 | g_return_val_if_fail(pc != NULL, NULL); | |
| 30 | ||
| 31 | editor = talkatu_editor_new(); | |
|
40484
7df95db772d8
Update a a few things that were changed in talkatu
Gary Kramlich <grim@reaperworld.com>
parents:
39223
diff
changeset
|
32 | input = talkatu_editor_get_input(TALKATU_EDITOR(editor)); |
| 39223 | 33 | |
| 34 | gtk_text_view_set_buffer( | |
|
40484
7df95db772d8
Update a a few things that were changed in talkatu
Gary Kramlich <grim@reaperworld.com>
parents:
39223
diff
changeset
|
35 | GTK_TEXT_VIEW(input), |
| 39223 | 36 | pidgin_talkatu_buffer_new_for_connection(pc) |
| 37 | ); | |
| 38 | ||
| 39 | return editor; | |
| 40 | } | |
| 41 | ||
| 42 | GtkTextBuffer * | |
| 43 | pidgin_talkatu_buffer_new_for_connection(PurpleConnection *pc) { | |
| 44 | PurpleConnectionFlags flags = 0; | |
| 45 | GtkTextBuffer *buffer = NULL; | |
| 46 | ||
| 47 | g_return_val_if_fail(pc != NULL, NULL); | |
| 48 | ||
| 49 | flags = purple_connection_get_flags(pc); | |
| 50 | ||
| 51 | if(flags & PURPLE_CONNECTION_FLAG_HTML) { | |
| 52 | buffer = talkatu_html_buffer_new(); | |
| 53 | } else if(flags & PURPLE_CONNECTION_FLAG_FORMATTING_WBFO) { | |
| 54 | buffer = talkatu_whole_buffer_new(); | |
| 55 | } else { | |
| 56 | buffer = talkatu_buffer_new(NULL); | |
| 57 | } | |
| 58 | ||
| 59 | return buffer; | |
|
40484
7df95db772d8
Update a a few things that were changed in talkatu
Gary Kramlich <grim@reaperworld.com>
parents:
39223
diff
changeset
|
60 | } |