[epiphany] Revert "Allow wrap around during tab move"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Revert "Allow wrap around during tab move"
- Date: Sat, 29 Dec 2018 16:19:41 +0000 (UTC)
commit 3557f40fe95ec03f486576a473b635e242393d8f
Author: Michael Catanzaro <mcatanzaro posteo net>
Date: Sat Dec 29 16:19:32 2018 +0000
Revert "Allow wrap around during tab move"
This reverts commit 52399be9227016babe2a425fdd62a370d0c4298f
src/window-commands.c | 25 ++++++-------------------
1 file changed, 6 insertions(+), 19 deletions(-)
---
diff --git a/src/window-commands.c b/src/window-commands.c
index acda6cb5f..a725d9863 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2251,22 +2251,15 @@ window_cmd_tabs_move_left (GSimpleAction *action,
{
GtkWidget *child;
GtkNotebook *notebook;
- int page, n_pages, to;
+ int page;
notebook = GTK_NOTEBOOK (ephy_window_get_notebook (EPHY_WINDOW (user_data)));
page = gtk_notebook_get_current_page (notebook);
- n_pages = gtk_notebook_get_n_pages (notebook) - 1;
-
- if (!n_pages)
- return;
-
if (page < 1)
- to = n_pages;
- else
- to = page - 1;
+ return;
child = gtk_notebook_get_nth_page (notebook, page);
- gtk_notebook_reorder_child (notebook, child, to);
+ gtk_notebook_reorder_child (notebook, child, page - 1);
}
void window_cmd_tabs_move_right (GSimpleAction *action,
@@ -2275,22 +2268,16 @@ void window_cmd_tabs_move_right (GSimpleAction *action,
{
GtkWidget *child;
GtkNotebook *notebook;
- int page, n_pages, to;
+ int page, n_pages;
notebook = GTK_NOTEBOOK (ephy_window_get_notebook (EPHY_WINDOW (user_data)));
page = gtk_notebook_get_current_page (notebook);
n_pages = gtk_notebook_get_n_pages (notebook) - 1;
-
- if (!n_pages)
- return;
-
if (page > n_pages - 1)
- to = 0;
- else
- to = page + 1;
+ return;
child = gtk_notebook_get_nth_page (notebook, page);
- gtk_notebook_reorder_child (notebook, child, to);
+ gtk_notebook_reorder_child (notebook, child, page + 1);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]