f-spot r4259 - in trunk: . src/Widgets
- From: rubenv svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4259 - in trunk: . src/Widgets
- Date: Wed, 13 Aug 2008 22:31:29 +0000 (UTC)
Author: rubenv
Date: Wed Aug 13 22:31:29 2008
New Revision: 4259
URL: http://svn.gnome.org/viewvc/f-spot?rev=4259&view=rev
Log:
2008-08-14 Ruben Vermeersch <ruben savanne be>
* src/Widgets/EditorPage.cs: Pop up a message when the user tries to apply
a tool that needs a selection, without having anything selected.
Modified:
trunk/ChangeLog
trunk/src/Widgets/EditorPage.cs
Modified: trunk/src/Widgets/EditorPage.cs
==============================================================================
--- trunk/src/Widgets/EditorPage.cs (original)
+++ trunk/src/Widgets/EditorPage.cs Wed Aug 13 22:31:29 2008
@@ -7,23 +7,6 @@
* This is free software. See COPYING for details.
*/
-/*
- * FIXME: add this back
- * if (! photo_view.GetSelection (out x, out y, out width, out height)) {
- * string msg = Catalog.GetString ("No selection available");
- * string desc = Catalog.GetString ("This tool requires an active selection. Please select a region of the phot
- *
- * HigMessageDialog md = new HigMessageDialog ((Gtk.Window)this.Toplevel, DialogFlags.DestroyWithParent,
- * Gtk.MessageType.Error, ButtonsType.Ok,
- * msg,
- * desc);
- *
- * md.Run ();
- * md.Destroy ();
- * return;
- * }
- */
-
using FSpot;
using FSpot.Editors;
using FSpot.UI.Dialog;
@@ -186,9 +169,20 @@
private void Apply (Editor editor) {
SetupEditor (editor);
- // TODO: Provide some user feedback about this.
- if (!editor.CanBeApplied)
+ if (!editor.CanBeApplied) {
+ string msg = Catalog.GetString ("No selection available");
+ string desc = Catalog.GetString ("This tool requires an active selection. Please select a region of the photo and try the operation again");
+
+ HigMessageDialog md = new HigMessageDialog (MainWindow.Toplevel.Window,
+ DialogFlags.DestroyWithParent,
+ Gtk.MessageType.Error, ButtonsType.Ok,
+ msg,
+ desc);
+
+ md.Run ();
+ md.Destroy ();
return;
+ }
// TODO: Might need to do some nicer things for multiple selections (progress?)
try {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]