Skip to content


pluma-print-preview: Fix weird behavior with mouse buttons
Browse files Browse the repository at this point in the history
Fixes #321
  • Loading branch information
sc0w committed May 22, 2018
1 parent cced651 commit 4d80780
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pluma/pluma-print-preview.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,14 @@ close_button_clicked (GtkWidget *button,
gtk_widget_destroy (GTK_WIDGET (preview));

static gboolean
ignore_mouse_buttons (GtkWidget *widget,
GdkEventKey *event,
PlumaPrintPreview *preview)
return TRUE;

static void
create_bar (PlumaPrintPreview *preview)
Expand Down Expand Up @@ -705,6 +713,11 @@ create_bar (PlumaPrintPreview *preview)
G_CALLBACK (close_button_clicked), preview);
gtk_widget_show (GTK_WIDGET (i));
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), i, -1);

g_signal_connect (GTK_TOOLBAR (toolbar),
G_CALLBACK (ignore_mouse_buttons),

static gint
Expand Down Expand Up @@ -972,6 +985,11 @@ create_preview_layout (PlumaPrintPreview *preview)
G_CALLBACK (preview_layout_query_tooltip),

g_signal_connect (priv->layout,
G_CALLBACK (ignore_mouse_buttons),

priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
Expand Down

0 comments on commit 4d80780

Please sign in to comment.