comparison src/gtkconv.c @ 11252:55356a29cdd1

[gaim-migrate @ 13421] sf patch #1238709, from Sadrul Habib Chowdhury Add keyboard shortcuts for shifting tabs around. Shouldn't hurt anything. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 13 Aug 2005 06:04:30 +0000
parents 5c15a709835f
children bb0d7b719af2
comparison
equal deleted inserted replaced
11251:ad9a61894d9b 11252:55356a29cdd1
1717 found = 1; 1717 found = 1;
1718 break; 1718 break;
1719 } 1719 }
1720 } 1720 }
1721 } 1721 }
1722 1722
1723 if (!found) { 1723 if (!found) {
1724 /* Now check from the beginning up to this position. */ 1724 /* Now check from the beginning up to this position. */
1725 for (i = 0; !found && i < index && (next_gtkconv = gaim_gtk_get_gtkconv_at_index(win, i)); i++) { 1725 for (i = 0; !found && i < index && (next_gtkconv = gaim_gtk_get_gtkconv_at_index(win, i)); i++) {
1726 for (l = next_gtkconv->convs; l; l = l->next) { 1726 for (l = next_gtkconv->convs; l; l = l->next) {
1727 GaimConversation *c = l->data; 1727 GaimConversation *c = l->data;
1734 1734
1735 if (!found) { 1735 if (!found) {
1736 /* Okay, just grab the next conversation tab. */ 1736 /* Okay, just grab the next conversation tab. */
1737 if (!(next_gtkconv = gaim_gtk_get_gtkconv_at_index(win, index + 1))) 1737 if (!(next_gtkconv = gaim_gtk_get_gtkconv_at_index(win, index + 1)))
1738 next_gtkconv = gaim_gtk_get_gtkconv_at_index(win, 0); 1738 next_gtkconv = gaim_gtk_get_gtkconv_at_index(win, 0);
1739
1740 } 1739 }
1741 } 1740 }
1742 1741
1743 if (next_gtkconv != NULL && next_gtkconv != gtkconv) 1742 if (next_gtkconv != NULL && next_gtkconv != gtkconv)
1744 gaim_conv_window_switch_conversation(win,next_gtkconv->active_conv); 1743 gaim_conv_window_switch_conversation(win,next_gtkconv->active_conv);
1842 1841
1843 case GDK_Tab: 1842 case GDK_Tab:
1844 move_to_next_unread_tab(gtkconv); 1843 move_to_next_unread_tab(gtkconv);
1845 1844
1846 return TRUE; 1845 return TRUE;
1846 break;
1847
1848 case GDK_comma:
1849 gtk_notebook_reorder_child(GTK_NOTEBOOK(gtkwin->notebook),
1850 gtk_notebook_get_nth_page(GTK_NOTEBOOK(gtkwin->notebook), curconv),
1851 curconv - 1);
1852 break;
1853
1854 case GDK_period:
1855 gtk_notebook_reorder_child(GTK_NOTEBOOK(gtkwin->notebook),
1856 gtk_notebook_get_nth_page(GTK_NOTEBOOK(gtkwin->notebook), curconv),
1857 (curconv + 1) % gtk_notebook_get_n_pages(GTK_NOTEBOOK(gtkwin->notebook)));
1847 break; 1858 break;
1848 1859
1849 } /* End of switch */ 1860 } /* End of switch */
1850 } 1861 }
1851 1862