"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Pinta.Core/Actions/ViewActions.cs" between
pinta-1.7.tar.gz and pinta-1.7.1.tar.gz

About: Pinta is a powerful image drawing and editing program (modeled after Paint.NET).

ViewActions.cs  (pinta-1.7):ViewActions.cs  (pinta-1.7.1)
skipping to change at line 142 skipping to change at line 142
menu.Remove (show_pad); menu.Remove (show_pad);
menu.Append (ToolBar.CreateMenuItem ()); menu.Append (ToolBar.CreateMenuItem ());
menu.Append (PixelGrid.CreateMenuItem ()); menu.Append (PixelGrid.CreateMenuItem ());
menu.Append (Rulers.CreateMenuItem ()); menu.Append (Rulers.CreateMenuItem ());
menu.Append (ImageTabs.CreateMenuItem ()); menu.Append (ImageTabs.CreateMenuItem ());
menu.AppendSeparator (); menu.AppendSeparator ();
ImageMenuItem zoomin = ZoomIn.CreateAcceleratedMenuItem ( Gdk.Key.plus, Gdk.ModifierType.ControlMask); ImageMenuItem zoomin = ZoomIn.CreateAcceleratedMenuItem ( Gdk.Key.plus, Gdk.ModifierType.ControlMask);
zoomin.AddAccelerator ("activate", PintaCore.Actions.Acce lGroup, new AccelKey (Gdk.Key.equal, Gdk.ModifierType.ControlMask, AccelFlags.Vi sible)); zoomin.AddAccelerator ("activate", PintaCore.Actions.Acce lGroup, new AccelKey (Gdk.Key.equal, Gdk.ModifierType.ControlMask, AccelFlags.Vi sible));
zoomin.AddAccelerator ("activate", PintaCore.Actions.Acce lGroup, new AccelKey (Gdk.Key.equal, 0, AccelFlags.Visible));
zoomin.AddAccelerator ("activate", PintaCore.Actions.Acce lGroup, new AccelKey (Gdk.Key.KP_Add, Gdk.ModifierType.ControlMask, AccelFlags.V isible)); zoomin.AddAccelerator ("activate", PintaCore.Actions.Acce lGroup, new AccelKey (Gdk.Key.KP_Add, Gdk.ModifierType.ControlMask, AccelFlags.V isible));
zoomin.AddAccelerator ("activate", PintaCore.Actions.Acce lGroup, new AccelKey (Gdk.Key.KP_Add, 0, AccelFlags.Visible));
menu.Append (zoomin); menu.Append (zoomin);
ImageMenuItem zoomout = ZoomOut.CreateAcceleratedMenuItem (Gdk.Key.minus, Gdk.ModifierType.ControlMask); ImageMenuItem zoomout = ZoomOut.CreateAcceleratedMenuItem (Gdk.Key.minus, Gdk.ModifierType.ControlMask);
zoomout.AddAccelerator ("activate", PintaCore.Actions.Acc zoomout.AddAccelerator ("activate", PintaCore.Actions.Acc
elGroup, new AccelKey (Gdk.Key.underscore, Gdk.ModifierType.ControlMask, AccelFl elGroup, new AccelKey (Gdk.Key.minus, Gdk.ModifierType.ControlMask, AccelFlags.V
ags.Visible)); isible));
zoomout.AddAccelerator ("activate", PintaCore.Actions.Acc
elGroup, new AccelKey (Gdk.Key.minus, 0, AccelFlags.Visible));
zoomout.AddAccelerator ("activate", PintaCore.Actions.Acc elGroup, new AccelKey (Gdk.Key.KP_Subtract, Gdk.ModifierType.ControlMask, AccelF lags.Visible)); zoomout.AddAccelerator ("activate", PintaCore.Actions.Acc elGroup, new AccelKey (Gdk.Key.KP_Subtract, Gdk.ModifierType.ControlMask, AccelF lags.Visible));
zoomout.AddAccelerator ("activate", PintaCore.Actions.Acc elGroup, new AccelKey (Gdk.Key.KP_Subtract, 0, AccelFlags.Visible));
menu.Append (zoomout); menu.Append (zoomout);
ImageMenuItem actualsize = ActualSize.CreateAcceleratedMe nuItem (Gdk.Key.Key_0, Gdk.ModifierType.ControlMask); ImageMenuItem actualsize = ActualSize.CreateAcceleratedMe nuItem (Gdk.Key.Key_0, Gdk.ModifierType.ControlMask);
actualsize.AddAccelerator ("activate", PintaCore.Actions. AccelGroup, new AccelKey (Gdk.Key.A, Gdk.ModifierType.ControlMask | Gdk.Modifier Type.ShiftMask, AccelFlags.Visible)); actualsize.AddAccelerator ("activate", PintaCore.Actions. AccelGroup, new AccelKey (Gdk.Key.A, Gdk.ModifierType.ControlMask | Gdk.Modifier Type.ShiftMask, AccelFlags.Visible));
menu.Append (actualsize); menu.Append (actualsize);
menu.Append (ZoomToWindow.CreateAcceleratedMenuItem (Gdk. Key.B, Gdk.ModifierType.ControlMask)); menu.Append (ZoomToWindow.CreateAcceleratedMenuItem (Gdk. Key.B, Gdk.ModifierType.ControlMask));
//menu.Append (ZoomToSelection.CreateAcceleratedMenuItem (Gdk.Key.B, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask)); //menu.Append (ZoomToSelection.CreateAcceleratedMenuItem (Gdk.Key.B, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
menu.Append (Fullscreen.CreateAcceleratedMenuItem (Gdk.Ke y.F11, Gdk.ModifierType.None)); menu.Append (Fullscreen.CreateAcceleratedMenuItem (Gdk.Ke y.F11, Gdk.ModifierType.None));
menu.AppendSeparator (); menu.AppendSeparator ();
skipping to change at line 235 skipping to change at line 239
/// <summary> /// <summary>
/// Converts the string representation of a percent (with or with out a '%' sign) to a numeric value /// Converts the string representation of a percent (with or with out a '%' sign) to a numeric value
/// </summary> /// </summary>
public static bool TryParsePercent (string text, out double perce nt) public static bool TryParsePercent (string text, out double perce nt)
{ {
var culture = CultureInfo.CurrentCulture; var culture = CultureInfo.CurrentCulture;
var format = culture.NumberFormat; var format = culture.NumberFormat;
// In order to use double.TryParse, we must: // In order to use double.TryParse, we must:
// - replace the decimal separator for percents with the regular separator. // - replace the decimal separator for percents with the regular separator.
// - remove the percent sign. // - remove the percent sign. We remove both the locale's
percent sign and
// the standard one (U+0025). When running under mono,
the 'fr' locale
// uses U+066A but the translation string uses U+0025,
so there may be a bug in Mono.
// - remove the group separators, since they might be dif ferent from the regular // - remove the group separators, since they might be dif ferent from the regular
// group separator, and the group sizes could also be d ifferent. // group separator, and the group sizes could also be d ifferent.
text = text.Replace (format.PercentGroupSeparator, string .Empty); text = text.Replace (format.PercentGroupSeparator, string .Empty);
text = text.Replace (format.PercentSymbol, string.Empty); text = text.Replace (format.PercentSymbol, string.Empty);
text = text.Replace ("%", string.Empty);
text = text.Replace (format.PercentDecimalSeparator, form at.NumberDecimalSeparator); text = text.Replace (format.PercentDecimalSeparator, form at.NumberDecimalSeparator);
text = text.Trim(); text = text.Trim();
return double.TryParse (text, return double.TryParse (text,
NumberStyles.AllowDecimalPoint | NumberStyles.AllowDecimalPoint |
NumberStyles.AllowLeadingWhite | NumberStyles.AllowLeadingWhite |
NumberStyles.AllowTrailingWhite, NumberStyles.AllowTrailingWhite,
culture, out percent); culture, out percent);
} }
 End of changes. 6 change blocks. 
4 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)