[f-spot] Kill more unused code.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Kill more unused code.
- Date: Sat, 5 Jun 2010 14:51:33 +0000 (UTC)
commit c49590febf20a55fe9212dc6e3bac2092c2183d5
Author: Ruben Vermeersch <ruben savanne be>
Date: Sat Jun 5 16:41:29 2010 +0200
Kill more unused code.
src/ColorAdjustment/Adjustment.cs | 1 -
src/ControlOverlay.cs | 1 -
src/Fader.cs | 1 -
src/Imaging/PngFile.cs | 37 ++------------------------------
src/Imaging/PnmFile.cs | 19 -----------------
src/Imaging/Tiff.cs | 8 -------
src/InternalProcess.cs | 8 -------
src/Loupe.cs | 1 -
src/MetadataStore.cs | 1 -
src/PhotoImageView.cs | 1 -
src/PhotoQuery.cs | 1 -
src/PhotoView.cs | 19 -----------------
src/PixbufUtils.cs | 1 -
src/QueuedSqliteDatabase.cs | 3 --
src/RotateCommand.cs | 10 ---------
src/SendEmail.cs | 4 ---
src/TagSelectionWidget.cs | 7 ------
src/UI.Dialog/ProgressDialog.cs | 2 -
src/UI.Dialog/ThreadProgressDialog.cs | 2 -
src/Widgets/IconView.cs | 4 ---
20 files changed, 3 insertions(+), 128 deletions(-)
---
diff --git a/src/ColorAdjustment/Adjustment.cs b/src/ColorAdjustment/Adjustment.cs
index 094a660..15ac762 100644
--- a/src/ColorAdjustment/Adjustment.cs
+++ b/src/ColorAdjustment/Adjustment.cs
@@ -18,7 +18,6 @@ using System.Collections.Generic;
namespace FSpot.ColorAdjustment {
public abstract class Adjustment {
- private List <Cms.Profile> profiles;
protected int nsteps = 20;
private Cms.Intent intent = Cms.Intent.Perceptual;
diff --git a/src/ControlOverlay.cs b/src/ControlOverlay.cs
index 141203f..f744f03 100644
--- a/src/ControlOverlay.cs
+++ b/src/ControlOverlay.cs
@@ -21,7 +21,6 @@ namespace FSpot {
Window host_toplevel;
bool composited;
VisibilityType visibility;
- double target_opacity;
int round = 12;
Delay hide;
Delay fade;
diff --git a/src/Fader.cs b/src/Fader.cs
index 4c5440b..6aeb22f 100644
--- a/src/Fader.cs
+++ b/src/Fader.cs
@@ -18,7 +18,6 @@ namespace FSpot {
public class Fader {
bool composited;
Gtk.Window win;
- double target_opacity;
DoubleAnimation fadin;
public Fader (Gtk.Window win, double target, double msec)
diff --git a/src/Imaging/PngFile.cs b/src/Imaging/PngFile.cs
index 6c4ef1b..cc64eec 100644
--- a/src/Imaging/PngFile.cs
+++ b/src/Imaging/PngFile.cs
@@ -140,21 +140,9 @@ namespace FSpot.Png {
}
}
- byte compression;
- public byte Compression {
- get {
- return compression;
- }
- set {
- if (compression != 0)
- throw new System.Exception ("Unknown compression method");
- }
- }
-
public ZtxtChunk (string keyword, string text) : base ()
{
Name = "zTXt";
- Compression = 0;
this.keyword = keyword;
}
@@ -178,7 +166,7 @@ namespace FSpot.Png {
int i = 0;
keyword = GetString (ref i);
i++;
- Compression = data [i++];
+ i++;
text_data = Chunk.Inflate (data, i, data.Length - i);
}
@@ -315,7 +303,7 @@ namespace FSpot.Png {
keyword = GetString (ref i);
i++;
compressed = (data [i++] != 0);
- Compression = data [i++];
+ i++;
Language = GetString (ref i);
i++;
LocalizedKeyword = GetString (ref i, System.Text.Encoding.UTF8);
@@ -348,7 +336,7 @@ namespace FSpot.Png {
stream.WriteByte (0);
stream.WriteByte ((byte)(compressed ? 1 : 0));
- stream.WriteByte (Compression);
+ stream.WriteByte (0);
if (Language != null && Language != System.String.Empty) {
tmp = Latin1.GetBytes (Language);
@@ -386,15 +374,10 @@ namespace FSpot.Png {
this.Language = language;
this.LocalizedKeyword = System.String.Empty;
this.compressed = compressed;
- this.Compression = 0;
}
}
public class TimeChunk : Chunk {
- //public static string Name = "tIME";
-
- System.DateTime time;
-
public System.DateTime Time {
get {
return new System.DateTime (FSpot.BitConverter.ToUInt16 (data, 0, false),
@@ -875,20 +858,6 @@ namespace FSpot.Png {
}
}
- private static byte PaethPredict (byte a, byte b, byte c)
- {
- int p = a + b - c;
- int pa = System.Math.Abs (p - a);
- int pb = System.Math.Abs (p - b);
- int pc = System.Math.Abs (p - c);
- if (pa <= pb && pa <= pc)
- return a;
- else if (pb <= pc)
- return b;
- else
- return c;
- }
-
public void ReconstructRow (int row, int channels)
{
int offset = row * width;
diff --git a/src/Imaging/PnmFile.cs b/src/Imaging/PnmFile.cs
index 7b367c0..304f4a4 100644
--- a/src/Imaging/PnmFile.cs
+++ b/src/Imaging/PnmFile.cs
@@ -110,25 +110,6 @@ namespace FSpot.Pnm {
return data;
}
- static Gdk.Pixbuf LoadRGB16 (Stream stream, int width, int height)
- {
- Gdk.Pixbuf pixbuf = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, false, 8, width, height);
- unsafe {
- byte *pixels = (byte *)pixbuf.Pixels;
- int length = width * 6;
- byte [] buffer = new byte [length];
-
- for (int row = 0; row < height; row++) {
- stream.Read (buffer, 0, buffer.Length);
- for (int i = 0; i < width * 3; i++) {
- pixels [i] = (byte) (BitConverter.ToUInt16 (buffer, i * 2, false) >> 8);
- }
- pixels += pixbuf.Rowstride;
- }
- }
- return pixbuf;
- }
-
static Gdk.Pixbuf LoadRGB8 (Stream stream, int width, int height)
{
Gdk.Pixbuf pixbuf = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, false, 8, width, height);
diff --git a/src/Imaging/Tiff.cs b/src/Imaging/Tiff.cs
index 85e9043..fedbf31 100644
--- a/src/Imaging/Tiff.cs
+++ b/src/Imaging/Tiff.cs
@@ -1259,14 +1259,6 @@ namespace FSpot.Tiff {
return null;
}
- private DirectoryEntry GetEntry (int i)
- {
- if (i < Entries.Count)
- return Entries [i];
- else
- return null;
- }
-
public DirectoryEntry Lookup (uint id)
{
foreach (DirectoryEntry entry in entries)
diff --git a/src/InternalProcess.cs b/src/InternalProcess.cs
index 15d6e43..7cb2d2f 100644
--- a/src/InternalProcess.cs
+++ b/src/InternalProcess.cs
@@ -18,10 +18,8 @@ namespace FSpot {
internal class InternalProcess {
int stdin;
int stdout;
- int stderr;
IOChannel input;
IOChannel output;
- IOChannel errorput;
public IOChannel StandardInput {
get {
@@ -35,12 +33,6 @@ namespace FSpot {
}
}
- public IOChannel StandardError {
- get {
- return errorput;
- }
- }
-
[DllImport("libglib-2.0-0.dll")]
static extern bool g_spawn_async_with_pipes (string working_dir,
string [] argv,
diff --git a/src/Loupe.cs b/src/Loupe.cs
index fdd816b..c58b9bb 100644
--- a/src/Loupe.cs
+++ b/src/Loupe.cs
@@ -31,7 +31,6 @@ namespace FSpot.Widgets {
private double angle = Math.PI / 4;
Gdk.Point start;
Gdk.Point start_hot;
- Gdk.Point pos_hot;
Gdk.Point hotspot;
public Loupe (PhotoImageView view) : base ("Loupe")
diff --git a/src/MetadataStore.cs b/src/MetadataStore.cs
index d7eaaa3..8b646f0 100644
--- a/src/MetadataStore.cs
+++ b/src/MetadataStore.cs
@@ -8,7 +8,6 @@ using Hyena;
namespace FSpot {
internal class Description {
string predicate;
- string description;
string title;
ValueFormat formater;
diff --git a/src/PhotoImageView.cs b/src/PhotoImageView.cs
index 902ce98..2f01010 100644
--- a/src/PhotoImageView.cs
+++ b/src/PhotoImageView.cs
@@ -38,7 +38,6 @@ namespace FSpot.Widgets {
get { return item; }
}
- IBrowsableCollection query;
public IBrowsableCollection Query {
get { return item.Collection; }
}
diff --git a/src/PhotoQuery.cs b/src/PhotoQuery.cs
index 6009db7..93b9cd2 100644
--- a/src/PhotoQuery.cs
+++ b/src/PhotoQuery.cs
@@ -60,7 +60,6 @@ namespace FSpot {
PhotoCache cache;
private PhotoStore store;
private Term terms;
- private Tag [] tags;
static int query_count = 0;
static int QueryCount {
diff --git a/src/PhotoView.cs b/src/PhotoView.cs
index 94a558f..85401f4 100644
--- a/src/PhotoView.cs
+++ b/src/PhotoView.cs
@@ -28,7 +28,6 @@ namespace FSpot {
public class PhotoView : EventBox {
FSpot.Delay commit_delay;
- private bool has_selection = false;
private PhotoImageView photo_view;
private ScrolledWindow photo_view_scrolled;
private EventBox background;
@@ -42,8 +41,6 @@ namespace FSpot {
private Entry description_entry;
private Widgets.Rating rating;
- private uint restore_scrollbars_idle_id;
-
// Public events.
public delegate void PhotoChangedHandler (PhotoView me);
@@ -163,20 +160,6 @@ namespace FSpot {
return true;
}
- private void ShowError (System.Exception e, Photo photo)
- {
- string msg = Catalog.GetString ("Error editing photo");
- string desc = String.Format (Catalog.GetString ("Received exception \"{0}\". Unable to save photo {1}"),
- e.Message, photo.Name);
-
- HigMessageDialog md = new HigMessageDialog ((Gtk.Window)this.Toplevel, DialogFlags.DestroyWithParent,
- Gtk.MessageType.Error, ButtonsType.Ok,
- msg,
- desc);
- md.Run ();
- md.Destroy ();
- }
-
int changed_photo;
private bool CommitPendingChanges ()
{
@@ -299,8 +282,6 @@ namespace FSpot {
set { filmstrip.Visible = value; }
}
- Gtk.Tooltips tips = new Gtk.Tooltips ();
-
public PhotoView (IBrowsableCollection query)
: base ()
{
diff --git a/src/PixbufUtils.cs b/src/PixbufUtils.cs
index f760c40..1bd2a26 100644
--- a/src/PixbufUtils.cs
+++ b/src/PixbufUtils.cs
@@ -77,7 +77,6 @@ public class PixbufUtils {
int max_width;
int max_height;
PixbufOrientation orientation;
- int orig_width;
public AspectLoader (int max_width, int max_height)
{
diff --git a/src/QueuedSqliteDatabase.cs b/src/QueuedSqliteDatabase.cs
index 3a1e32f..e6fec3f 100644
--- a/src/QueuedSqliteDatabase.cs
+++ b/src/QueuedSqliteDatabase.cs
@@ -54,7 +54,6 @@ namespace Banshee.Database
private int version;
private Thread queue_thread;
private volatile bool dispose_requested = false;
- private string dbpath;
private volatile bool connected;
/// <summary>
@@ -87,8 +86,6 @@ namespace Banshee.Database
public QueuedSqliteDatabase(string dbpath)
{
- this.dbpath = dbpath;
-
// Connect
if(connection == null) {
version = GetFileVersion(dbpath);
diff --git a/src/RotateCommand.cs b/src/RotateCommand.cs
index 50207f3..23afa4c 100644
--- a/src/RotateCommand.cs
+++ b/src/RotateCommand.cs
@@ -57,16 +57,6 @@ namespace FSpot {
done = false;
}
- private static void RotateCoefficients (string original_path, RotateDirection direction)
- {
- string temporary_path = original_path + ".tmp"; // FIXME make it unique
- JpegUtils.Transform (original_path, temporary_path,
- direction == RotateDirection.Clockwise ? JpegUtils.TransformType.Rotate90
- : JpegUtils.TransformType.Rotate270);
-
- Utils.Unix.Rename (temporary_path, original_path);
- }
-
private static void RotateOrientation (string original_path, RotateDirection direction)
{
using (FSpot.ImageFile img = FSpot.ImageFile.Create (new SafeUri (original_path))) {
diff --git a/src/SendEmail.cs b/src/SendEmail.cs
index 39f2a5e..44316e5 100644
--- a/src/SendEmail.cs
+++ b/src/SendEmail.cs
@@ -22,7 +22,6 @@ using Mono.Unix;
namespace FSpot {
public class SendEmail : GladeDialog {
Window parent_window;
- PhotoQuery query;
[Glade.Widget] private ScrolledWindow tray_scrolled;
[Glade.Widget] private Button ok_button;
@@ -31,7 +30,6 @@ namespace FSpot {
large_size, x_large_size, original_size;
[Glade.Widget] private CheckButton rotate_check;
- bool clean;
long Orig_Photo_Size = 0;
double scale_percentage = 0.3;
@@ -47,8 +45,6 @@ namespace FSpot {
string tmp_mail_dir; // To temporary keep the resized images
bool force_original = false;
- ThreadProgressDialog progress_dialog;
- System.Threading.Thread command_thread;
IBrowsableCollection selection;
public SendEmail (IBrowsableCollection selection, Window parent_window) : base ("mail_dialog")
diff --git a/src/TagSelectionWidget.cs b/src/TagSelectionWidget.cs
index 108e80b..76c03a1 100644
--- a/src/TagSelectionWidget.cs
+++ b/src/TagSelectionWidget.cs
@@ -153,13 +153,6 @@ namespace FSpot {
}
// Data functions.
- private static string ToHashColor (Gdk.Color color)
- {
- byte r = (byte) (color.Red >> 8);
- byte g = (byte) (color.Green >> 8);
- byte b = (byte) (color.Blue >> 8);
- return String.Format ("#{0:x}{1:x}{2:x}", r, g, b);
- }
private void SetBackground (CellRenderer renderer, Tag tag)
{
diff --git a/src/UI.Dialog/ProgressDialog.cs b/src/UI.Dialog/ProgressDialog.cs
index c4facc0..4f64f61 100644
--- a/src/UI.Dialog/ProgressDialog.cs
+++ b/src/UI.Dialog/ProgressDialog.cs
@@ -42,8 +42,6 @@ namespace FSpot.UI.Dialog {
get { return message_label; }
}
- private DateTime start_time;
-
private Gtk.Button button;
public Gtk.Button Button {
get {
diff --git a/src/UI.Dialog/ThreadProgressDialog.cs b/src/UI.Dialog/ThreadProgressDialog.cs
index 273321b..55ed22a 100644
--- a/src/UI.Dialog/ThreadProgressDialog.cs
+++ b/src/UI.Dialog/ThreadProgressDialog.cs
@@ -28,7 +28,6 @@ namespace FSpot.UI.Dialog {
Gtk.Button skip_button;
Gtk.ResponseType error_response;
AutoResetEvent error_response_event;
- AutoResetEvent error_response_ack_event;
object syncHandle = new object ();
@@ -150,7 +149,6 @@ namespace FSpot.UI.Dialog {
RetrySkipVisible = true;
error_response_event = new AutoResetEvent (false);
- error_response_ack_event = new AutoResetEvent (false);
error_response_event.WaitOne ();
RetrySkipVisible = false;
diff --git a/src/Widgets/IconView.cs b/src/Widgets/IconView.cs
index 1d7b264..928038e 100644
--- a/src/Widgets/IconView.cs
+++ b/src/Widgets/IconView.cs
@@ -1372,10 +1372,6 @@ namespace FSpot.Widgets
Gdk.Pixbuf result = entry.ShallowCopyPixbuf ();
int order = (int) entry.Data;
- if (order >= 0 && order < collection.Count) {
- var uri = collection [order].DefaultVersion.Uri;
- }
-
if (result == null)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]