pidgin/gtkutils.c

branch
soc.2013.gobjectification.plugins
changeset 36783
8eadcfdb65ca
parent 36782
64936dae41a3
parent 34956
1efbfacf93ee
child 36838
9dd39a792240
equal deleted inserted replaced
36782:64936dae41a3 36783:8eadcfdb65ca
59 #include "gtkprefs.h" 59 #include "gtkprefs.h"
60 60
61 #include "gtkconv.h" 61 #include "gtkconv.h"
62 #include "gtkdialogs.h" 62 #include "gtkdialogs.h"
63 #include "pidginstock.h" 63 #include "pidginstock.h"
64 #include "gtkrequest.h"
64 #include "gtkthemes.h" 65 #include "gtkthemes.h"
65 #include "gtkutils.h" 66 #include "gtkutils.h"
66 #include "gtkwebview.h" 67 #include "gtkwebview.h"
67 #include "gtkwebviewtoolbar.h" 68 #include "gtkwebviewtoolbar.h"
68 #include "pidgin/minidialog.h" 69 #include "pidgin/minidialog.h"
2918 /* This finds the currently active window and makes that the parent window. */ 2919 /* This finds the currently active window and makes that the parent window. */
2919 GList *windows = NULL; 2920 GList *windows = NULL;
2920 GtkWindow *parent = NULL; 2921 GtkWindow *parent = NULL;
2921 GdkEvent *event = gtk_get_current_event(); 2922 GdkEvent *event = gtk_get_current_event();
2922 GdkWindow *menu = NULL; 2923 GdkWindow *menu = NULL;
2924 gpointer parent_from;
2925 PurpleNotifyType notify_type;
2926
2927 parent_from = g_object_get_data(G_OBJECT(widget), "pidgin-parent-from");
2928 if (purple_request_is_valid_ui_handle(parent_from, NULL)) {
2929
2930 gtk_window_set_transient_for(GTK_WINDOW(widget),
2931 gtk_window_get_transient_for(
2932 pidgin_request_get_dialog_window(parent_from)));
2933 return TRUE;
2934 }
2935 if (purple_notify_is_valid_ui_handle(parent_from, &notify_type) &&
2936 notify_type == PURPLE_NOTIFY_MESSAGE)
2937 {
2938 gtk_window_set_transient_for(GTK_WINDOW(widget),
2939 gtk_window_get_transient_for(GTK_WINDOW(parent_from)));
2940 return TRUE;
2941 }
2923 2942
2924 if (event == NULL) 2943 if (event == NULL)
2925 /* The window was not triggered by a user action. */ 2944 /* The window was not triggered by a user action. */
2926 return FALSE; 2945 return FALSE;
2927 2946

mercurial