summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e59ade7)
raw | patch | inline | side by side (parent: e59ade7)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 13 Aug 2006 18:45:40 +0000 (18:45 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 13 Aug 2006 18:45:40 +0000 (18:45 +0000) |
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 04328e84d5c8a3426b6c5ee04f34a467d4e8567b..51580249e1fc9de49e6a19ebf345d3709543e41b 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
* Ralf Stephan <ralf@ark.in-berlin.de>
+ * John Bintz <jcoswell@coswellproductions.org>
*
+ * Copyright (C) 2006 John Bintz
* Copyright (C) 2004 MenTaLguY
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
sp_canvas_update_now(canvas);
}
+void
+SPDesktop::enableInteraction()
+{
+ _widget->enableInteraction();
+}
+
+void SPDesktop::disableInteraction()
+{
+ _widget->disableInteraction();
+}
+
//----------------------------------------------------------------------
// Callback implementations. The virtual ones are connected by the view.
diff --git a/src/desktop.h b/src/desktop.h
index 5e0b1f3a80c69a65a21391e6a56a8a1fb8fe3a7f..c9484f2fe1d446d298dce5317b72a0d9593cf5c1 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
* Frank Felfe <innerspace@iname.com>
* bulia byak <buliabyak@users.sf.net>
* Ralf Stephan <ralf@ark.in-berlin.de>
+ * John Bintz <jcoswell@coswellproductions.org>
*
+ * Copyright (C) 2006 John Bintz
* Copyright (C) 1999-2005 authors
* Copyright (C) 2000-2001 Ximian, Inc.
*
unsigned int dkey;
unsigned int number;
bool is_fullscreen;
+ unsigned int interaction_disabled_counter;
/// \todo fixme: This has to be implemented in different way */
guint guides_active : 1;
void updateNow();
void updateCanvasNow();
+ void enableInteraction();
+ void disableInteraction();
+
void fullscreen();
void registerEditWidget (Inkscape::UI::View::EditWidgetInterface *widget)
index 605c72b59586fe356efa5d67c4f8916965e5099b..7cc0133d37ee48a4f04ae72a7e8d5f47d1dd8dcf 100644 (file)
*
* Authors:
* Ralf Stephan <ralf@ark.in-berlin.de>
+ * John Bintz <jcoswell@coswellproductions.org>
*
+ * Copyright (C) 2006 John Bintz
* Copyright (C) 2005 Ralf Stephan
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
/// Force a redraw of the canvas
virtual void requestCanvasUpdateAndWait() = 0;
+ /// Enable interaction on this desktop
+ virtual void enableInteraction() = 0;
+
+ /// Disable interaction on this desktop
+ virtual void disableInteraction() = 0;
+
/// Update the "active desktop" indicator
virtual void activateDesktop() = 0;
index 6a4306147475818daf7aefae65aea0415bd2c3f8..83566c1996798e12254e1a7cbf9d89e715108b54 100644 (file)
* 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.
*
_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");
gtk_main_iteration_do(FALSE);
}
+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()
{
index 096137c2a55cc4f58efa7c8560db5e00e0a43ae5..55a52be4c2a42dfc8c9e01234686d010fcf528a1 100644 (file)
* Bryce W. Harrington <bryce@bryceharrington.org>
* Derek P. Moore <derekm@hackunix.org>
* Ralf Stephan <ralf@ark.in-berlin.de>
+ * John Bintz <jcoswell@coswellproductions.org>
*
+ * Copyright (C) 2006 John Bintz
* Copyright (C) 2004 Bryce Harrington
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
virtual void destroy();
virtual void requestCanvasUpdate();
virtual void requestCanvasUpdateAndWait();
+ virtual void enableInteraction();
+ virtual void disableInteraction();
virtual void activateDesktop();
virtual void deactivateDesktop();
virtual void viewSetPosition (NR::Point p);
void onAdjValueChanged();
bool _update_s_f, _update_a_f;
+ unsigned int _interaction_disabled_counter;
sigc::connection _namedview_modified_connection;
};
index 795fdb0f831789f8d428e0fd666cc10f7d035c70..9ede6f27e02adef4a0ecbbd544167a7c26335050 100644 (file)
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
* Ralf Stephan <ralf@ark.in-berlin.de>
+ * John Bintz <jcoswell@coswellproductions.org>
*
+ * Copyright (C) 2006 John Bintz
* Copyright (C) 2004 MenTaLguY
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
dtw->desktop = NULL;
+ dtw->_interaction_disabled_counter = 0;
+
dtw->tt = gtk_tooltips_new ();
/* Main table */
}
+void
+SPDesktopWidget::enableInteraction()
+{
+ g_return_if_fail(_interaction_disabled_counter > 0);
+
+ _interaction_disabled_counter--;
+
+ if (_interaction_disabled_counter == 0) {
+ gtk_widget_set_sensitive(GTK_WIDGET(this), TRUE);
+ }
+}
+
+void
+SPDesktopWidget::disableInteraction()
+{
+ if (_interaction_disabled_counter == 0) {
+ gtk_widget_set_sensitive(GTK_WIDGET(this), FALSE);
+ }
+
+ _interaction_disabled_counter++;
+}
+
void
SPDesktopWidget::setCoordinateStatus(NR::Point p)
{
index 409f38a8d2084acabebb9ed2f5790a4d2aa5aea8..0514dd39389a1207186adb109756e5b7aacfabec 100644 (file)
* SPDesktopWidget: handling Gtk events on a desktop.
*
* Authors:
+ * John Bintz <jcoswell@coswellproductions.org> (c) 2006
* Ralf Stephan <ralf@ark.in-berlin.de> (c) 2005, distrib. under GPL2
* ? -2004
*/
Inkscape::UI::Widget::SelectedStyle *selected_style;
gint coord_status_id, select_status_id;
+
+ unsigned int _interaction_disabled_counter;
SPCanvas *canvas;
NR::Point ruler_origin;
{ _dtw->requestCanvasUpdate(); }
virtual void requestCanvasUpdateAndWait()
{ _dtw->requestCanvasUpdateAndWait(); }
+ virtual void enableInteraction()
+ { _dtw->enableInteraction(); }
+ virtual void disableInteraction()
+ { _dtw->disableInteraction(); }
virtual void activateDesktop()
{ sp_dtw_desktop_activate (_dtw); }
virtual void deactivateDesktop()
void setCoordinateStatus(NR::Point p);
void requestCanvasUpdate();
void requestCanvasUpdateAndWait();
+ void enableInteraction();
+ void disableInteraction();
void updateTitle(gchar const *uri);
};