summaryrefslogtreecommitdiffstats
path: root/src/dialogs/text-edit.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-12-18 04:54:08 +0000
committerJon A. Cruz <jon@joncruz.org>2010-12-18 04:54:08 +0000
commitf827bacbbab8d98adb460dc85279d584fee6435c (patch)
tree7803f082503256d0a0aa159d908d136c6720225e /src/dialogs/text-edit.cpp
parentsupport for 5 point spline (Bug 685707) (diff)
downloadinkscape-f827bacbbab8d98adb460dc85279d584fee6435c.tar.gz
inkscape-f827bacbbab8d98adb460dc85279d584fee6435c.zip
Simple tracking of time to display dialogs and main window.
(bzr r9966)
Diffstat (limited to 'src/dialogs/text-edit.cpp')
-rw-r--r--src/dialogs/text-edit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp
index 61f56e3f7..d741e2de0 100644
--- a/src/dialogs/text-edit.cpp
+++ b/src/dialogs/text-edit.cpp
@@ -49,8 +49,10 @@ extern "C" {
#include "svg/css-ostringstream.h"
#include "widgets/icon.h"
#include <xml/repr.h>
+#include "util/ege-appear-time-tracker.h"
using Inkscape::DocumentUndo;
+using ege::AppearTimeTracker;
#define VB_MARGIN 4
#define MIN_ONSCREEN_DISTANCE 50
@@ -139,6 +141,9 @@ text_view_focus_out (GtkWidget */*w*/, GdkEventKey */*event*/, gpointer data)
void
sp_text_edit_dialog (void)
{
+ bool wantTiming = Inkscape::Preferences::get()->getBool("/dialogs/debug/trackAppear", false);
+ GTimer *timer = wantTiming ? g_timer_new() : 0;
+
if (!dlg) {
gchar title[500];
@@ -457,6 +462,13 @@ sp_text_edit_dialog (void)
sp_text_edit_dialog_read_selection (dlg, TRUE, TRUE);
}
+ if ( wantTiming ) {
+ // Time tracker takes ownership of the timer.
+ AppearTimeTracker *tracker = new AppearTimeTracker(timer, GTK_WIDGET(dlg), "DialogText");
+ tracker->setAutodelete(true);
+ timer = 0;
+ }
+
gtk_window_present ((GtkWindow *) dlg);
} // end of sp_text_edit_dialog()