Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 8133:7616ff76fe07
[gaim-migrate @ 8838]
Make ctrl+tab work like it used to.
Turns out that function was as silly as a thought.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 17 Jan 2004 17:43:32 +0000 |
parents | 0dc9fffb1e28 |
children | 8633dc570442 |
comparison
equal
deleted
inserted
replaced
8132:6425177d2d79 | 8133:7616ff76fe07 |
---|---|
1245 } | 1245 } |
1246 | 1246 |
1247 return TRUE; | 1247 return TRUE; |
1248 } | 1248 } |
1249 | 1249 |
1250 static void | |
1251 move_to_next_unread_tab(GaimConversation *conv) | |
1252 { | |
1253 GaimConversation *next_conv = NULL; | |
1254 GaimConvWindow *win; | |
1255 GList *l; | |
1256 int index, i; | |
1257 | |
1258 win = gaim_conversation_get_window(conv); | |
1259 index = gaim_conversation_get_index(conv); | |
1260 | |
1261 /* First check the tabs after this position. */ | |
1262 for (l = g_list_nth(gaim_conv_window_get_conversations(win), index); | |
1263 l != NULL; | |
1264 l = l->next) { | |
1265 | |
1266 next_conv = (GaimConversation *)l->data; | |
1267 | |
1268 if (gaim_conversation_get_unseen(next_conv) > 0) | |
1269 break; | |
1270 | |
1271 next_conv = NULL; | |
1272 } | |
1273 | |
1274 if (next_conv == NULL) { | |
1275 | |
1276 /* Now check before this position. */ | |
1277 for (l = gaim_conv_window_get_conversations(win), i = 0; | |
1278 l != NULL && i < index; | |
1279 l = l->next) { | |
1280 | |
1281 next_conv = (GaimConversation *)l->data; | |
1282 | |
1283 if (gaim_conversation_get_unseen(next_conv) > 0) | |
1284 break; | |
1285 | |
1286 next_conv = NULL; | |
1287 } | |
1288 | |
1289 if (next_conv == NULL) { | |
1290 /* Okay, just grab the next conversation tab. */ | |
1291 if (index == gaim_conv_window_get_conversation_count(win) - 1) | |
1292 next_conv = gaim_conv_window_get_conversation_at(win, 0); | |
1293 else | |
1294 next_conv = gaim_conv_window_get_conversation_at(win, index + 1); | |
1295 } | |
1296 } | |
1297 | |
1298 if (next_conv != NULL && next_conv != conv) { | |
1299 gaim_conv_window_switch_conversation(win, | |
1300 gaim_conversation_get_index(next_conv)); | |
1301 } | |
1302 } | |
1303 | |
1250 static gboolean | 1304 static gboolean |
1251 entry_key_press_cb(GtkWidget *entry, GdkEventKey *event, gpointer data) | 1305 entry_key_press_cb(GtkWidget *entry, GdkEventKey *event, gpointer data) |
1252 { | 1306 { |
1253 GaimConvWindow *win; | 1307 GaimConvWindow *win; |
1254 GaimConversation *conv; | 1308 GaimConversation *conv; |
1328 return TRUE; | 1382 return TRUE; |
1329 break; | 1383 break; |
1330 | 1384 |
1331 case GDK_Page_Up: | 1385 case GDK_Page_Up: |
1332 case ']': | 1386 case ']': |
1387 gaim_conv_window_switch_conversation(win, (curconv + 1) % numconvs); | |
1388 | |
1389 return TRUE; | |
1390 break; | |
1391 | |
1333 case GDK_Tab: | 1392 case GDK_Tab: |
1334 gaim_conv_window_switch_conversation(win, (curconv + 1) % numconvs); | 1393 move_to_next_unread_tab(conv); |
1335 | 1394 |
1336 return TRUE; | 1395 return TRUE; |
1337 break; | 1396 break; |
1338 | 1397 |
1339 case 'l': | 1398 case 'l': |