Skip to content

Instantly share code, notes, and snippets.

@acdimalev
Created January 19, 2014 04:30
Show Gist options
  • Save acdimalev/8500501 to your computer and use it in GitHub Desktop.
Save acdimalev/8500501 to your computer and use it in GitHub Desktop.
Replace Pidgin's "next unread tab" feature with the original behavior of ctrl+tab / ctrl+shift+tab.
diff -r 1d3a0e42cb09 pidgin/gtkconv.c
--- a/pidgin/gtkconv.c Mon Nov 25 16:51:46 2013 +0100
+++ b/pidgin/gtkconv.c Wed Nov 27 00:37:20 2013 -0800
@@ -2019,9 +2019,15 @@
case GDK_KEY_KP_Tab:
case GDK_KEY_ISO_Left_Tab:
if (event->state & GDK_SHIFT_MASK) {
- move_to_next_unread_tab(gtkconv, FALSE);
+ if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv - 1))
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), -1);
+ else
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv - 1);
} else {
- move_to_next_unread_tab(gtkconv, TRUE);
+ if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv + 1))
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), 0);
+ else
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv + 1);
}
return TRUE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment