summaryrefslogtreecommitdiff
path: root/src/view.c
diff options
context:
space:
mode:
authorportix <none@none>2013-03-24 00:56:03 +0100
committerportix <none@none>2013-03-24 00:56:03 +0100
commit942fbecd4a115ccb43aa185761f0a757d26cba9a (patch)
tree612a47d7325e594d80dc5bbead68ab17f20bf144 /src/view.c
parent1b615c247c3e5173678096790534f65e622bc89e (diff)
downloaddwb-942fbecd4a115ccb43aa185761f0a757d26cba9a.zip
Replacing MODULO macro with function, fixes focus issue with odd number of tabs
Diffstat (limited to 'src/view.c')
-rw-r--r--src/view.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/view.c b/src/view.c
index d241aafd..3b8c6d68 100644
--- a/src/view.c
+++ b/src/view.c
@@ -215,8 +215,6 @@ view_button_press_cb(WebKitWebView *web, GdkEventButton *e, GList *gl)
* The webview that emitted the signal
* @param {WebKitHitTestResult} result
* A hit test result
- * @param {GtkEventBox} tabwidget
- * The tabwidget
* @param {Object} event
* @param {Number} event.button
* The button that was pressed, usually a value between 1 and 5
@@ -883,12 +881,12 @@ view_scroll_tab_cb(GtkWidget *w, GdkEventScroll *e, GList *gl)
int pos = -1;
if (e->direction == GDK_SCROLL_DOWN)
{
- pos = MODULO(g_list_position(dwb.state.views, dwb.state.fview) + 1, g_list_length(dwb.state.views));
+ pos = util_modulo(g_list_position(dwb.state.views, dwb.state.fview) + 1, g_list_length(dwb.state.views));
event = "focus_next";
}
else if (e->direction == GDK_SCROLL_UP)
{
- pos = MODULO(g_list_position(dwb.state.views, dwb.state.fview) - 1, g_list_length(dwb.state.views));
+ pos = util_modulo(g_list_position(dwb.state.views, dwb.state.fview) - 1, g_list_length(dwb.state.views));
event = "focus_prev";
}
if (pos != -1)