summaryrefslogtreecommitdiffstats
path: root/src/display/canvas-temporary-item.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-03-22 18:29:40 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-03-22 18:29:40 +0000
commit454a66aa12442146b02bda954fee3ff1077fc238 (patch)
tree21dfaabd2c739e7c880fb55ac0ac017ec5617e22 /src/display/canvas-temporary-item.cpp
parentRemoved Win32 keep-dialogs-on-top preference, now set permanently to true (diff)
downloadinkscape-454a66aa12442146b02bda954fee3ff1077fc238.tar.gz
inkscape-454a66aa12442146b02bda954fee3ff1077fc238.zip
Line-end fixups
(bzr r5161)
Diffstat (limited to 'src/display/canvas-temporary-item.cpp')
-rw-r--r--src/display/canvas-temporary-item.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/src/display/canvas-temporary-item.cpp b/src/display/canvas-temporary-item.cpp
index 7d7f8087c..d31323b72 100644
--- a/src/display/canvas-temporary-item.cpp
+++ b/src/display/canvas-temporary-item.cpp
@@ -1,73 +1,73 @@
-/** \file
- * Provides a class that can contain active TemporaryItem's on a desktop
- * When the object is deleted, it also deletes the canvasitem it contains!
- * This object should be created/managed by a TemporaryItemList.
- * After its lifetime, it fires the timeout signal, afterwards *it deletes itself*.
- *
- * (part of code inspired by message-stack.cpp)
- *
- * Authors:
- * Johan Engelen
- *
- * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>
- *
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#include "display/canvas-temporary-item.h"
-
-#include <gtk/gtkobject.h>
-
-namespace Inkscape {
-namespace Display {
-
-/** lifetime is measured in milliseconds
- */
-TemporaryItem::TemporaryItem(SPCanvasItem *item, guint lifetime)
- : canvasitem(item),
- timeout_id(0)
-{
- // zero lifetime means stay forever, so do not add timeout event.
- if (lifetime > 0) {
- timeout_id = g_timeout_add(lifetime, &TemporaryItem::_timeout, this);
- }
-}
-
-TemporaryItem::~TemporaryItem()
-{
- // when it has not expired yet...
- if (timeout_id) {
- g_source_remove(timeout_id);
- timeout_id = 0;
- }
-
- if (canvasitem) {
- // destroying the item automatically hides it
- gtk_object_destroy (GTK_OBJECT (canvasitem));
- canvasitem = NULL;
- }
-}
-
-/* static method*/
-gboolean TemporaryItem::_timeout(gpointer data) {
- TemporaryItem *tempitem = reinterpret_cast<TemporaryItem *>(data);
- tempitem->timeout_id = 0;
- tempitem->signal_timeout.emit(tempitem);
- delete tempitem;
- return FALSE;
-}
-
-
-} //namespace Display
-} /* namespace Inkscape */
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
+/** \file
+ * Provides a class that can contain active TemporaryItem's on a desktop
+ * When the object is deleted, it also deletes the canvasitem it contains!
+ * This object should be created/managed by a TemporaryItemList.
+ * After its lifetime, it fires the timeout signal, afterwards *it deletes itself*.
+ *
+ * (part of code inspired by message-stack.cpp)
+ *
+ * Authors:
+ * Johan Engelen
+ *
+ * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include "display/canvas-temporary-item.h"
+
+#include <gtk/gtkobject.h>
+
+namespace Inkscape {
+namespace Display {
+
+/** lifetime is measured in milliseconds
+ */
+TemporaryItem::TemporaryItem(SPCanvasItem *item, guint lifetime)
+ : canvasitem(item),
+ timeout_id(0)
+{
+ // zero lifetime means stay forever, so do not add timeout event.
+ if (lifetime > 0) {
+ timeout_id = g_timeout_add(lifetime, &TemporaryItem::_timeout, this);
+ }
+}
+
+TemporaryItem::~TemporaryItem()
+{
+ // when it has not expired yet...
+ if (timeout_id) {
+ g_source_remove(timeout_id);
+ timeout_id = 0;
+ }
+
+ if (canvasitem) {
+ // destroying the item automatically hides it
+ gtk_object_destroy (GTK_OBJECT (canvasitem));
+ canvasitem = NULL;
+ }
+}
+
+/* static method*/
+gboolean TemporaryItem::_timeout(gpointer data) {
+ TemporaryItem *tempitem = reinterpret_cast<TemporaryItem *>(data);
+ tempitem->timeout_id = 0;
+ tempitem->signal_timeout.emit(tempitem);
+ delete tempitem;
+ return FALSE;
+}
+
+
+} //namespace Display
+} /* namespace Inkscape */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :