Fri, 22 May 2020 00:26:20 -0500
Remove the conversation placement preferences and code.
This is a precursor to the UI redesign and it's early removal will make conversation window cleanup easier.
| pidgin/gtkconv.c | file | annotate | diff | comparison | revisions | |
| pidgin/gtkconvwin.h | file | annotate | diff | comparison | revisions | |
| pidgin/gtkprefs.c | file | annotate | diff | comparison | revisions | |
| pidgin/plugins/extplacement.c | file | annotate | diff | comparison | revisions | |
| pidgin/plugins/meson.build | file | annotate | diff | comparison | revisions | |
| pidgin/resources/Prefs/prefs.ui | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkconv.c Thu Jun 18 09:03:17 2020 +0000 +++ b/pidgin/gtkconv.c Fri May 22 00:26:20 2020 -0500 @@ -5829,9 +5829,9 @@ { GList *cl; PurpleConversation *conv; - PidginConversation *gtkconv; for (cl = purple_conversations_get_all(); cl != NULL; cl = cl->next) { + PidginConversation *gtkconv = NULL; conv = (PurpleConversation *)cl->data; @@ -5962,13 +5962,6 @@ } static void -conv_placement_usetabs_cb(const char *name, PurplePrefType type, - gconstpointer value, gpointer data) -{ - purple_prefs_trigger_callback(PIDGIN_PREFS_ROOT "/conversations/placement"); -} - -static void account_status_changed_cb(PurpleAccount *account, PurpleStatus *oldstatus, PurpleStatus *newstatus) { @@ -6036,23 +6029,6 @@ } -static void -conv_placement_pref_cb(const char *name, PurplePrefType type, - gconstpointer value, gpointer data) -{ - PidginConvPlacementFunc func; - - if (!purple_strequal(name, PIDGIN_PREFS_ROOT "/conversations/placement")) - return; - - func = pidgin_conv_placement_get_fnc(value); - - if (func == NULL) - return; - - pidgin_conv_placement_set_current_func(func); -} - static PidginConversation * get_gtkconv_with_contact(PurpleContact *contact) { @@ -6414,8 +6390,6 @@ purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar", TRUE); - purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/placement", "last"); - purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/placement_number", 1); purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor", ""); purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor", ""); purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/font_face", ""); @@ -6467,13 +6441,6 @@ purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/tab_side", tab_side_pref_cb, NULL); - purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/tabs", - conv_placement_usetabs_cb, NULL); - - purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/placement", - conv_placement_pref_cb, NULL); - purple_prefs_trigger_callback(PIDGIN_PREFS_ROOT "/conversations/placement"); - purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/minimum_entry_lines", minimum_entry_lines_pref_cb, NULL); @@ -8528,399 +8495,6 @@ return NULL; } - -/************************************************************************** - * Conversation placement functions - **************************************************************************/ -typedef struct -{ - char *id; - char *name; - PidginConvPlacementFunc fnc; - -} ConvPlacementData; - -static GList *conv_placement_fncs = NULL; -static PidginConvPlacementFunc place_conv = NULL; - -/* This one places conversations in the last made window. */ -static void -conv_placement_last_created_win(PidginConversation *conv) -{ - PidginConvWindow *win; - - GList *l = g_list_last(pidgin_conv_windows_get_list()); - win = l ? l->data : NULL;; - - if (win == NULL) { - win = pidgin_conv_window_new(); - - g_signal_connect(G_OBJECT(win->window), "configure_event", - G_CALLBACK(gtk_conv_configure_cb), NULL); - - pidgin_conv_window_add_gtkconv(win, conv); - pidgin_conv_window_show(win); - } else { - pidgin_conv_window_add_gtkconv(win, conv); - } -} - -/* This one places conversations in the last made window of the same type. */ -static gboolean -conv_placement_last_created_win_type_configured_cb(GtkWidget *w, - GdkEventConfigure *event, PidginConversation *conv) -{ - GdkMonitor *monitor = NULL; - GdkRectangle geo; - int x, y; - GList *all; - - if (gtk_widget_get_visible(w)) - gtk_window_get_position(GTK_WINDOW(w), &x, &y); - else - return FALSE; /* carry on normally */ - - /* Workaround for GTK+ bug # 169811 - "configure_event" is fired - * when the window is being maximized */ - if (gdk_window_get_state(gtk_widget_get_window(w)) & GDK_WINDOW_STATE_MAXIMIZED) - return FALSE; - - monitor = gdk_display_get_monitor_at_window(gdk_display_get_default(), - event->window); - gdk_monitor_get_geometry(monitor, &geo); - - /* don't save off-screen positioning */ - if (x + event->width < geo.x || - y + event->height < geo.y || - x > geo.width || - y > geo.height) { - return FALSE; /* carry on normally */ - } - - for (all = conv->convs; all != NULL; all = all->next) { - if (PURPLE_IS_IM_CONVERSATION(conv->active_conv) != PURPLE_IS_IM_CONVERSATION(all->data)) { - /* this window has different types of conversation, don't save */ - return FALSE; - } - } - - if (PURPLE_IS_IM_CONVERSATION(conv->active_conv)) { - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/im/x", x); - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/im/y", y); - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/im/width", event->width); - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/im/height", event->height); - } else if (PURPLE_IS_CHAT_CONVERSATION(conv->active_conv)) { - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/x", x); - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/y", y); - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/width", event->width); - purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/height", event->height); - } - - return FALSE; -} - -static void -conv_placement_last_created_win_type(PidginConversation *conv) -{ - PidginConvWindow *win; - - if (PURPLE_IS_IM_CONVERSATION(conv->active_conv)) - win = pidgin_conv_window_last_im(); - else - win = pidgin_conv_window_last_chat(); - - if (win == NULL) { - win = pidgin_conv_window_new(); - - if (PURPLE_IS_IM_CONVERSATION(conv->active_conv) || - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/width") == 0) { - pidgin_conv_set_position_size(win, - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/x"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/y"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/width"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/height")); - } else if (PURPLE_IS_CHAT_CONVERSATION(conv->active_conv)) { - pidgin_conv_set_position_size(win, - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/x"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/y"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/width"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/height")); - } - - pidgin_conv_window_add_gtkconv(win, conv); - pidgin_conv_window_show(win); - - g_signal_connect(G_OBJECT(win->window), "configure_event", - G_CALLBACK(conv_placement_last_created_win_type_configured_cb), conv); - } else - pidgin_conv_window_add_gtkconv(win, conv); -} - -/* This one places each conversation in its own window. */ -static void -conv_placement_new_window(PidginConversation *conv) -{ - PidginConvWindow *win; - - win = pidgin_conv_window_new(); - - g_signal_connect(G_OBJECT(win->window), "configure_event", - G_CALLBACK(gtk_conv_configure_cb), NULL); - - pidgin_conv_window_add_gtkconv(win, conv); - - pidgin_conv_window_show(win); -} - -static PurpleGroup * -conv_get_group(PidginConversation *conv) -{ - PurpleGroup *group = NULL; - - if (PURPLE_IS_IM_CONVERSATION(conv->active_conv)) { - PurpleBuddy *buddy; - - buddy = purple_blist_find_buddy(purple_conversation_get_account(conv->active_conv), - purple_conversation_get_name(conv->active_conv)); - - if (buddy != NULL) - group = purple_buddy_get_group(buddy); - - } else if (PURPLE_IS_CHAT_CONVERSATION(conv->active_conv)) { - PurpleChat *chat; - - chat = purple_blist_find_chat(purple_conversation_get_account(conv->active_conv), - purple_conversation_get_name(conv->active_conv)); - - if (chat != NULL) - group = purple_chat_get_group(chat); - } - - return group; -} - -/* - * This groups things by, well, group. Buddies from groups will always be - * grouped together, and a buddy from a group not belonging to any currently - * open windows will get a new window. - */ -static void -conv_placement_by_group(PidginConversation *conv) -{ - PurpleGroup *group = NULL; - GList *wl, *cl; - - group = conv_get_group(conv); - - /* Go through the list of IMs and find one with this group. */ - for (wl = pidgin_conv_windows_get_list(); wl != NULL; wl = wl->next) { - PidginConvWindow *win2; - PidginConversation *conv2; - PurpleGroup *group2 = NULL; - - win2 = wl->data; - - for (cl = win2->gtkconvs; - cl != NULL; - cl = cl->next) { - conv2 = cl->data; - - group2 = conv_get_group(conv2); - - if (group == group2) { - pidgin_conv_window_add_gtkconv(win2, conv); - - return; - } - } - } - - /* Make a new window. */ - conv_placement_new_window(conv); -} - -/* This groups things by account. Otherwise, the same semantics as above */ -static void -conv_placement_by_account(PidginConversation *conv) -{ - GList *wins, *convs; - PurpleAccount *account; - - account = purple_conversation_get_account(conv->active_conv); - - /* Go through the list of IMs and find one with this group. */ - for (wins = pidgin_conv_windows_get_list(); wins != NULL; wins = wins->next) { - PidginConvWindow *win2; - PidginConversation *conv2; - - win2 = wins->data; - - for (convs = win2->gtkconvs; - convs != NULL; - convs = convs->next) { - conv2 = convs->data; - - if (account == purple_conversation_get_account(conv2->active_conv)) { - pidgin_conv_window_add_gtkconv(win2, conv); - return; - } - } - } - - /* Make a new window. */ - conv_placement_new_window(conv); -} - -static ConvPlacementData * -get_conv_placement_data(const char *id) -{ - ConvPlacementData *data = NULL; - GList *n; - - for (n = conv_placement_fncs; n; n = n->next) { - data = n->data; - if (purple_strequal(data->id, id)) - return data; - } - - return NULL; -} - -static void -add_conv_placement_fnc(const char *id, const char *name, - PidginConvPlacementFunc fnc) -{ - ConvPlacementData *data; - - data = g_new(ConvPlacementData, 1); - - data->id = g_strdup(id); - data->name = g_strdup(name); - data->fnc = fnc; - - conv_placement_fncs = g_list_append(conv_placement_fncs, data); -} - -static void -ensure_default_funcs(void) -{ - if (conv_placement_fncs == NULL) { - add_conv_placement_fnc("last", _("Last created window"), - conv_placement_last_created_win); - add_conv_placement_fnc("im_chat", _("Separate IM and Chat windows"), - conv_placement_last_created_win_type); - add_conv_placement_fnc("new", _("New window"), - conv_placement_new_window); - add_conv_placement_fnc("group", _("By group"), - conv_placement_by_group); - add_conv_placement_fnc("account", _("By account"), - conv_placement_by_account); - } -} - -GList * -pidgin_conv_placement_get_options(void) -{ - GList *n, *list = NULL; - ConvPlacementData *data; - - ensure_default_funcs(); - - for (n = conv_placement_fncs; n; n = n->next) { - data = n->data; - list = g_list_append(list, data->name); - list = g_list_append(list, data->id); - } - - return list; -} - - -void -pidgin_conv_placement_add_fnc(const char *id, const char *name, - PidginConvPlacementFunc fnc) -{ - g_return_if_fail(id != NULL); - g_return_if_fail(name != NULL); - g_return_if_fail(fnc != NULL); - - ensure_default_funcs(); - - add_conv_placement_fnc(id, name, fnc); -} - -void -pidgin_conv_placement_remove_fnc(const char *id) -{ - ConvPlacementData *data = get_conv_placement_data(id); - - if (data == NULL) - return; - - conv_placement_fncs = g_list_remove(conv_placement_fncs, data); - - g_free(data->id); - g_free(data->name); - g_free(data); -} - -const char * -pidgin_conv_placement_get_name(const char *id) -{ - ConvPlacementData *data; - - ensure_default_funcs(); - - data = get_conv_placement_data(id); - - if (data == NULL) - return NULL; - - return data->name; -} - -PidginConvPlacementFunc -pidgin_conv_placement_get_fnc(const char *id) -{ - ConvPlacementData *data; - - ensure_default_funcs(); - - data = get_conv_placement_data(id); - - if (data == NULL) - return NULL; - - return data->fnc; -} - -void -pidgin_conv_placement_set_current_func(PidginConvPlacementFunc func) -{ - g_return_if_fail(func != NULL); - - /* If tabs are enabled, set the function, otherwise, NULL it out. */ - if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/tabs")) - place_conv = func; - else - place_conv = NULL; -} - -PidginConvPlacementFunc -pidgin_conv_placement_get_current_func(void) -{ - return place_conv; -} - -void -pidgin_conv_placement_place(PidginConversation *gtkconv) -{ - if (place_conv) - place_conv(gtkconv); - else - conv_placement_new_window(gtkconv); -} - gboolean pidgin_conv_is_hidden(PidginConversation *gtkconv) { @@ -8974,6 +8548,25 @@ return (luminosity_ratio > min_contrast_ratio); } +void +pidgin_conv_placement_place(PidginConversation *conv) { + PidginConvWindow *win; + + GList *l = g_list_last(pidgin_conv_windows_get_list()); + win = l ? l->data : NULL;; + + if (win == NULL) { + win = pidgin_conv_window_new(); + + g_signal_connect(G_OBJECT(win->window), "configure_event", + G_CALLBACK(gtk_conv_configure_cb), NULL); + + pidgin_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_show(win); + } else { + pidgin_conv_window_add_gtkconv(win, conv); + } +} static GArray* generate_nick_colors(guint numcolors, GdkRGBA background)
--- a/pidgin/gtkconvwin.h Thu Jun 18 09:03:17 2020 +0000 +++ b/pidgin/gtkconvwin.h Fri May 22 00:26:20 2020 -0500 @@ -278,53 +278,7 @@ */ PidginConvWindow *pidgin_conv_window_last_chat(void); -/************************************************************************** - * GTK+ Conversation Placement API - **************************************************************************/ - -/** - * PidginConvPlacementFunc: (skip) - */ -typedef void (*PidginConvPlacementFunc)(PidginConversation *conv); - -/** - * pidgin_conv_placement_get_options: (skip) - */ -GList *pidgin_conv_placement_get_options(void); -/** - * pidgin_conv_placement_get_name: (skip) - */ -const char *pidgin_conv_placement_get_name(const char *id); - -/** - * pidgin_conv_placement_place: (skip) - */ -void pidgin_conv_placement_place(PidginConversation *gtkconv); - -/** - * pidgin_conv_placement_add_fnc: (skip) - */ -void pidgin_conv_placement_add_fnc(const char *id, const char *name, PidginConvPlacementFunc fnc); - -/** - * pidgin_conv_placement_remove_fnc: (skip) - */ -void pidgin_conv_placement_remove_fnc(const char *id); - -/** - * pidgin_conv_placement_get_fnc: (skip) - */ -PidginConvPlacementFunc pidgin_conv_placement_get_fnc(const char *id); - -/** - * pidgin_conv_placement_set_current_func: (skip) - */ -void pidgin_conv_placement_set_current_func(PidginConvPlacementFunc func); - -/** - * pidgin_conv_placement_get_current_func: (skip) - */ -PidginConvPlacementFunc pidgin_conv_placement_get_current_func(void); +void pidgin_conv_placement_place(PidginConversation *conv); G_END_DECLS
--- a/pidgin/gtkprefs.c Thu Jun 18 09:03:17 2020 +0000 +++ b/pidgin/gtkprefs.c Fri May 22 00:26:20 2020 -0500 @@ -111,7 +111,6 @@ GtkWidget *tabs_vbox; GtkWidget *close_on_tabs; PidginPrefCombo tab_side; - PidginPrefCombo placement; } conversations; } iface; @@ -1709,14 +1708,6 @@ win->iface.conversations.tab_side.type = PURPLE_PREF_INT; win->iface.conversations.tab_side.key = PIDGIN_PREFS_ROOT "/conversations/tab_side"; pidgin_prefs_bind_dropdown(&win->iface.conversations.tab_side); - - win->iface.conversations.placement.type = PURPLE_PREF_STRING; - win->iface.conversations.placement.key = PIDGIN_PREFS_ROOT "/conversations/placement"; - names = pidgin_conv_placement_get_options(); - pidgin_prefs_bind_dropdown_from_list( - &win->iface.conversations.placement, - names); - g_list_free(names); } /* This is also Win32-specific, but must be visible for Glade binding. */ @@ -3488,9 +3479,6 @@ gtk_widget_class_bind_template_child( widget_class, PidginPrefsWindow, iface.conversations.tab_side.combo); - gtk_widget_class_bind_template_child( - widget_class, PidginPrefsWindow, - iface.conversations.placement.combo); /* Browser page */ gtk_widget_class_bind_template_child( @@ -3852,8 +3840,6 @@ /* Rename some old prefs */ purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_ims", "/purple/logging/log_ims"); purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_chats", "/purple/logging/log_chats"); - purple_prefs_rename("/purple/conversations/placement", - PIDGIN_PREFS_ROOT "/conversations/placement"); purple_prefs_rename(PIDGIN_PREFS_ROOT "/conversations/im/raise_on_events", "/plugins/gtk/X11/notify/method_raise");
--- a/pidgin/plugins/extplacement.c Thu Jun 18 09:03:17 2020 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* - * Extra conversation placement options for Purple - * - * Pidgin is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA. - */ - -#include <glib/gi18n-lib.h> - -#include "pidgin.h" -#include <purple.h> - -#include "pidginplugininfo.h" -#include "gtkconv.h" -#include "gtkconvwin.h" - -static void -conv_placement_by_number(PidginConversation *conv) -{ - PidginConvWindow *win = NULL; - GList *wins = NULL; - - if (purple_prefs_get_bool("/plugins/gtk/extplacement/placement_number_separate")) - win = PURPLE_IS_IM_CONVERSATION(conv->active_conv) ? - pidgin_conv_window_last_im() : pidgin_conv_window_last_chat(); - else if ((wins = pidgin_conv_windows_get_list()) != NULL) - win = g_list_last(wins)->data; - - if (win == NULL) { - win = pidgin_conv_window_new(); - - pidgin_conv_window_add_gtkconv(win, conv); - pidgin_conv_window_show(win); - } else { - int max_count = purple_prefs_get_int("/plugins/gtk/extplacement/placement_number"); - int count = pidgin_conv_window_get_gtkconv_count(win); - - if (count < max_count) - pidgin_conv_window_add_gtkconv(win, conv); - else { - GList *l = NULL; - - for (l = pidgin_conv_windows_get_list(); l != NULL; l = l->next) { - win = l->data; - - if (!conv || !conv->active_conv || - !G_TYPE_FROM_INSTANCE(conv->active_conv)) - { - g_warn_if_reached(); - continue; - } - - if (purple_prefs_get_bool("/plugins/gtk/extplacement/placement_number_separate") && - G_TYPE_FROM_INSTANCE(pidgin_conv_window_get_active_conversation(win)) != G_TYPE_FROM_INSTANCE(conv->active_conv)) - continue; - - count = pidgin_conv_window_get_gtkconv_count(win); - if (count < max_count) { - pidgin_conv_window_add_gtkconv(win, conv); - return; - } - } - win = pidgin_conv_window_new(); - - pidgin_conv_window_add_gtkconv(win, conv); - pidgin_conv_window_show(win); - } - } -} - -static PurplePluginPrefFrame * -get_plugin_pref_frame(PurplePlugin *plugin) { - PurplePluginPrefFrame *frame; - PurplePluginPref *ppref; - - frame = purple_plugin_pref_frame_new(); - - ppref = purple_plugin_pref_new_with_label(_("Conversation Placement")); - purple_plugin_pref_frame_add(frame, ppref); - - /* Translators: "New conversations" should match the text in the preferences dialog and "By conversation count" should be the same text used above */ - ppref = purple_plugin_pref_new_with_label(_("Note: The preference for \"New conversations\" must be set to \"By conversation count\".")); - purple_plugin_pref_set_pref_type(ppref, PURPLE_PLUGIN_PREF_INFO); - purple_plugin_pref_frame_add(frame, ppref); - - ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/gtk/extplacement/placement_number", - _("Number of conversations per window")); - purple_plugin_pref_set_bounds(ppref, 1, 50); - purple_plugin_pref_frame_add(frame, ppref); - - ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/gtk/extplacement/placement_number_separate", - _("Separate IM and Chat windows when placing by number")); - purple_plugin_pref_frame_add(frame, ppref); - - return frame; -} - -static PidginPluginInfo * -plugin_query(GError **error) -{ - const gchar * const authors[] = { - "Stu Tomlinson <stu@nosnilmot.com>", - NULL - }; - - return pidgin_plugin_info_new( - "id", "gtk-extplacement", - "name", N_("ExtPlacement"), - "version", DISPLAY_VERSION, - "category", N_("User interface"), - "summary", N_("Extra conversation placement options."), - "description", N_("Restrict the number of conversations per " - "windows, optionally separating IMs and " - "Chats"), - "authors", authors, - "website", PURPLE_WEBSITE, - "abi-version", PURPLE_ABI_VERSION, - "pref-frame-cb", get_plugin_pref_frame, - NULL - ); -} - -static gboolean -plugin_load(PurplePlugin *plugin, GError **error) -{ - purple_prefs_add_none("/plugins/gtk/extplacement"); - purple_prefs_add_int("/plugins/gtk/extplacement/placement_number", 4); - purple_prefs_add_bool("/plugins/gtk/extplacement/placement_number_separate", FALSE); - - pidgin_conv_placement_add_fnc("number", _("By conversation count"), - &conv_placement_by_number); - purple_prefs_trigger_callback(PIDGIN_PREFS_ROOT "/conversations/placement"); - return TRUE; -} - -static gboolean -plugin_unload(PurplePlugin *plugin, GError **error) -{ - pidgin_conv_placement_remove_fnc("number"); - purple_prefs_trigger_callback(PIDGIN_PREFS_ROOT "/conversations/placement"); - return TRUE; -} - -PURPLE_PLUGIN_INIT(extplacement, plugin_query, plugin_load, plugin_unload);
--- a/pidgin/plugins/meson.build Thu Jun 18 09:03:17 2020 +0000 +++ b/pidgin/plugins/meson.build Fri May 22 00:26:20 2020 -0500 @@ -25,11 +25,6 @@ dependencies : [libpurple_dep, libpidgin_dep, glib], name_prefix : '') - extplacement = library('extplacement', 'extplacement.c', - dependencies : [libpurple_dep, libpidgin_dep, glib], - name_prefix : '', - install : true, install_dir : PIDGIN_PLUGINDIR) - gtkbuddynote = library('gtkbuddynote', 'gtkbuddynote.c', dependencies : [libpurple_dep, libpidgin_dep, glib], name_prefix : '',
--- a/pidgin/resources/Prefs/prefs.ui Thu Jun 18 09:03:17 2020 +0000 +++ b/pidgin/resources/Prefs/prefs.ui Fri May 22 00:26:20 2020 -0500 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 +<!-- Generated with glade 3.22.2 Pidgin - Internet Messenger Copyright (C) Pidgin Developers <devel@pidgin.im> @@ -424,7 +424,7 @@ <property name="title" translatable="yes">Preferences</property> <property name="type_hint">dialog</property> <signal name="destroy" handler="delete_prefs" swapped="no"/> - <child> + <child type="titlebar"> <placeholder/> </child> <child internal-child="vbox"> @@ -602,21 +602,6 @@ <property name="orientation">vertical</property> <property name="spacing">6</property> <child> - <object class="GtkCheckButton" id="iface.conversations.tabs"> - <property name="label" translatable="yes">Show IMs and chats in _tabbed windows</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> <object class="GtkBox" id="iface.conversations.tabs_vbox"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -682,51 +667,6 @@ <property name="position">1</property> </packing> </child> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">N_ew conversations:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">iface.conversations.placement.combo</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkComboBox" id="iface.conversations.placement.combo"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="model">iface.conversations.placement.store</property> - <child> - <object class="GtkCellRendererText"/> - <attributes> - <attribute name="text">0</attribute> - </attributes> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> </object> <packing> <property name="expand">False</property> @@ -3583,7 +3523,6 @@ <widgets> <widget name="label2"/> <widget name="label3"/> - <widget name="label4"/> </widgets> </object> <object class="GtkSizeGroup" id="network.sg">