[Libreoffice-commits] core.git: vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Dec 16 20:25:50 UTC 2018
vcl/unx/gtk3/gtk3gtkinst.cxx | 56 -------------------------------------------
1 file changed, 56 deletions(-)
New commits:
commit ee8881b794c5c0cce531d62a4ebe3aa87ae7c642
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Dec 14 16:17:26 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Dec 16 21:25:30 2018 +0100
drop scroll-wheel moves notebook page workaround
now that the double-decker monstrosity is in place
Change-Id: I8bc8f98d0cfd2bf4506bbc61632c1e7b0f9cd3f1
Reviewed-on: https://gerrit.libreoffice.org/65181
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 6d67c761da09..1825fe9703e2 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3112,7 +3112,6 @@ private:
gulong m_nSwitchPageSignalId;
gulong m_nOverFlowSwitchPageSignalId;
gulong m_nSizeAllocateSignalId;
- gulong m_nScrollSignalId;
bool m_bOverFlowBoxActive;
bool m_bOverFlowBoxIsStart;
int m_nStartTabCount;
@@ -3207,59 +3206,6 @@ private:
enable_notify_events();
}
- static gboolean signalScroll(GtkWidget*, GdkEventScroll* event, gpointer widget)
- {
- GtkInstanceNotebook* pThis = static_cast<GtkInstanceNotebook*>(widget);
- return pThis->signal_scroll(event);
- }
-
- bool signal_scroll(GdkEventScroll* event)
- {
- GtkWidget* pEventWidget = gtk_get_event_widget(reinterpret_cast<GdkEvent*>(event));
- if (!pEventWidget)
- return false;
-
- /* ignore page content scroll events */
- GtkWidget* pPage = gtk_notebook_get_nth_page(m_pNotebook, gtk_notebook_get_current_page(m_pNotebook));
- if (gtk_widget_is_ancestor(pEventWidget, pPage) || pPage == pEventWidget)
- return false;
-
- bool bNext(false), bPrev(false);
- switch (event->direction)
- {
- case GDK_SCROLL_RIGHT:
- case GDK_SCROLL_DOWN:
- bNext = true;
- break;
- case GDK_SCROLL_LEFT:
- case GDK_SCROLL_UP:
- bPrev = true;
- break;
- case GDK_SCROLL_SMOOTH:
- {
- switch (gtk_notebook_get_tab_pos(m_pNotebook))
- {
- case GTK_POS_LEFT:
- case GTK_POS_RIGHT:
- bNext = event->delta_y > 0;
- bPrev = event->delta_y < 0;
- break;
- case GTK_POS_TOP:
- case GTK_POS_BOTTOM:
- bNext = event->delta_x > 0;
- bPrev = event->delta_x < 0;
- break;
- }
- break;
- }
- }
- if (bNext)
- gtk_notebook_next_page(m_pNotebook);
- else if (bPrev)
- gtk_notebook_prev_page(m_pNotebook);
- return true;
- }
-
static OString get_page_ident(GtkNotebook *pNotebook, guint nPage)
{
const GtkWidget* pTabWidget = gtk_notebook_get_tab_label(pNotebook, gtk_notebook_get_nth_page(pNotebook, nPage));
@@ -3540,7 +3486,6 @@ public:
, m_nEndTabCount(0)
{
gtk_widget_add_events(GTK_WIDGET(pNotebook), GDK_SCROLL_MASK);
- m_nScrollSignalId = g_signal_connect(pNotebook, "scroll-event", G_CALLBACK(signalScroll), this);
if (get_n_pages() > 6)
m_nSizeAllocateSignalId = g_signal_connect_after(pNotebook, "size-allocate", G_CALLBACK(signalSizeAllocate), this);
else
@@ -3710,7 +3655,6 @@ public:
{
if (m_nSizeAllocateSignalId)
g_signal_handler_disconnect(m_pNotebook, m_nSizeAllocateSignalId);
- g_signal_handler_disconnect(m_pNotebook, m_nScrollSignalId);
g_signal_handler_disconnect(m_pNotebook, m_nSwitchPageSignalId);
g_signal_handler_disconnect(m_pOverFlowNotebook, m_nOverFlowSwitchPageSignalId);
gtk_widget_destroy(GTK_WIDGET(m_pOverFlowNotebook));
More information about the Libreoffice-commits
mailing list