[ease/inspector: 3/4] Implemented InspectorWindow.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/inspector: 3/4] Implemented InspectorWindow.
- Date: Thu, 3 Jun 2010 06:34:55 +0000 (UTC)
commit ddef11e575f99ca35552a7949023c6815d762e6e
Author: Nate Stedman <natesm gmail com>
Date: Wed Jun 2 22:26:49 2010 -0400
Implemented InspectorWindow.
src/InspectorWindow.vala | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/src/InspectorWindow.vala b/src/InspectorWindow.vala
index 79875f3..d426cbf 100644
--- a/src/InspectorWindow.vala
+++ b/src/InspectorWindow.vala
@@ -15,6 +15,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/**
+ * A window containing an { link Inspector}. Includes static methods for using
+ * a single InspectorWindow across the entire application.
+ */
public class Ease.InspectorWindow : Gtk.Window
{
private Inspector inspector;
@@ -25,4 +29,46 @@ public class Ease.InspectorWindow : Gtk.Window
add(inspector);
}
+
+ // static implemention
+ private static InspectorWindow instance;
+
+ /**
+ * Toggles the visibility of the single InspectorWindow.
+ */
+ public static void toggle()
+ {
+ if (instance == null)
+ {
+ instance = new InspectorWindow();
+ }
+
+ if (instance.visible)
+ {
+ instance.hide();
+ }
+ else
+ {
+ instance.show_all();
+ instance.present();
+ }
+ }
+
+ private static Slide slide_priv;
+
+ /**
+ * The slide visible in the { link Inspector} of the single InspectorWindow.
+ */
+ public static Slide slide
+ {
+ get { return slide_priv; }
+ set
+ {
+ if (slide_priv != value)
+ {
+ instance.inspector.slide = value;
+ slide_priv = value;
+ }
+ }
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]