summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e5399c1)
raw | patch | inline | side by side (parent: e5399c1)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 13 Aug 2006 17:45:18 +0000 (17:45 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 13 Aug 2006 17:45:18 +0000 (17:45 +0000) |
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 189ab9866c6a4148596ed15637585cea1a5d8340..04328e84d5c8a3426b6c5ee04f34a467d4e8567b 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
}
}
+void
+SPDesktop::updateCanvasNow()
+{
+ _widget->requestCanvasUpdateAndWait();
+}
+
/**
* Associate document with desktop.
*/
diff --git a/src/desktop.h b/src/desktop.h
index e499358c7d4ab23e77297403b8960e30677774a3..5e0b1f3a80c69a65a21391e6a56a8a1fb8fe3a7f 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
void setToolboxAdjustmentValue (gchar const* id, double val);
bool isToolboxButtonActive (gchar const *id);
void updateNow();
+ void updateCanvasNow();
void fullscreen();
index 689eff4a7189bf9e8eb30a29f5bbfc20dad104d5..605c72b59586fe356efa5d67c4f8916965e5099b 100644 (file)
/// Queue a redraw request with the canvas
virtual void requestCanvasUpdate() = 0;
+ /// Force a redraw of the canvas
+ virtual void requestCanvasUpdateAndWait() = 0;
+
/// Update the "active desktop" indicator
virtual void activateDesktop() = 0;
index 626c3094107116fecb279779930106091382e9a1..6a4306147475818daf7aefae65aea0415bd2c3f8 100644 (file)
_svg_canvas.widget().queue_draw();
}
+void
+EditWidget::requestCanvasUpdateAndWait()
+{
+ requestCanvasUpdate();
+
+ while (gtk_events_pending())
+ gtk_main_iteration_do(FALSE);
+}
+
void
EditWidget::activateDesktop()
{
index 0beb77b53d5901363d58870802581f922f6f9bdf..096137c2a55cc4f58efa7c8560db5e00e0a43ae5 100644 (file)
virtual bool shutdown();
virtual void destroy();
virtual void requestCanvasUpdate();
+ virtual void requestCanvasUpdateAndWait();
virtual void activateDesktop();
virtual void deactivateDesktop();
virtual void viewSetPosition (NR::Point p);
index 9590af94c898c241ceddf0a2bdcd6d37acae2a5b..795fdb0f831789f8d428e0fd666cc10f7d035c70 100644 (file)
gtk_widget_queue_draw (GTK_WIDGET (SP_CANVAS_ITEM (this->desktop->main)->canvas));
}
+void
+SPDesktopWidget::requestCanvasUpdateAndWait() {
+ requestCanvasUpdate();
+
+ while (gtk_events_pending())
+ gtk_main_iteration_do(FALSE);
+
+}
+
void
SPDesktopWidget::setCoordinateStatus(NR::Point p)
{
index cc66bf1800cd6772be2f52d0918ef712aea40afe..409f38a8d2084acabebb9ed2f5790a4d2aa5aea8 100644 (file)
virtual void requestCanvasUpdate()
{ _dtw->requestCanvasUpdate(); }
+ virtual void requestCanvasUpdateAndWait()
+ { _dtw->requestCanvasUpdateAndWait(); }
virtual void activateDesktop()
{ sp_dtw_desktop_activate (_dtw); }
virtual void deactivateDesktop()
bool isToolboxButtonActive (gchar const *id);
void setCoordinateStatus(NR::Point p);
void requestCanvasUpdate();
+ void requestCanvasUpdateAndWait();
void updateTitle(gchar const *uri);
};