[f-spot] drop OrderByUri
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] drop OrderByUri
- Date: Sat, 4 Jul 2009 13:17:28 +0000 (UTC)
commit 5e8eb56d9929be30a9d23a4ab750bc8fd224a700
Author: Stephane Delcroix <stephane delcroix org>
Date: Sat Jul 4 15:10:05 2009 +0200
drop OrderByUri
* Query/OrderByUri.cs, PhotoStore.cs, PhotoQuery.cs: drop the OrderByUri usage, sort by uri in OrderByTime condition
src/Makefile.am | 1 -
src/PhotoQuery.cs | 11 +----------
src/PhotoStore.cs | 8 +++-----
src/Query/OrderByTime.cs | 2 +-
src/Query/OrderByUri.cs | 35 -----------------------------------
5 files changed, 5 insertions(+), 52 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 4672412..7989284 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -43,7 +43,6 @@ QUERY_CSDISTFILES = \
$(srcdir)/Query/IQueryCondition.cs \
$(srcdir)/Query/LogicalTerm.cs \
$(srcdir)/Query/OrderByTime.cs \
- $(srcdir)/Query/OrderByUri.cs \
$(srcdir)/Query/RatingRange.cs \
$(srcdir)/Query/RollSet.cs \
$(srcdir)/Query/UntaggedCondition.cs
diff --git a/src/PhotoQuery.cs b/src/PhotoQuery.cs
index d5d84cd..7d84aa8 100644
--- a/src/PhotoQuery.cs
+++ b/src/PhotoQuery.cs
@@ -90,7 +90,7 @@ namespace FSpot {
foreach (IQueryCondition condition in conditions)
SetCondition (condition);
- store.QueryToTemp (temp_table, (Tag [])null, null, Range, RollSet, RatingRange, OrderByTime, OrderByUri);
+ RequestReload ();
}
public int Count {
@@ -236,10 +236,6 @@ namespace FSpot {
}
}
- OrderByUri OrderByUri {
- get { return new OrderByUri (OrderByTime.Asc);}
- }
-
public bool TimeOrderAsc {
get { return OrderByTime.Asc; }
set {
@@ -251,11 +247,6 @@ namespace FSpot {
public void RequestReload ()
{
uint timer = Log.DebugTimerStart ();
- /* if (untagged)
- store.QueryToTemp (temp_table, new UntaggedCondition (), Range, RollSet, RatingRange, OrderByTime, OrderByUri);
- else
- store.QueryToTemp (temp_table, terms, extra_condition, Range, RollSet, RatingRange, OrderByTime, OrderByUri);
-*/
IQueryCondition[] condition_array;
int i = 0;
diff --git a/src/PhotoStore.cs b/src/PhotoStore.cs
index dd0ce15..cd0ba39 100644
--- a/src/PhotoStore.cs
+++ b/src/PhotoStore.cs
@@ -949,9 +949,9 @@ public class PhotoStore : DbStore<Photo> {
}
[Obsolete ("drop this, use IQueryCondition correctly instead")]
- public void QueryToTemp (string temp_table, Tag [] tags, string extra_condition, DateRange range, RollSet importidrange, RatingRange ratingrange, OrderByTime orderbytime, OrderByUri orderbyuri)
+ public void QueryToTemp (string temp_table, Tag [] tags, string extra_condition, DateRange range, RollSet importidrange, RatingRange ratingrange, OrderByTime orderbytime)
{
- QueryToTemp (temp_table, FSpot.OrTerm.FromTags(tags), extra_condition, range, importidrange, ratingrange, orderbytime, orderbyuri);
+ QueryToTemp (temp_table, FSpot.OrTerm.FromTags(tags), extra_condition, range, importidrange, ratingrange, orderbytime);
}
[Obsolete ("drop this, use IQueryCondition correctly instead")]
@@ -961,7 +961,7 @@ public class PhotoStore : DbStore<Photo> {
}
[Obsolete ("drop this, use IQueryCondition correctly instead")]
- public void QueryToTemp (string temp_table, Term searchexpression, string extra_condition, DateRange range, RollSet importidrange, RatingRange ratingrange, OrderByTime orderbytime, OrderByUri orderbyuri)
+ public void QueryToTemp (string temp_table, Term searchexpression, string extra_condition, DateRange range, RollSet importidrange, RatingRange ratingrange, OrderByTime orderbytime)
{
bool hide = (extra_condition == null);
@@ -1029,8 +1029,6 @@ public class PhotoStore : DbStore<Photo> {
query_builder.Append (" ORDER BY ");
query_builder.Append (orderbytime.SqlClause ());
- query_builder.Append (", ");
- query_builder.Append (orderbyuri.SqlClause ());
QueryToTemp (temp_table, query_builder.ToString ());
}
diff --git a/src/Query/OrderByTime.cs b/src/Query/OrderByTime.cs
index 487398b..a1a891e 100644
--- a/src/Query/OrderByTime.cs
+++ b/src/Query/OrderByTime.cs
@@ -29,7 +29,7 @@ namespace FSpot.Query {
public string SqlClause ()
{
- return String.Format (" time {0}", asc ? "ASC" : "DESC");
+ return String.Format (" time {0}, uri {0} ", asc ? "ASC" : "DESC");
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]