[f-spot: 4/7] Fixing TabbloExport dialog inconsistencies.



commit f2f7fbf0c0d51123a9d34f1155699c52bfb1f829
Author: Wojciech Dzierżanowski <wojciech dzierzanowski gmail com>
Date:   Thu Jun 11 23:07:28 2009 +0200

    Fixing TabbloExport dialog inconsistencies.
    
    By design, when the "Attach..." checkbox is unchecked and no tags were
    previously selected, clicking the checkbox brings up the tag selection
    dialog.  If the dialog is closed without selecting any tags, the
    checkbox should be restored to the unchecked state automatically.  This
    did not always happen when the dialog was canceled rather than
    confirmed.
    
    Same goes for the "Remove..." case.

 extensions/Exporters/TabbloExport/TabbloExport.cs  |   23 ++++++++++++-------
 .../Exporters/TabbloExport/TabbloExportModel.cs    |    1 -
 2 files changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/extensions/Exporters/TabbloExport/TabbloExport.cs b/extensions/Exporters/TabbloExport/TabbloExport.cs
index 458fa17..4e9c5a8 100644
--- a/extensions/Exporters/TabbloExport/TabbloExport.cs
+++ b/extensions/Exporters/TabbloExport/TabbloExport.cs
@@ -161,15 +161,18 @@ namespace FSpotTabbloExport {
 		                                      EventArgs args)
 		{
 			if (model == sender) {
+				if (model.AttachTags && 0 == model
+							.AttachedTags.Length) {
+					model.AttachedTags = SelectTags ();
+					model.AttachTags =
+						0 < model.AttachedTags.Length;
+				}
+
 				main_dialog.attach_tags_button.Active =
 						model.AttachTags;
 				main_dialog.attached_tags_select_button
 						.Sensitive = model.AttachTags;
 
-				if (model.AttachTags && 0 == model
-							.AttachedTags.Length) {
-					model.AttachedTags = SelectTags ();
-				}
 			} else {
 				model.AttachTags =
 					main_dialog.attach_tags_button.Active;
@@ -180,15 +183,17 @@ namespace FSpotTabbloExport {
 		                                      EventArgs args)
 		{
 			if (model == sender) {
-				main_dialog.remove_tags_button.Active =
-						model.RemoveTags;
-				main_dialog.removed_tags_select_button
-						.Sensitive = model.RemoveTags;
-
 				if (model.RemoveTags && 0 == model
 							.RemovedTags.Length) {
 					model.RemovedTags = SelectTags ();
+					model.RemoveTags =
+						0 < model.RemovedTags.Length;
 				}
+
+				main_dialog.remove_tags_button.Active =
+						model.RemoveTags;
+				main_dialog.removed_tags_select_button
+						.Sensitive = model.RemoveTags;
 			} else {
 				model.RemoveTags =
 					main_dialog.remove_tags_button.Active;
diff --git a/extensions/Exporters/TabbloExport/TabbloExportModel.cs b/extensions/Exporters/TabbloExport/TabbloExportModel.cs
index 25a7c9e..bba25dc 100644
--- a/extensions/Exporters/TabbloExport/TabbloExportModel.cs
+++ b/extensions/Exporters/TabbloExport/TabbloExportModel.cs
@@ -188,7 +188,6 @@ namespace FSpotTabbloExport {
 		}
 
 
-		// Returns the value to be set on the property.
 		private void OnMaybePropertyChanged (object old_value,
 				object new_value, EventHandler handler)
 		{



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]