Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 7954:6dc91824d8d4
[gaim-migrate @ 8629]
Patch from Gary Kramlich (xgrimx) to remove some old IRC chat stuff
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 29 Dec 2003 07:19:55 +0000 |
parents | fb66c2ee4446 |
children | 1b8261f374ea |
comparison
equal
deleted
inserted
replaced
7953:959ae45dd0c5 | 7954:6dc91824d8d4 |
---|---|
991 if (gtk_tree_selection_get_selected(sel, NULL, &iter)) | 991 if (gtk_tree_selection_get_selected(sel, NULL, &iter)) |
992 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &name, -1); | 992 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &name, -1); |
993 else | 993 else |
994 return; | 994 return; |
995 | 995 |
996 if (*name == '@') name++; | |
997 if (*name == '%') name++; | |
998 if (*name == '+') name++; | |
999 | |
1000 account = gaim_conversation_get_account(conv); | 996 account = gaim_conversation_get_account(conv); |
1001 | 997 |
1002 conv2 = gaim_find_conversation_with_account(name, account); | 998 conv2 = gaim_find_conversation_with_account(name, account); |
1003 | 999 |
1004 if (conv2 != NULL) | 1000 if (conv2 != NULL) |
1183 gtk_tree_selection_select_path(GTK_TREE_SELECTION( | 1179 gtk_tree_selection_select_path(GTK_TREE_SELECTION( |
1184 gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkchat->list))), path); | 1180 gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkchat->list))), path); |
1185 | 1181 |
1186 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path); | 1182 gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path); |
1187 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &who, -1); | 1183 gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &who, -1); |
1188 | |
1189 if (*who == '@') who++; | |
1190 if (*who == '%') who++; | |
1191 if (*who == '+') who++; | |
1192 | 1184 |
1193 if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { | 1185 if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { |
1194 chat_do_im(conv, who); | 1186 chat_do_im(conv, who); |
1195 } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { | 1187 } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { |
1196 static GtkWidget *menu = NULL; | 1188 static GtkWidget *menu = NULL; |
2843 nicks = nicks->next) { | 2835 nicks = nicks->next) { |
2844 | 2836 |
2845 char *nick = nicks->data; | 2837 char *nick = nicks->data; |
2846 /* this checks to see if the current nick could be a completion */ | 2838 /* this checks to see if the current nick could be a completion */ |
2847 if (g_ascii_strncasecmp(nick, entered, strlen(entered))) { | 2839 if (g_ascii_strncasecmp(nick, entered, strlen(entered))) { |
2848 if (*nick != '+' && *nick != '@' && *nick != '%') | |
2849 continue; | |
2850 | |
2851 if (g_ascii_strncasecmp(nick + 1, entered, strlen(entered))) { | 2840 if (g_ascii_strncasecmp(nick + 1, entered, strlen(entered))) { |
2852 if (nick[0] != '@' || nick[1] != '+') | |
2853 continue; | |
2854 | |
2855 if (g_ascii_strncasecmp(nick + 2, entered, strlen(entered))) | 2841 if (g_ascii_strncasecmp(nick + 2, entered, strlen(entered))) |
2856 continue; | 2842 continue; |
2857 else | 2843 else |
2858 nick += 2; | 2844 nick += 2; |
2859 } | 2845 } |
2872 nicks = (nicks->next | 2858 nicks = (nicks->next |
2873 ? nicks->next | 2859 ? nicks->next |
2874 : gaim_conv_chat_get_users(chat)); | 2860 : gaim_conv_chat_get_users(chat)); |
2875 | 2861 |
2876 nick = nicks->data; | 2862 nick = nicks->data; |
2877 | |
2878 if (*nick == '@') nick++; | |
2879 if (*nick == '%') nick++; | |
2880 if (*nick == '+') nick++; | |
2881 } | 2863 } |
2882 | 2864 |
2883 gtk_text_buffer_get_start_iter(gtkconv->entry_buffer, | 2865 gtk_text_buffer_get_start_iter(gtkconv->entry_buffer, |
2884 &start_buffer); | 2866 &start_buffer); |
2885 gtk_text_buffer_get_iter_at_mark(gtkconv->entry_buffer, &cursor, | 2867 gtk_text_buffer_get_iter_at_mark(gtkconv->entry_buffer, &cursor, |