diff options
| author | John Bintz <me@johnbintz.com> | 2006-08-13 18:45:40 +0000 |
|---|---|---|
| committer | johncoswell <johncoswell@users.sourceforge.net> | 2006-08-13 18:45:40 +0000 |
| commit | e945f1a347023c8cc50165ed97a2295b85a3e75a (patch) | |
| tree | 9255eb62c79f091fbbd18426b6592c035b933ebf /src/ui/view/edit-widget.cpp | |
| parent | added functions to allow update events to process during long-running operations (diff) | |
| download | inkscape-e945f1a347023c8cc50165ed97a2295b85a3e75a.tar.gz inkscape-e945f1a347023c8cc50165ed97a2295b85a3e75a.zip | |
add interface for disabling interaction during long-running operations
(bzr r1596)
Diffstat (limited to 'src/ui/view/edit-widget.cpp')
| -rw-r--r-- | src/ui/view/edit-widget.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index 6a4306147..83566c199 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -16,7 +16,9 @@ * Derek P. Moore <derekm@hackunix.org> * Lauris Kaplinski <lauris@kaplinski.com> * Frank Felfe <innerspace@iname.com> + * John Bintz <jcoswell@coswellproductions.org> * + * Copyright (C) 2006 John Bintz * Copyright (C) 1999-2005 Authors * Copyright (C) 2000-2001 Ximian, Inc. * @@ -74,7 +76,8 @@ EditWidget::EditWidget (SPDocument *doc) _act_grp(Gtk::ActionGroup::create()), _ui_mgr(Gtk::UIManager::create()), _update_s_f(false), - _update_a_f(false) + _update_a_f(false), + _interaction_disabled_counter(0) { g_warning("Creating new EditWidget"); @@ -1303,6 +1306,28 @@ EditWidget::requestCanvasUpdateAndWait() } void +EditWidget::enableInteraction() +{ + g_return_if_fail(_interaction_disabled_counter > 0); + + _interaction_disabled_counter--; + + if (_interaction_disabled_counter == 0) { + this->set_sensitive(true); + } +} + +void +EditWidget::disableInteraction() +{ + if (_interaction_disabled_counter == 0) { + this->set_sensitive(false); + } + + _interaction_disabled_counter++; +} + +void EditWidget::activateDesktop() { /// \todo active_desktop_indicator not implemented |
