[gnome-terminal] profile: editor: Remove tab scrolling workaround
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] profile: editor: Remove tab scrolling workaround
- Date: Fri, 4 May 2018 22:46:39 +0000 (UTC)
commit 3ab67dcc33aeb6a6a42858d3353f544b2b5bb00b
Author: Christian Persch <chpe src gnome org>
Date: Sat May 5 00:46:13 2018 +0200
profile: editor: Remove tab scrolling workaround
https://bugzilla.gnome.org/show_bug.cgi?id=793824
src/profile-editor.c | 71 --------------------------------------------------
1 files changed, 0 insertions(+), 71 deletions(-)
---
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 2ba624b..eaad918 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -639,73 +639,6 @@ init_encodings_combo (GtkWidget *widget)
"text", ENCODINGS_COLUMN_TEXT, NULL);
}
-/* Tab scrolling was removed from GtkNotebook in gtk 3, so reimplement it here */
-static gboolean
-scroll_event_cb (GtkWidget *widget,
- GdkEventScroll *event,
- gpointer user_data)
-{
- GtkNotebook *notebook = GTK_NOTEBOOK (widget);
- GtkWidget *child, *event_widget, *action_widget;
-
- if ((event->state & gtk_accelerator_get_default_mod_mask ()) != 0)
- return FALSE;
-
- child = gtk_notebook_get_nth_page (notebook, gtk_notebook_get_current_page (notebook));
- if (child == NULL)
- return FALSE;
-
- event_widget = gtk_get_event_widget ((GdkEvent *) event);
-
- /* Ignore scroll events from the content of the page */
- if (event_widget == NULL ||
- event_widget == child ||
- gtk_widget_is_ancestor (event_widget, child))
- return FALSE;
-
- /* And also from the action widgets */
- action_widget = gtk_notebook_get_action_widget (notebook, GTK_PACK_START);
- if (event_widget == action_widget ||
- (action_widget != NULL && gtk_widget_is_ancestor (event_widget, action_widget)))
- return FALSE;
- action_widget = gtk_notebook_get_action_widget (notebook, GTK_PACK_END);
- if (event_widget == action_widget ||
- (action_widget != NULL && gtk_widget_is_ancestor (event_widget, action_widget)))
- return FALSE;
-
- switch (event->direction) {
- case GDK_SCROLL_RIGHT:
- case GDK_SCROLL_DOWN:
- gtk_notebook_next_page (notebook);
- return TRUE;
- case GDK_SCROLL_LEFT:
- case GDK_SCROLL_UP:
- gtk_notebook_prev_page (notebook);
- return TRUE;
- case GDK_SCROLL_SMOOTH:
- switch (gtk_notebook_get_tab_pos (notebook)) {
- case GTK_POS_LEFT:
- case GTK_POS_RIGHT:
- if (event->delta_y > 0)
- gtk_notebook_next_page (notebook);
- else if (event->delta_y < 0)
- gtk_notebook_prev_page (notebook);
- break;
- case GTK_POS_TOP:
- case GTK_POS_BOTTOM:
- if (event->delta_x > 0)
- gtk_notebook_next_page (notebook);
- else if (event->delta_x < 0)
- gtk_notebook_prev_page (notebook);
- break;
- }
- return TRUE;
- }
-
- return FALSE;
-}
-
-
static gboolean
s_to_rgba (GValue *value,
GVariant *variant,
@@ -885,10 +818,6 @@ profile_prefs_init (void)
fixup_color_chooser_button ();
#endif
- w = (GtkWidget *) gtk_builder_get_object (builder, "profile-editor-notebook");
- gtk_widget_add_events (w, GDK_BUTTON_PRESS_MASK | GDK_SCROLL_MASK);
- g_signal_connect (w, "scroll-event", G_CALLBACK (scroll_event_cb), NULL);
-
w = (GtkWidget *) gtk_builder_get_object (builder, "color-scheme-combobox");
init_color_scheme_menu (w);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]