← Back to team overview

elementaryart team mailing list archive

[Merge] lp:~mefrio-g/granite/fix-974334 into lp:granite

 

Mario Guerriero has proposed merging lp:~mefrio-g/granite/fix-974334 into lp:granite.

Requested reviews:
  elementary Pantheon team (elementary-pantheon)
Related bugs:
  Bug #974334 in Granite: "emit a signal before close a tab"
  https://bugs.launchpad.net/granite/+bug/974334

For more details, see:
https://code.launchpad.net/~mefrio-g/granite/fix-974334/+merge/101074
-- 
https://code.launchpad.net/~mefrio-g/granite/fix-974334/+merge/101074
Your team elementaryart (old) is subscribed to branch lp:granite.
=== modified file 'lib/Widgets/DynamicNotebook.vala'
--- lib/Widgets/DynamicNotebook.vala	2012-04-06 04:51:00 +0000
+++ lib/Widgets/DynamicNotebook.vala	2012-04-06 09:31:20 +0000
@@ -19,12 +19,12 @@
     internal Cairo.Surface surface;
 
     public Gtk.Widget widget;
-
+    
+    public signal void close_button_clicked ();
     public signal void need_redraw ();
     public signal void need_recache ();
 
     public bool is_animated () {
-
         bool return_value =  (!removed && initial_offset != 1.0) ||
                              (drag_origin == 0.0 && initial_draw_offset != 0.0) ||
                              (removed && initial_offset != 0.0);
@@ -625,6 +625,7 @@
                 /* Let's see of it is on the close button */
                 double offset = event.x - n_tab * (width - overlap) - overlap;
                 if (0 < offset < close_margin*2 + close_size) { /* then it is a click on the close_button */
+                    tabs[n_tab].close_button_clicked ();
                     remove_tab_internal (n_tab);
                 }
                 else {


Follow ups