[f-spot] Fixed indentation for create_tag_dialog.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Fixed indentation for create_tag_dialog.
- Date: Fri, 18 Jun 2010 18:01:04 +0000 (UTC)
commit bae30bc8585f98b44aa12eca3af9f7547604e5b3
Author: Peter Goetz <peter gtz gmail com>
Date: Thu Jun 10 02:47:12 2010 +0200
Fixed indentation for create_tag_dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=620837
src/TagCommands.cs | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/src/TagCommands.cs b/src/TagCommands.cs
index ff8a949..cf14d48 100644
--- a/src/TagCommands.cs
+++ b/src/TagCommands.cs
@@ -58,6 +58,16 @@ public class TagCommands {
}
}
+ private string Indentation (Category category)
+ {
+ int indentations=0;
+ for (Category parent = category.Category;
+ parent != null && parent.Category != null;
+ parent = parent.Category)
+ indentations++;
+ return new string(' ', indentations*2);
+ }
+
private void PopulateCategoryOptionMenu ()
{
categories = new ArrayList ();
@@ -67,15 +77,20 @@ public class TagCommands {
ListStore category_store = new ListStore(typeof(Pixbuf), typeof(string));
foreach (Category category in categories)
- category_store.AppendValues(category.SizedIcon, category.Name);
+ {
+ category_store.AppendValues(category.SizedIcon, Indentation(category) + category.Name);
+ }
category_option_menu.Sensitive = true;
category_option_menu.Model = category_store;
var icon_renderer = new CellRendererPixbuf();
+ icon_renderer.Width=(int)Tag.TagIconSize;
category_option_menu.PackStart(icon_renderer, true);
var text_renderer = new CellRendererText();
+ text_renderer.Alignment = Pango.Alignment.Left;
+ text_renderer.Width = 150;
category_option_menu.PackStart(text_renderer, true);
category_option_menu.AddAttribute(icon_renderer, "pixbuf", 0);
@@ -134,6 +149,10 @@ public class TagCommands {
}
}
}
+ else
+ {
+ category_option_menu.Active = 0;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]