Re: browse/edit toggle button patch

I see you checking.  Check out the attached patch for getting rid of
those double sounds?

Also, you removed some additional code from the HandleToggleView*
methods.  Is there really any reason to have both those and the
HandleView* methods immediately below them?  I believe that the
versions of the HandleToggleView* methods in this patch could be used
for HandleView* methods are in all circumstances.

Also, I don't think those HandleView* methods are actually used
anywhere so they should probably be removed anyway.  Better yet,
rename HandleToggleView* to HandleView*.
I didn't rename them in the patch, just babbling.

Any thoughts?


On 11/30/05, Gabriel Burt <gabriel burt gmail com> wrote:
> On Tue, 2005-11-29 at 23:27 -0500, John Russell wrote:
> > The Browse/Edit toggle buttons have an odd behavior.  When you click
> > the browse button it is set to active and view_mode is set to
> > ModeType.PhotoView.  However if you click it again, the button becomes
> > inactive.  Same thing for the Edit button.
> I've committed a modified version of your patch.  You're right that a
> radio group would be better - I think having that would prevent the
> double toggle sounds I'm hearing (from one turning on, the other off).
> Gabriel
Index: MainWindow.cs
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.240
diff -u -r1.240 MainWindow.cs
--- MainWindow.cs	30 Nov 2005 08:23:51 -0000	1.240
+++ MainWindow.cs	30 Nov 2005 14:28:46 -0000
@@ -1710,16 +1710,16 @@
 	void HandleToggleViewBrowse (object sender, EventArgs args)
-		if (view_mode == ModeType.IconView)
+		if (view_mode == ModeType.IconView && ! browse_button.Active)
 			browse_button.Active = true;
-		else if (browse_button.Active)
+		else if (browse_button.Active && view_mode != ModeType.IconView)
 			SetViewMode (ModeType.IconView);
 	void HandleToggleViewPhoto (object sender, EventArgs args)
-		if (view_mode == ModeType.PhotoView)
+		if (view_mode == ModeType.PhotoView && ! edit_button.Active))
 			edit_button.Active = true;
-		else if (edit_button.Active)
+		else if (edit_button.Active && view_mode != ModeType.PhotoView)
 			SetViewMode (ModeType.PhotoView);


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