[gitg/gnome-3-20] Add convenience debug mode for OS X



commit bd0abb4c1379416261064d8e9bb339f7dd2f8ece
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sun Jun 5 11:37:16 2016 +0200

    Add convenience debug mode for OS X

 gitg/gitg-window.vala |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 2165dae..e7d085e 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -540,6 +540,17 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
                }
        }
 
+       protected override void realize() {
+               if (Environment.get_variable("GITG_GTK_DEBUG_INTERACTIVE") != null) {
+                       Timeout.add_seconds(1, () => {
+                               Gtk.Window.set_interactive_debugging(true);
+                               return false;
+                       });
+               }
+
+               base.realize();
+       }
+
        protected override bool window_state_event(Gdk.EventWindowState event)
        {
                d_state_settings.set_int("state", event.new_window_state);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]