~codygarver/+junk/epiphany-old-trunk

« back to all changes in this revision

Viewing changes to debian/patches/99_tabs_close_on_middle_click.patch

  • Committer: Cody Garver
  • Date: 2016-06-09 02:15:34 UTC
  • Revision ID: cody@elementary.io-20160609021534-yj5kz6dr3or5u1o1
Add Nathan's patches and refresh everything

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/src/ephy-notebook.c
 
2
+++ b/src/ephy-notebook.c
 
3
@@ -277,6 +277,17 @@ button_press_cb (EphyNotebook *notebook,
 
4
                gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), tab_clicked);
 
5
        }
 
6
 
 
7
+       /* Close the tab if it gets middle clicked */
 
8
+
 
9
+       if (event->type == GDK_BUTTON_PRESS &&
 
10
+           event->button == 2 &&
 
11
+           (event->state & gtk_accelerator_get_default_mod_mask ()) == 0)
 
12
+       {
 
13
+         GtkWidget *tab;
 
14
+         tab = gtk_notebook_get_nth_page (notebook, tab_clicked);
 
15
+         g_signal_emit (notebook, signals[TAB_CLOSE_REQUEST], 0, tab);
 
16
+       }
 
17
+
 
18
        return FALSE;
 
19
 }