Commit 8ac71f8e authored by Paolo Borelli's avatar Paolo Borelli

Reverse the condition for clarity.

parent 2862dced
......@@ -255,25 +255,25 @@ gedit_notebook_button_press (GtkWidget *widget,
GdkEventButton *event)
{
GtkNotebook *nb = GTK_NOTEBOOK (widget);
gint tab_clicked;
if (event->type != GDK_BUTTON_PRESS ||
event->button != 3 ||
(event->state & gtk_accelerator_get_default_mod_mask ()) != 0)
if (event->type == GDK_BUTTON_PRESS &&
event->button == 3 &&
(event->state & gtk_accelerator_get_default_mod_mask ()) == 0)
{
return GTK_WIDGET_CLASS (gedit_notebook_parent_class)->button_press_event (widget, event);
}
gint tab_clicked;
tab_clicked = find_tab_num_at_pos (nb, event->x_root, event->y_root);
if (tab_clicked < 0)
{
return GTK_WIDGET_CLASS (gedit_notebook_parent_class)->button_press_event (widget, event);
}
tab_clicked = find_tab_num_at_pos (nb, event->x_root, event->y_root);
if (tab_clicked >= 0)
{
/* switch to the page the mouse is over */
gtk_notebook_set_current_page (nb, tab_clicked);
/* switch to the page the mouse is over */
gtk_notebook_set_current_page (nb, tab_clicked);
return TRUE;
}
return TRUE;
}
return GTK_WIDGET_CLASS (gedit_notebook_parent_class)->button_press_event (widget, event);
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment