f-spot r3729 - in trunk/src: . UI.Dialog
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r3729 - in trunk/src: . UI.Dialog
- Date: Mon, 3 Mar 2008 12:09:25 +0000 (GMT)
Author: sdelcroix
Date: Mon Mar 3 12:09:25 2008
New Revision: 3729
URL: http://svn.gnome.org/viewvc/f-spot?rev=3729&view=rev
Log:
reverting... not so usefull
Removed:
trunk/src/UI.Dialog/SizeAttribute.cs
Modified:
trunk/src/GladeDialog.cs
trunk/src/ImportCommand.cs
trunk/src/Makefile.am
Modified: trunk/src/GladeDialog.cs
==============================================================================
--- trunk/src/GladeDialog.cs (original)
+++ trunk/src/GladeDialog.cs Mon Mar 3 12:09:25 2008
@@ -1,17 +1,3 @@
-/*
- * FSpot.GladeDialog.cs
- *
- * Author(s):
- * Larry Ewing <lewing novell com>
- * Stephane Delcroix <stephane delcroix org>
- *
- * This is free software, See COPYING for details
- */
-
-using System;
-using FSpot.UI.Dialog;
-using Gtk;
-
namespace FSpot {
public class GladeDialog {
protected string dialog_name;
@@ -20,6 +6,7 @@
protected GladeDialog ()
{
+
}
public GladeDialog (string name)
@@ -32,42 +19,15 @@
this.dialog_name = name;
xml = new Glade.XML (null, "f-spot.glade", name, "f-spot");
xml.Autoconnect (this);
-
- Attribute[] attributeArray = Attribute.GetCustomAttributes (this.GetType ());
- foreach(Attribute attrib in attributeArray)
- {
- if (attrib is SizeAttribute)
- {
- SizeAttribute a = attrib as SizeAttribute;
- if ((int) FSpot.Preferences.Get (a.WidthKey) > 0)
- Dialog.Resize ((int) Preferences.Get (a.WidthKey), (int) Preferences.Get(a.HeightKey));
- }
- }
}
public Gtk.Dialog Dialog {
get {
if (dialog == null)
dialog = (Gtk.Dialog) xml.GetWidget (dialog_name);
+
return dialog;
}
}
-
- protected void SaveSettings ()
- {
- Attribute[] attributeArray = Attribute.GetCustomAttributes (this.GetType ());
- foreach(Attribute attrib in attributeArray)
- {
- if (attrib is SizeAttribute)
- {
- SizeAttribute a = attrib as SizeAttribute;
- int width, height;
- Dialog.GetSize (out width, out height);
-
- Preferences.Set (a.WidthKey, width);
- Preferences.Set (a.HeightKey, height);
- }
- }
- }
}
}
Modified: trunk/src/ImportCommand.cs
==============================================================================
--- trunk/src/ImportCommand.cs (original)
+++ trunk/src/ImportCommand.cs Mon Mar 3 12:09:25 2008
@@ -26,7 +26,6 @@
using FSpot.Utils;
using FSpot.UI.Dialog;
-[Size (Preferences.IMPORT_WINDOW_WIDTH, Preferences.IMPORT_WINDOW_HEIGHT)]
public class ImportCommand : FSpot.GladeDialog
{
internal class SourceItem : ImageMenuItem
@@ -590,6 +589,9 @@
this.Dialog.WindowPosition = Gtk.WindowPosition.CenterOnParent;
this.Dialog.Response += HandleDialogResponse;
+ if ((int) FSpot.Preferences.Get (FSpot.Preferences.IMPORT_WINDOW_WIDTH) > 0)
+ this.Dialog.Resize ((int) FSpot.Preferences.Get (FSpot.Preferences.IMPORT_WINDOW_WIDTH), (int) FSpot.Preferences.Get(FSpot.Preferences.IMPORT_WINDOW_HEIGHT));
+
if ((int) FSpot.Preferences.Get (FSpot.Preferences.IMPORT_WINDOW_PANE_POSITION) > 0)
import_hpaned.Position = (int) FSpot.Preferences.Get (FSpot.Preferences.IMPORT_WINDOW_PANE_POSITION);
@@ -691,7 +693,11 @@
}
}
- SaveSettings ();
+ int width, height;
+ this.Dialog.GetSize (out width, out height);
+
+ FSpot.Preferences.Set (FSpot.Preferences.IMPORT_WINDOW_WIDTH, width);
+ FSpot.Preferences.Set (FSpot.Preferences.IMPORT_WINDOW_HEIGHT, height);
FSpot.Preferences.Set (FSpot.Preferences.IMPORT_WINDOW_PANE_POSITION, import_hpaned.Position);
this.Dialog.Destroy ();
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Mon Mar 3 12:09:25 2008
@@ -226,7 +226,6 @@
$(srcdir)/UI.Dialog/AboutDialog.cs \
$(srcdir)/UI.Dialog/EditExceptionDialog.cs \
$(srcdir)/UI.Dialog/HigMessageDialog.cs \
- $(srcdir)/UI.Dialog/SizeAttribute.cs \
$(srcdir)/Updater.cs \
$(srcdir)/UriCollection.cs \
$(srcdir)/Util.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]