All pastes #838922 Raw Edit

Something

public diff v1 · immutable
#838922 ·published 2007-12-30 19:18 UTC
rendered paste body
## old_revision [727139407200208b856b6f72702347ad9f0f9c5a]## patch "pidgin/gtkmain.c"#  from [15c86e499e4532d12e0eb34243b45a4496e195dc]#    to [7f8cd7f89659b07abeb6f93d60643fa5bb87c395]# # patch "pidgin/hildon-hacks.c"#  from [31423c6eaca36f02eba719e23237f7505c71e3fd]#    to [cf564f30f6af0c79a852ab8138d1a90427f27824]# # patch "pidgin/hildon-hacks.h"#  from [7515910782eb118d76e24adc38b537c5e27672ba]#    to [87a0ebe78a78ab2807537b7fb071054e0db387ff]#============================================================--- pidgin/gtkmain.c    15c86e499e4532d12e0eb34243b45a4496e195dc+++ pidgin/gtkmain.c    7f8cd7f89659b07abeb6f93d60643fa5bb87c395@@ -315,6 +315,7 @@ pidgin_ui_init(void)        purple_idle_set_ui_ops(pidgin_idle_get_ui_ops()); #endif +       _hildon_hacks_init();        pidgin_stock_init();        pidgin_account_init();        pidgin_connection_init();@@ -355,6 +356,7 @@ pidgin_quit(void)        pidgin_account_uninit();        pidgin_xfers_uninit();        pidgin_debug_uninit();+       _hildon_hacks_uninit();         if(NULL != ui_info)                g_hash_table_destroy(ui_info);============================================================--- pidgin/hildon-hacks.c       31423c6eaca36f02eba719e23237f7505c71e3fd+++ pidgin/hildon-hacks.c       cf564f30f6af0c79a852ab8138d1a90427f27824@@ -5,6 +5,8 @@  #include <gdk/gdkkeysyms.h> #include "hildon-hacks.h"+#include "gtkblist.h"+#include "gtkutils.h"  /*  * The following is a hack. It attempts to convince a dialog to become as large@@ -180,4 +182,48 @@ _pidgin_window_set_allow_fullscreen(GtkW                g_signal_connect(G_OBJECT(window), "key-press-event", (GCallback)fullscreen_window_key_pressed_cb, NULL);        } }++static void (*orig_gtk_window_show)(GtkWidget *widget) = NULL;++static void+my_gtk_window_show(GtkWidget *widget)+{+       if (orig_gtk_window_show)+               orig_gtk_window_show(widget);++       if (!widget)+               return;++       if (GTK_IS_WINDOW(widget)) {+               PidginBuddyList *blist = NULL;+               GtkWindow *wnd = GTK_WINDOW(widget);++               if (gtk_window_get_type_hint(wnd) == GDK_WINDOW_TYPE_HINT_DIALOG)+                       if (gtk_window_get_transient_for(wnd) == NULL)+                               if (!pidgin_auto_parent_window(widget))+                                       if ((blist = pidgin_blist_get_default_gtk_blist()) != NULL)+                                               if (blist->window)+                                                       gtk_window_set_transient_for(wnd, GTK_WINDOW(blist->window));+       }+}++void _hildon_hacks_init(void)+{+       GtkWidgetClass *gtk_widget_class = NULL;++       g_type_class_ref(GTK_TYPE_WINDOW);+       if ((gtk_widget_class = g_type_class_peek(GTK_TYPE_WINDOW)) != NULL) {+               orig_gtk_window_show = gtk_widget_class->show;+               gtk_widget_class->show = my_gtk_window_show;+       }+}++void _hildon_hacks_uninit(void)+{+       GtkWidgetClass *gtk_widget_class = NULL;++       if ((gtk_widget_class = g_type_class_peek(GTK_TYPE_WINDOW)) != NULL)+               gtk_widget_class->show = my_gtk_window_show;+       g_type_class_unref(GTK_TYPE_WINDOW);+} #endif /* USE_HILDON */============================================================--- pidgin/hildon-hacks.h       7515910782eb118d76e24adc38b537c5e27672ba+++ pidgin/hildon-hacks.h       87a0ebe78a78ab2807537b7fb071054e0db387ff@@ -33,9 +33,14 @@ void _pidgin_window_set_allow_fullscreen  void _pidgin_window_set_allow_fullscreen(GtkWidget *window, gboolean can_fullscreen); +void _hildon_hacks_init(void);+void _hildon_hacks_uninit(void);+ #else /* !USE_HILDON */ # define _pidgin_make_container_scrollable(container,toplevel) container # define _pidgin_window_set_allow_fullscreen(window,can_fullscreen)+#      define _hildon_hacks_init()+#      define _hildon_hacks_uninit() #endif /* USE_HILDON */  G_END_DECLS