f-spot r4619 - in trunk: . src src/Core src/Widgets
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4619 - in trunk: . src src/Core src/Widgets
- Date: Mon, 24 Nov 2008 20:36:09 +0000 (UTC)
Author: sdelcroix
Date: Mon Nov 24 20:36:09 2008
New Revision: 4619
URL: http://svn.gnome.org/viewvc/f-spot?rev=4619&view=rev
Log:
change the Children property to be IList<Tag>
2008-11-24 Stephane Delcroix <sdelcroix novell com>
* src/Core/Category.cs: returns IList<Tag> instead of Tag[] for Children
property.
* src/Core/Photo.cs:
* src/TagSelectionWidget.cs:
* src/TagStore.cs:
* src/Widgets/TagMenu.cs: adapt to the modified api
Modified:
trunk/ChangeLog
trunk/src/Core/Category.cs
trunk/src/Core/Photo.cs
trunk/src/TagSelectionWidget.cs
trunk/src/TagStore.cs
trunk/src/Widgets/TagMenu.cs
Modified: trunk/src/Core/Category.cs
==============================================================================
--- trunk/src/Core/Category.cs (original)
+++ trunk/src/Core/Category.cs Mon Nov 24 20:36:09 2008
@@ -15,7 +15,7 @@
public class Category : Tag {
List<Tag> children;
bool children_need_sort;
- public Tag [] Children {
+ public IList<Tag> Children {
get {
if (children_need_sort)
children.Sort ();
Modified: trunk/src/Core/Photo.cs
==============================================================================
--- trunk/src/Core/Photo.cs (original)
+++ trunk/src/Core/Photo.cs Mon Nov 24 20:36:09 2008
@@ -584,7 +584,7 @@
RemoveTag (tag);
}
- public void RemoveCategory (Tag []taglist)
+ public void RemoveCategory (IList<Tag> taglist)
{
foreach (Tag tag in taglist) {
Category cat = tag as Category;
Modified: trunk/src/TagSelectionWidget.cs
==============================================================================
--- trunk/src/TagSelectionWidget.cs (original)
+++ trunk/src/TagSelectionWidget.cs Mon Nov 24 20:36:09 2008
@@ -28,6 +28,7 @@
using Gdk;
using Gtk;
using System.Collections;
+using System.Collections.Generic;
using System.IO;
using System;
@@ -88,7 +89,7 @@
private void LoadCategory (Category category, TreeIter parent_iter)
{
- Tag [] tags = category.Children;
+ IList<Tag> tags = category.Children;
foreach (Tag t in tags) {
TreeIter iter = (Model as TreeStore).AppendValues (parent_iter, t.Id, t.Name);
Modified: trunk/src/TagStore.cs
==============================================================================
--- trunk/src/TagStore.cs (original)
+++ trunk/src/TagStore.cs Mon Nov 24 20:36:09 2008
@@ -299,7 +299,7 @@
Category category = item as Category;
if (category != null &&
category.Children != null &&
- category.Children.Length > 0)
+ category.Children.Count > 0)
throw new InvalidTagOperationException (category, "Cannot remove category that contains children");
RemoveFromCache (item);
Modified: trunk/src/Widgets/TagMenu.cs
==============================================================================
--- trunk/src/Widgets/TagMenu.cs (original)
+++ trunk/src/Widgets/TagMenu.cs Mon Nov 24 20:36:09 2008
@@ -101,7 +101,7 @@
item.ShowAll ();
Category subcat = t as Category;
- if (subcat != null && subcat.Children.Length != 0) {
+ if (subcat != null && subcat.Children.Count != 0) {
PopulateFlat (t as Category, parent);
} else {
item.Activated += HandleActivate;
@@ -121,7 +121,7 @@
item.ShowAll ();
Category subcat = t as Category;
- if (subcat != null && subcat.Children.Length != 0) {
+ if (subcat != null && subcat.Children.Count != 0) {
Gtk.Menu submenu = new Menu ();
Populate (t as Category, submenu);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]