Commit 1ebd2b51 authored by Michael Natterer's avatar Michael Natterer 😴

Revert "app: Make alt+[number] switch tabs in single-window mode"

This reverts commit 110b3daa.
parent d7b8f8e8
......@@ -19,7 +19,6 @@
#include <gegl.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
......@@ -163,9 +162,6 @@ static void gimp_image_window_switch_page (GtkNotebook *not
gpointer page,
gint page_num,
GimpImageWindow *window);
static gboolean gimp_image_window_key_pressed (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data);
static void gimp_image_window_page_removed (GtkNotebook *notebook,
GtkWidget *widget,
gint page_num,
......@@ -348,9 +344,6 @@ gimp_image_window_constructed (GObject *object)
g_signal_connect (private->notebook, "switch-page",
G_CALLBACK (gimp_image_window_switch_page),
window);
g_signal_connect (private->notebook, "key-press-event",
G_CALLBACK (gimp_image_window_key_pressed),
window);
g_signal_connect (private->notebook, "page-removed",
G_CALLBACK (gimp_image_window_page_removed),
window);
......@@ -1256,35 +1249,6 @@ gimp_image_window_switch_page (GtkNotebook *notebook,
gimp_ui_manager_update (private->menubar_manager, active_display);
}
static gboolean
gimp_image_window_key_pressed (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data)
{
if (event->state & GDK_MOD1_MASK)
{
if ((event->keyval >= GDK_KEY_0) &&
(event->keyval <= GDK_KEY_9))
{
guint tab;
gint n = gtk_notebook_get_n_pages (GTK_NOTEBOOK (widget));
if (event->keyval == GDK_KEY_0)
tab = 9;
else
tab = event->keyval - GDK_KEY_1;
if (tab < n)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), tab);
return TRUE;
}
}
}
return FALSE;
}
static void
gimp_image_window_page_removed (GtkNotebook *notebook,
GtkWidget *widget,
......
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