comparison src/gtkconv.c @ 10864:55e29b8e9689

[gaim-migrate @ 12548] sf patch 1189105, from Will Thompson "Completes the previously commented-out block in gtkconv.c dealing with Alt-#. Checks that the tab exists before switching to it." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 24 Apr 2005 21:26:33 +0000
parents bdd72261ec8c
children c522fdb85dbc
comparison
equal deleted inserted replaced
10863:f289e9f76053 10864:55e29b8e9689
1731 break; 1731 break;
1732 1732
1733 } /* End of switch */ 1733 } /* End of switch */
1734 } 1734 }
1735 1735
1736 #if 0
1737 /* If ALT (or whatever) was held down... */ 1736 /* If ALT (or whatever) was held down... */
1738 else if (event->state & GDK_MOD1_MASK) 1737 else if (event->state & GDK_MOD1_MASK)
1739 { 1738 {
1740 /* XXX - Make sure the conv exists before switching to it */ 1739 if (event->keyval > '0' && event->keyval <= '9')
1741 if (event->keyval > '0' && event->keyval <= '9') { 1740 {
1742 int switchto = event->keyval - '1'; 1741 int switchto = event->keyval - '1';
1743 if (switchto < numconvs) 1742 if (switchto < gaim_conv_window_get_conversation_count(win))
1744 gaim_conv_window_switch_conversation(win, switchto); 1743 gtk_notebook_set_current_page(GTK_NOTEBOOK(gtkwin->notebook), switchto);
1745 1744
1746 return TRUE; 1745 return TRUE;
1747 } 1746 }
1748 } 1747 }
1749 #endif
1750 1748
1751 /* If neither CTRL nor ALT were held down... */ 1749 /* If neither CTRL nor ALT were held down... */
1752 else 1750 else
1753 { 1751 {
1754 switch (event->keyval) 1752 switch (event->keyval)