/soc/2015/mmcc/main: 44c18ab0caa0: remove old, unused, and confu...
Michael McConville <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: 44c18ab0caa0e4488c2c710668a1d7fdb367695e Author: Michael McConville <[email protected]> Date: 2015-06-24 20:57 -0400 Branch: default URL: https://hg.pidgin.im/soc/2015/mmcc/main/rev/44c18ab0caa0 Description: remove old, unused, and confusing #if 0'd blocks diffstat: libpurple/xmlnode.c | 13 ------- pidgin/gtkmedia.c | 7 ---- pidgin/gtkutils.c | 57 ---------------------------------- pidgin/plugins/gevolution/gevolution.c | 36 +------------------- 4 files changed, 3 insertions(+), 110 deletions(-) diffs (198 lines): diff --git a/libpurple/xmlnode.c b/libpurple/xmlnode.c --- a/libpurple/xmlnode.c +++ b/libpurple/xmlnode.c @@ -74,19 +74,6 @@ purple_xmlnode_new_child(PurpleXmlNode * node = new_node(name, PURPLE_XMLNODE_TYPE_TAG); purple_xmlnode_insert_child(parent, node); -#if 0 - /* This would give PurpleXmlNodes more appropriate namespacing - * when creating them. Otherwise, unless an explicit namespace - * is set, purple_xmlnode_get_namespace() will return NULL, when - * there may be a default namespace. - * - * I'm unconvinced that it's useful, and concerned it may break things. - * - * _insert_child would need the same thing, probably (assuming - * xmlns->node == NULL) - */ - purple_xmlnode_set_namespace(node, purple_xmlnode_get_default_namespace(node)) -#endif return node; } diff --git a/pidgin/gtkmedia.c b/pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c +++ b/pidgin/gtkmedia.c @@ -124,13 +124,6 @@ static void pidgin_media_set_state(Pidgi static GtkWindowClass *parent_class = NULL; -#if 0 -enum { - LAST_SIGNAL -}; -static guint pidgin_media_signals[LAST_SIGNAL] = {0}; -#endif - enum { PROP_0, PROP_MEDIA, diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c --- a/pidgin/gtkutils.c +++ b/pidgin/gtkutils.c @@ -2838,62 +2838,6 @@ pidgin_add_widget_to_vbox(GtkBox *vbox, gboolean pidgin_auto_parent_window(GtkWidget *widget) { -#if 0 - /* This looks at the most recent window that received focus, and makes - * that the parent window. */ -#ifndef _WIN32 - static GdkAtom _WindowTime = GDK_NONE; - static GdkAtom _Cardinal = GDK_NONE; - GList *windows = NULL; - GtkWidget *parent = NULL; - time_t window_time = 0; - - windows = gtk_window_list_toplevels(); - - if (_WindowTime == GDK_NONE) { - _WindowTime = gdk_x11_xatom_to_atom(gdk_x11_get_xatom_by_name("_NET_WM_USER_TIME")); - } - if (_Cardinal == GDK_NONE) { - _Cardinal = gdk_atom_intern("CARDINAL", FALSE); - } - - while (windows) { - GtkWidget *window = windows->data; - guchar *data = NULL; - int al = 0; - time_t value; - - windows = g_list_delete_link(windows, windows); - - if (window == widget || - !gtk_widget_get_visible(window)) - continue; - - if (!gdk_property_get(window->window, _WindowTime, _Cardinal, 0, sizeof(time_t), FALSE, - NULL, NULL, &al, &data)) - continue; - value = *(time_t *)data; - if (window_time < value) { - window_time = value; - parent = window; - } - g_free(data); - } - if (windows) - g_list_free(windows); - if (parent) { - if (!gtk_get_current_event() && gtk_window_has_toplevel_focus(GTK_WINDOW(parent))) { - /* The window is in focus, and the new window was not triggered by a keypress/click - * event. So do not set it transient, to avoid focus stealing and all that. - */ - return FALSE; - } - gtk_window_set_transient_for(GTK_WINDOW(widget), GTK_WINDOW(parent)); - return TRUE; - } - return FALSE; -#endif -#else /* This finds the currently active window and makes that the parent window. */ GList *windows = NULL; GtkWindow *parent = NULL; @@ -2962,7 +2906,6 @@ gboolean pidgin_auto_parent_window(GtkWi return TRUE; } return FALSE; -#endif } static GObject *pidgin_pixbuf_from_data_helper(const guchar *buf, gsize count, gboolean animated) diff --git a/pidgin/plugins/gevolution/gevolution.c b/pidgin/plugins/gevolution/gevolution.c --- a/pidgin/plugins/gevolution/gevolution.c +++ b/pidgin/plugins/gevolution/gevolution.c @@ -37,21 +37,6 @@ #include "gevolution.h" -#if 0 -/* These are private headers that we probably should never have been - * including. Maybe very early versions of e-d-s required this? - * - * also, bonobo has gone away as of e-d-s 2.29.1, and this plugin still - * seems to work even on e-d-s 1.10.3 without us touching it. - * Maybe it's not really working though. I'm sure we'll find out. - */ -#include <libedata-book/Evolution-DataServer-Addressbook.h> - -#include <libedata-book/e-data-book-factory.h> -/* TODO: bonobo is going away eventually, we'll need to find an alternative */ -#include <bonobo/bonobo-main.h> -#endif - #include <glib.h> #define GEVOLUTION_PLUGIN_ID "gtk-x11-gevolution" @@ -306,7 +291,6 @@ blist_node_extended_menu_cb(PurpleBlistN } } -/* TODO: Something in here leaks 1 reference to a bonobo object! */ static gboolean load_timeout(gpointer data) { @@ -316,7 +300,6 @@ load_timeout(gpointer data) timer = 0; - /* Maybe this is it? */ if (!gevo_load_addressbook(NULL, &book, &err)) { purple_debug_error("evolution", @@ -327,7 +310,6 @@ load_timeout(gpointer data) query = e_book_query_any_field_contains(""); - /* Is it this? */ book_view_tag = e_book_async_get_book_view(book, query, NULL, -1, got_book_view_cb, NULL); @@ -509,20 +491,12 @@ plugin_load(PurplePlugin *plugin, GError * at all, so the above explanation is suspect. This is required even with * e-d-s >= 2.29.1 where bonobo is no longer in the picture. */ + /* TODO: Bonobo is in fact no longer in the picture, and hasn't been for a + * while. How much of this function is still necessary? + */ g_module_make_resident(gplugin_native_plugin_get_module( GPLUGIN_NATIVE_PLUGIN(plugin))); -#if 0 - if (!bonobo_init_full(NULL, NULL, bonobo_activation_orb_get(), - CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) - { - purple_debug_error("evolution", "Unable to initialize bonobo.\n"); - } -#endif -#if 0 - bonobo_activate(); -#endif - backup_blist_ui_ops = purple_blist_get_ui_ops(); blist_ui_ops = g_memdup(backup_blist_ui_ops, sizeof(PurpleBlistUiOps)); @@ -561,10 +535,6 @@ plugin_unload(PurplePlugin *plugin, GErr book = NULL; } -#if 0 - bonobo_debug_shutdown(); -#endif - return TRUE; } _______________________________________________ Commits mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/commits