diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-18 04:54:08 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-18 04:54:08 +0000 |
| commit | f827bacbbab8d98adb460dc85279d584fee6435c (patch) | |
| tree | 7803f082503256d0a0aa159d908d136c6720225e /src/dialogs/xml-tree.cpp | |
| parent | support for 5 point spline (Bug 685707) (diff) | |
| download | inkscape-f827bacbbab8d98adb460dc85279d584fee6435c.tar.gz inkscape-f827bacbbab8d98adb460dc85279d584fee6435c.zip | |
Simple tracking of time to display dialogs and main window.
(bzr r9966)
Diffstat (limited to 'src/dialogs/xml-tree.cpp')
| -rw-r--r-- | src/dialogs/xml-tree.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index c90cde490..d25bdad72 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -41,8 +41,10 @@ #include "../widgets/sp-xmlview-attr-list.h" #include "../widgets/sp-xmlview-content.h" #include "../widgets/sp-xmlview-tree.h" +#include "util/ege-appear-time-tracker.h" using Inkscape::DocumentUndo; +using ege::AppearTimeTracker; #define MIN_ONSCREEN_DISTANCE 50 @@ -178,11 +180,13 @@ void attr_reset_context(gint attr) void sp_xml_tree_dialog() { SPDesktop *desktop = SP_ACTIVE_DESKTOP; - if (!desktop) { return; } + bool wantTiming = Inkscape::Preferences::get()->getBool("/dialogs/debug/trackAppear", false); + GTimer *timer = wantTiming ? g_timer_new() : 0; + if (dlg == NULL) { // very long block @@ -604,6 +608,13 @@ void sp_xml_tree_dialog() tree_reset_context(); } // end of if (dlg == NULL) + if ( wantTiming ) { + // Time tracker takes ownership of the timer. + AppearTimeTracker *tracker = new AppearTimeTracker(timer, GTK_WIDGET(dlg), "DialogXMLEditor"); + tracker->setAutodelete(true); + timer = 0; + } + gtk_window_present((GtkWindow *) dlg); g_assert(desktop != NULL); |
