pidgin/gtkblist.c

changeset 17858
14d53a1be2ee
parent 17486
81eb43dbc844
parent 17855
0a00914d5c5a
child 17877
1b4384bff09a
equal deleted inserted replaced
17488:b3d3b6442306 17858:14d53a1be2ee
272 return FALSE; 272 return FALSE;
273 } 273 }
274 274
275 static void gtk_blist_menu_info_cb(GtkWidget *w, PurpleBuddy *b) 275 static void gtk_blist_menu_info_cb(GtkWidget *w, PurpleBuddy *b)
276 { 276 {
277 PurpleNotifyUserInfo *info = purple_notify_user_info_new(); 277 pidgin_retrieve_user_info(b->account->gc, purple_buddy_get_name(b));
278 purple_notify_user_info_add_pair(info, _("Information"), _("Retrieving..."));
279 purple_notify_userinfo(b->account->gc, purple_buddy_get_name(b), info, NULL, NULL);
280 purple_notify_user_info_destroy(info);
281
282 serv_get_info(b->account->gc, b->name);
283 } 278 }
284 279
285 static void gtk_blist_menu_im_cb(GtkWidget *w, PurpleBuddy *b) 280 static void gtk_blist_menu_im_cb(GtkWidget *w, PurpleBuddy *b)
286 { 281 {
287 pidgin_dialogs_im_with_user(b->account, b->name); 282 pidgin_dialogs_im_with_user(b->account, b->name);
1140 0, 0, NULL); 1135 0, 0, NULL);
1141 } 1136 }
1142 } 1137 }
1143 1138
1144 static gboolean 1139 static gboolean
1145 gtk_blist_key_press_cb(GtkWidget *tv, GdkEventKey *event, gpointer data) { 1140 gtk_blist_key_press_cb(GtkWidget *tv, GdkEventKey *event, gpointer data)
1141 {
1146 PurpleBlistNode *node; 1142 PurpleBlistNode *node;
1147 GValue val; 1143 GValue val;
1148 GtkTreeIter iter; 1144 GtkTreeIter iter;
1149 GtkTreeSelection *sel; 1145 GtkTreeSelection *sel;
1150 1146
1167 buddy = (PurpleBuddy*)node; 1163 buddy = (PurpleBuddy*)node;
1168 } else { 1164 } else {
1169 return FALSE; 1165 return FALSE;
1170 } 1166 }
1171 if(buddy) 1167 if(buddy)
1172 serv_get_info(buddy->account->gc, buddy->name); 1168 pidgin_retrieve_user_info(buddy->account->gc, buddy->name);
1173 } else if (event->keyval == GDK_F2) { 1169 } else if (event->keyval == GDK_F2) {
1174 gtk_blist_menu_alias_cb(tv, node); 1170 gtk_blist_menu_alias_cb(tv, node);
1175 } 1171 }
1176 1172
1177 return FALSE; 1173 return FALSE;
1421 prpl = purple_find_prpl(purple_account_get_protocol_id(b->account)); 1417 prpl = purple_find_prpl(purple_account_get_protocol_id(b->account));
1422 if (prpl != NULL) 1418 if (prpl != NULL)
1423 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); 1419 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
1424 1420
1425 if (prpl && prpl_info->get_info) 1421 if (prpl && prpl_info->get_info)
1426 serv_get_info(b->account->gc, b->name); 1422 pidgin_retrieve_user_info(b->account->gc, b->name);
1427 handled = TRUE; 1423 handled = TRUE;
1428 } 1424 }
1429 1425
1430 #if (1) 1426 #if (1)
1431 /* 1427 /*
3835 } 3831 }
3836 3832
3837 static gboolean 3833 static gboolean
3838 gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, PidginBuddyList *gtkblist) 3834 gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, PidginBuddyList *gtkblist)
3839 { 3835 {
3840 GtkWidget *imhtml; 3836 GtkWidget *widget;
3841 3837
3842 if (!gtkblist) 3838 if (!gtkblist)
3843 return FALSE; 3839 return FALSE;
3844 3840
3845 imhtml = gtk_window_get_focus(GTK_WINDOW(gtkblist->window)); 3841 widget = gtk_window_get_focus(GTK_WINDOW(gtkblist->window));
3846 3842
3847 if (GTK_IS_IMHTML(imhtml) && gtk_bindings_activate(GTK_OBJECT(imhtml), event->keyval, event->state)) 3843 if (GTK_IS_IMHTML(widget) || GTK_IS_ENTRY(widget)) {
3848 return TRUE; 3844 if (gtk_bindings_activate(GTK_OBJECT(widget), event->keyval, event->state))
3845 return TRUE;
3846 }
3849 return FALSE; 3847 return FALSE;
3850 } 3848 }
3851 3849
3852 static gboolean 3850 static gboolean
3853 headline_hover_close(int x, int y) 3851 headline_hover_close(int x, int y)

mercurial