pidgin/plugins/unity/unity.c

changeset 42295
5ac321d71801
parent 42291
a86b7bcbb471
child 42342
7498c6982122
equal deleted inserted replaced
42294:462317d1382d 42295:5ac321d71801
155 155
156 static int 156 static int
157 alert(PurpleConversation *conv) 157 alert(PurpleConversation *conv)
158 { 158 {
159 gint count; 159 gint count;
160 PidginConversation *gtkconv = NULL; 160 PidginConversationOld *gtkconv = NULL;
161 PidginDisplayWindow *displaywin = NULL; 161 PidginDisplayWindow *displaywin = NULL;
162 GtkRoot *root = NULL; 162 GtkRoot *root = NULL;
163 GtkWidget *win = NULL; 163 GtkWidget *win = NULL;
164 164
165 if (conv == NULL || PIDGIN_CONVERSATION(conv) == NULL) 165 if (conv == NULL || PIDGIN_CONVERSATION_OLD(conv) == NULL)
166 return 0; 166 return 0;
167 167
168 gtkconv = PIDGIN_CONVERSATION(conv); 168 gtkconv = PIDGIN_CONVERSATION_OLD(conv);
169 root = gtk_widget_get_root(gtkconv->tab_cont); 169 root = gtk_widget_get_root(gtkconv->tab_cont);
170 win = GTK_WIDGET(root); 170 win = GTK_WIDGET(root);
171 displaywin = PIDGIN_DISPLAY_WINDOW(win); 171 displaywin = PIDGIN_DISPLAY_WINDOW(win);
172 172
173 if (!gtk_widget_has_focus(win) || 173 if (!gtk_widget_has_focus(win) ||
303 if (conv) { 303 if (conv) {
304 GtkRoot *root = NULL; 304 GtkRoot *root = NULL;
305 GtkWidget *win = NULL; 305 GtkWidget *win = NULL;
306 PidginDisplayWindow *displaywin = NULL; 306 PidginDisplayWindow *displaywin = NULL;
307 307
308 root = gtk_widget_get_root(PIDGIN_CONVERSATION(conv)->tab_cont); 308 root = gtk_widget_get_root(PIDGIN_CONVERSATION_OLD(conv)->tab_cont);
309 win = GTK_WIDGET(root); 309 win = GTK_WIDGET(root);
310 displaywin = PIDGIN_DISPLAY_WINDOW(win); 310 displaywin = PIDGIN_DISPLAY_WINDOW(win);
311 311
312 unalert(conv); 312 unalert(conv);
313 313
314 pidgin_display_window_select(displaywin, conv); 314 pidgin_display_window_select(displaywin, conv);
315 315
316 gtk_root_set_focus(root, PIDGIN_CONVERSATION(conv)->entry); 316 gtk_root_set_focus(root, PIDGIN_CONVERSATION_OLD(conv)->entry);
317 } 317 }
318 g_strfreev (sections); 318 g_strfreev (sections);
319 } 319 }
320 320
321 static PurpleSavedStatus * 321 static PurpleSavedStatus *
454 } 454 }
455 455
456 static int 456 static int
457 attach_signals(PurpleConversation *conv) 457 attach_signals(PurpleConversation *conv)
458 { 458 {
459 PidginConversation *gtkconv = NULL; 459 PidginConversationOld *gtkconv = NULL;
460 guint id; 460 guint id;
461 461
462 gtkconv = PIDGIN_CONVERSATION(conv); 462 gtkconv = PIDGIN_CONVERSATION_OLD(conv);
463 if (!gtkconv) 463 if (!gtkconv)
464 return 0; 464 return 0;
465 465
466 id = g_signal_connect(G_OBJECT(gtkconv->entry), "focus-in-event", 466 id = g_signal_connect(G_OBJECT(gtkconv->entry), "focus-in-event",
467 G_CALLBACK(unalert_cb), conv); 467 G_CALLBACK(unalert_cb), conv);
475 } 475 }
476 476
477 static void 477 static void
478 detach_signals(PurpleConversation *conv) 478 detach_signals(PurpleConversation *conv)
479 { 479 {
480 PidginConversation *gtkconv = NULL; 480 PidginConversationOld *gtkconv = NULL;
481 guint id; 481 guint id;
482 gtkconv = PIDGIN_CONVERSATION(conv); 482 gtkconv = PIDGIN_CONVERSATION_OLD(conv);
483 if (!gtkconv) 483 if (!gtkconv)
484 return; 484 return;
485 485
486 id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(conv), "unity-history-signal")); 486 id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(conv), "unity-history-signal"));
487 g_signal_handler_disconnect(gtkconv->history, id); 487 g_signal_handler_disconnect(gtkconv->history, id);

mercurial