pidgin/gtkutils.c

changeset 42833
b83bb3a80b7a
parent 42716
268ffbddb677
equal deleted inserted replaced
42832:4f1a305877aa 42833:b83bb3a80b7a
57 { 57 {
58 /* This finds the currently active window and makes that the parent window. */ 58 /* This finds the currently active window and makes that the parent window. */
59 GList *windows = NULL; 59 GList *windows = NULL;
60 GtkWindow *parent = NULL; 60 GtkWindow *parent = NULL;
61 gpointer parent_from; 61 gpointer parent_from;
62 PurpleNotifyType notify_type;
63 62
64 parent_from = g_object_get_data(G_OBJECT(widget), "pidgin-parent-from"); 63 parent_from = g_object_get_data(G_OBJECT(widget), "pidgin-parent-from");
65 if (purple_request_is_valid_ui_handle(parent_from, NULL)) { 64 if (purple_request_is_valid_ui_handle(parent_from, NULL)) {
66 65
67 gtk_window_set_transient_for(GTK_WINDOW(widget), 66 gtk_window_set_transient_for(GTK_WINDOW(widget),
68 gtk_window_get_transient_for( 67 gtk_window_get_transient_for(
69 pidgin_request_get_dialog_window(parent_from))); 68 pidgin_request_get_dialog_window(parent_from)));
70 return TRUE;
71 }
72 if (purple_notify_is_valid_ui_handle(parent_from, &notify_type) &&
73 notify_type == PURPLE_NOTIFY_MESSAGE)
74 {
75 gtk_window_set_transient_for(GTK_WINDOW(widget),
76 gtk_window_get_transient_for(GTK_WINDOW(parent_from)));
77 return TRUE; 69 return TRUE;
78 } 70 }
79 71
80 windows = gtk_window_list_toplevels(); 72 windows = gtk_window_list_toplevels();
81 while (windows) { 73 while (windows) {

mercurial