[mistelix] Support for author in the theme, since we want to credit theme authors properly



commit 95ab2f262d7fbefae563c1c3d42bb81a63086d63
Author: Jordi Mas <jmas softcatala org>
Date:   Mon Aug 17 22:05:43 2009 +0200

    Support for author in the theme, since we want to credit theme authors properly

 src/DataModel/Theme.cs              |    7 +++++++
 src/Dialogs/ThemeSelectionDialog.cs |    5 +++++
 src/mistelix.glade                  |   10 +++++-----
 3 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/src/DataModel/Theme.cs b/src/DataModel/Theme.cs
index af3beb8..98aac13 100644
--- a/src/DataModel/Theme.cs
+++ b/src/DataModel/Theme.cs
@@ -34,6 +34,7 @@ namespace Mistelix.DataModel
 		string menu_background;
 		string button_select;	// select in Spumux terminology
 		string button_highlight;
+		string author;
 
 		public Theme ()
 		{
@@ -46,6 +47,12 @@ namespace Mistelix.DataModel
 			set { name = value; }
 		}
 
+		[XmlElementAttribute ("author")]
+		public string Author {
+			get { return author; }
+			set { author = value; }
+		}
+
 		[XmlElementAttribute ("menu_background")]
 		public string MenuBackground {
 			get { return menu_background; }
diff --git a/src/Dialogs/ThemeSelectionDialog.cs b/src/Dialogs/ThemeSelectionDialog.cs
index 57d0335..3563d81 100644
--- a/src/Dialogs/ThemeSelectionDialog.cs
+++ b/src/Dialogs/ThemeSelectionDialog.cs
@@ -189,6 +189,7 @@ namespace Mistelix.Dialogs
 		[Glade.Widget] Gtk.VBox backpreview_box;
 		[Glade.Widget] Gtk.HBox file_hbox;
 		[Glade.Widget] Gtk.TextView textview;
+		[Glade.Widget] Gtk.Label name_label;
 		[Glade.Widget] Gtk.Label author_label;
 		[Glade.Widget] Gtk.HBox selectbutton_box;
 		[Glade.Widget] Gtk.HBox highlightbutton_box;
@@ -285,6 +286,10 @@ namespace Mistelix.Dialogs
 			selected_theme = menu_drawing_area.Theme = (Theme) model.GetValue (iter, COL_OBJECT);
 			selectbutton_drawing_area.ImageFile = Path.Combine (Defines.DATA_DIR, selected_theme.ButtonSelect);
 			highlightbutton_drawing_area.ImageFile = Path.Combine (Defines.DATA_DIR, selected_theme.ButtonHighlight);
+	
+			name_label.Text = selected_theme.Name;
+			author_label.Text = selected_theme.Author;
+
 			Logger.Debug ("ThemeSelectionDialog. Selected theme {0}", selected_theme.Name);
 		}
 	}
diff --git a/src/mistelix.glade b/src/mistelix.glade
index 893ebe5..02b9566 100644
--- a/src/mistelix.glade
+++ b/src/mistelix.glade
@@ -3169,7 +3169,7 @@
 		      <child>
 			<widget class="GtkLabel" id="label43">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">&lt;b&gt;Description&lt;/b&gt;</property>
+			  <property name="label" translatable="yes">&lt;b&gt;Theme details&lt;/b&gt;</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">True</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3203,7 +3203,7 @@
 			  <child>
 			    <widget class="GtkLabel" id="label44">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Author:</property>
+			      <property name="label" translatable="yes">Name:</property>
 			      <property name="use_underline">False</property>
 			      <property name="use_markup">False</property>
 			      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3229,7 +3229,7 @@
 			  </child>
 
 			  <child>
-			    <widget class="GtkLabel" id="author_label">
+			    <widget class="GtkLabel" id="name_label">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes"></property>
 			      <property name="use_underline">False</property>
@@ -3259,7 +3259,7 @@
 			  <child>
 			    <widget class="GtkLabel" id="label46">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Description:</property>
+			      <property name="label" translatable="yes">Author:</property>
 			      <property name="use_underline">False</property>
 			      <property name="use_markup">False</property>
 			      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3285,7 +3285,7 @@
 			  </child>
 
 			  <child>
-			    <widget class="GtkLabel" id="description_label">
+			    <widget class="GtkLabel" id="author_label">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes"></property>
 			      <property name="use_underline">False</property>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]