[f-spot: 1/5] abstract BuilderDialog class
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot: 1/5] abstract BuilderDialog class
- Date: Mon, 18 May 2009 10:00:22 -0400 (EDT)
commit 3787369341f55be5d59005bef0b23a867b12e4b9
Author: Stephane Delcroix <stephane delcroix org>
Date: Thu Apr 30 14:36:42 2009 +0200
abstract BuilderDialog class
allows easy creation of Gtk.Dialog subclasses generated by Gtk.Builder
---
src/Makefile.am | 1 +
src/UI.Dialog/BuilderDialog.cs | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index e54b05b..452157f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -242,6 +242,7 @@ F_SPOT_CSDISTFILES = \
$(srcdir)/TipWindow.cs \
$(srcdir)/UI.Dialog/AboutDialog.cs \
$(srcdir)/UI.Dialog/AdjustTimeDialog.cs \
+ $(srcdir)/UI.Dialog/BuilderDialog.cs \
$(srcdir)/UI.Dialog/EditExceptionDialog.cs \
$(srcdir)/UI.Dialog/ExceptionDialog.cs \
$(srcdir)/UI.Dialog/GladeDialog.cs \
diff --git a/src/UI.Dialog/BuilderDialog.cs b/src/UI.Dialog/BuilderDialog.cs
new file mode 100644
index 0000000..7a2fd79
--- /dev/null
+++ b/src/UI.Dialog/BuilderDialog.cs
@@ -0,0 +1,32 @@
+//
+// FSpot.UI.Dialog.BuilderDialog.cs
+//
+// Author(s):
+// Stephane Delcroix <stephane delcroix org>
+//
+// Copyright (c)2009 Novell, Inc.
+//
+// This is free software. See COPYING fro details.
+//
+
+using System;
+using Gtk;
+
+namespace FSpot.UI.Dialog
+{
+ public abstract class BuilderDialog : Gtk.Dialog
+ {
+ protected BuilderDialog (string resourceName, string dialogName) : this (null, resourceName, dialogName)
+ {
+ }
+
+ protected BuilderDialog (System.Reflection.Assembly assembly, string resourceName, string dialogName) : this (new Builder (assembly, resourceName, null), dialogName)
+ {
+ }
+
+ protected BuilderDialog (Builder builder, string dialogName) : base (builder.GetRawObject (dialogName))
+ {
+ builder.Autoconnect (this);
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]