Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 4621:69f028a6f357
[gaim-migrate @ 4912]
Added half-op support, used on some IRC networks. Also fixed the bug
where trying to IM a person in a chat with a @, %, or + prefix was keeping
that prefix for the username in the IM window.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 27 Feb 2003 09:42:18 +0000 |
parents | 5fcb44d771d2 |
children | 5cdfd20daa07 |
comparison
equal
deleted
inserted
replaced
4620:fb520992d5a1 | 4621:69f028a6f357 |
---|---|
549 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &name, -1); | 549 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &name, -1); |
550 else | 550 else |
551 return; | 551 return; |
552 | 552 |
553 if (*name == '@') name++; | 553 if (*name == '@') name++; |
554 if (*name == '%') name++; | |
554 if (*name == '+') name++; | 555 if (*name == '+') name++; |
555 | 556 |
556 account = gaim_conversation_get_account(conv); | 557 account = gaim_conversation_get_account(conv); |
557 | 558 |
558 conv2 = gaim_find_conversation(name); | 559 conv2 = gaim_find_conversation(name); |
710 gtk_tree_selection_select_path(GTK_TREE_SELECTION( | 711 gtk_tree_selection_select_path(GTK_TREE_SELECTION( |
711 gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkchat->list))), path); | 712 gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkchat->list))), path); |
712 | 713 |
713 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path); | 714 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path); |
714 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &who, -1); | 715 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &who, -1); |
716 | |
717 if (*who == '@') who++; | |
718 if (*who == '%') who++; | |
719 if (*who == '+') who++; | |
715 | 720 |
716 if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { | 721 if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { |
717 struct gaim_conversation *c; | 722 struct gaim_conversation *c; |
718 | 723 |
719 if ((c = gaim_find_conversation(who)) == NULL) | 724 if ((c = gaim_find_conversation(who)) == NULL) |
2237 nicks = nicks->next) { | 2242 nicks = nicks->next) { |
2238 | 2243 |
2239 char *nick = nicks->data; | 2244 char *nick = nicks->data; |
2240 /* this checks to see if the current nick could be a completion */ | 2245 /* this checks to see if the current nick could be a completion */ |
2241 if (g_strncasecmp(nick, entered, strlen(entered))) { | 2246 if (g_strncasecmp(nick, entered, strlen(entered))) { |
2242 if (nick[0] != '+' && nick[0] != '@') | 2247 if (*nick != '+' && *nick != '@' && *nick != '%') |
2243 continue; | 2248 continue; |
2244 | 2249 |
2245 if (g_strncasecmp(nick + 1, entered, strlen(entered))) { | 2250 if (g_strncasecmp(nick + 1, entered, strlen(entered))) { |
2246 if (nick[0] != '@' || nick[1] != '+') | 2251 if (nick[0] != '@' || nick[1] != '+') |
2247 continue; | 2252 continue; |
2268 : gaim_chat_get_users(chat)); | 2273 : gaim_chat_get_users(chat)); |
2269 | 2274 |
2270 nick = nicks->data; | 2275 nick = nicks->data; |
2271 | 2276 |
2272 if (*nick == '@') nick++; | 2277 if (*nick == '@') nick++; |
2278 if (*nick == '%') nick++; | |
2273 if (*nick == '+') nick++; | 2279 if (*nick == '+') nick++; |
2274 } | 2280 } |
2275 | 2281 |
2276 gtk_text_buffer_get_start_iter(gtkconv->entry_buffer, | 2282 gtk_text_buffer_get_start_iter(gtkconv->entry_buffer, |
2277 &start_buffer); | 2283 &start_buffer); |