comparison pidgin/gtkconv.c @ 32717:194f66d5089a

Use the GtkWidget for a menu instead of its GtkAction.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 23 Feb 2012 09:00:17 +0000
parents 4f8626d4ef63
children 4f2ea402cdc8
comparison
equal deleted inserted replaced
32716:4f8626d4ef63 32717:194f66d5089a
3390 } 3390 }
3391 3391
3392 static void 3392 static void
3393 regenerate_attention_items(PidginWindow *win) 3393 regenerate_attention_items(PidginWindow *win)
3394 { 3394 {
3395 GtkWidget *attention;
3395 GtkWidget *menu; 3396 GtkWidget *menu;
3396 PurpleConversation *conv; 3397 PurpleConversation *conv;
3397 PurpleConnection *pc; 3398 PurpleConnection *pc;
3398 PurplePlugin *prpl = NULL; 3399 PurplePlugin *prpl = NULL;
3399 PurplePluginProtocolInfo *prpl_info = NULL; 3400 PurplePluginProtocolInfo *prpl_info = NULL;
3401 3402
3402 conv = pidgin_conv_window_get_active_conversation(win); 3403 conv = pidgin_conv_window_get_active_conversation(win);
3403 if (!conv) 3404 if (!conv)
3404 return; 3405 return;
3405 3406
3407 attention = gtk_ui_manager_get_widget(win->menu.ui,
3408 "/Conversation/ConversationMenu/GetAttention");
3409
3406 /* Remove the previous entries */ 3410 /* Remove the previous entries */
3407 gtk_menu_item_set_submenu(GTK_MENU_ITEM(win->menu.get_attention), NULL); 3411 gtk_menu_item_set_submenu(GTK_MENU_ITEM(attention), NULL);
3408 3412
3409 pc = purple_conversation_get_connection(conv); 3413 pc = purple_conversation_get_connection(conv);
3410 if (pc != NULL) 3414 if (pc != NULL)
3411 prpl = purple_connection_get_prpl(pc); 3415 prpl = purple_connection_get_prpl(pc);
3412 if (prpl != NULL) 3416 if (prpl != NULL)
3435 3439
3436 index++; 3440 index++;
3437 list = g_list_delete_link(list, list); 3441 list = g_list_delete_link(list, list);
3438 } 3442 }
3439 3443
3440 gtk_menu_item_set_submenu(GTK_MENU_ITEM(win->menu.get_attention), menu); 3444 gtk_menu_item_set_submenu(GTK_MENU_ITEM(attention), menu);
3441 gtk_widget_show_all(menu); 3445 gtk_widget_show_all(menu);
3442 } 3446 }
3443 } 3447 }
3444 } 3448 }
3445 3449