Skip to content

Commit

Permalink
[Partially fixes bug #992699] Fix some modal dialog issues.
Browse files Browse the repository at this point in the history
Fixed for the Resize Canvas, Resize Image, Levels, Curves,
Posterize, and Import Layer from File dialogs.
  • Loading branch information
cameronwhite committed Sep 25, 2012
1 parent 0e3b785 commit 1806cff
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Pinta.Core/Actions/LayerActions.cs
Expand Up @@ -154,9 +154,11 @@ private void HandlePintaCoreActionsLayersImportFromFileActivated (object sender,
Document doc = PintaCore.Workspace.ActiveDocument;
PintaCore.Tools.Commit ();

Gtk.FileChooserDialog fcd = new Gtk.FileChooserDialog (Catalog.GetString ("Open Image File"), null, FileChooserAction.Open, Gtk.Stock.Cancel, Gtk.ResponseType.Cancel, Gtk.Stock.Open, Gtk.ResponseType.Ok);
var fcd = new Gtk.FileChooserDialog (Catalog.GetString ("Open Image File"),PintaCore.Chrome.MainWindow,
FileChooserAction.Open, Stock.Cancel, ResponseType.Cancel,
Stock.Open, ResponseType.Ok);

fcd.SetCurrentFolder (PintaCore.System.GetDialogDirectory ());
fcd.SetCurrentFolder (PintaCore.System.GetDialogDirectory ());
fcd.AlternativeButtonOrder = new int[] { (int) ResponseType.Ok, (int) ResponseType.Cancel };

fcd.AddImagePreview ();
Expand Down
5 changes: 4 additions & 1 deletion Pinta.Effects/Dialogs/Effects.CurvesDialog.cs
Expand Up @@ -25,6 +25,8 @@
// THE SOFTWARE.

using System;
using Gtk;
using Mono.Unix;
using System.Collections.Generic;
using Cairo;

Expand Down Expand Up @@ -77,7 +79,8 @@ private class ControlPointDrawingInfo

public CurvesData EffectData { get; private set; }

public CurvesDialog (CurvesData effectData)
public CurvesDialog (CurvesData effectData) : base (Catalog.GetString ("Curves"), PintaCore.Chrome.MainWindow,
DialogFlags.Modal)
{
this.Build ();

Expand Down
4 changes: 3 additions & 1 deletion Pinta.Effects/Dialogs/Effects.LevelsDialog.cs
Expand Up @@ -36,6 +36,7 @@

using System;
using Gtk;
using Mono.Unix;
using Cairo;

using Pinta.Core;
Expand All @@ -49,7 +50,8 @@ public partial class LevelsDialog : Gtk.Dialog

public LevelsData EffectData { get; private set; }

public LevelsDialog (LevelsData effectData)
public LevelsDialog (LevelsData effectData) : base (Catalog.GetString ("Levels Adjustment"),
PintaCore.Chrome.MainWindow, DialogFlags.Modal)
{
this.Build ();

Expand Down
5 changes: 4 additions & 1 deletion Pinta.Effects/Dialogs/Effects.PosterizeDialog.cs
Expand Up @@ -25,6 +25,8 @@
// THE SOFTWARE.

using System;
using Gtk;
using Mono.Unix;
using Pinta.Core;
using Pinta.Gui.Widgets;

Expand All @@ -44,7 +46,8 @@ public partial class PosterizeDialog : Gtk.Dialog
get { return hscalespinBlue.ValueAsInt; }
}

public PosterizeDialog ()
public PosterizeDialog () : base (Catalog.GetString ("Posterize"),
PintaCore.Chrome.MainWindow, DialogFlags.Modal)
{
Build ();

Expand Down
7 changes: 5 additions & 2 deletions Pinta/Dialogs/ResizeCanvasDialog.cs
Expand Up @@ -25,16 +25,19 @@
// THE SOFTWARE.

using System;
using Gtk;
using Mono.Unix;
using Pinta.Core;

namespace Pinta
{
public partial class ResizeCanvasDialog : Gtk.Dialog
public partial class ResizeCanvasDialog : Dialog
{
private bool value_changing;
private Anchor anchor;

public ResizeCanvasDialog ()
public ResizeCanvasDialog () : base (Catalog.GetString ("Resize Canvas"), PintaCore.Chrome.MainWindow,
DialogFlags.Modal)
{
this.Build ();

Expand Down
7 changes: 5 additions & 2 deletions Pinta/Dialogs/ResizeImageDialog.cs
Expand Up @@ -25,15 +25,18 @@
// THE SOFTWARE.

using System;
using Gtk;
using Mono.Unix;
using Pinta.Core;

namespace Pinta
{
public partial class ResizeImageDialog : Gtk.Dialog
public partial class ResizeImageDialog : Dialog
{
private bool value_changing;

public ResizeImageDialog ()
public ResizeImageDialog () : base (Catalog.GetString ("Resize Image"), PintaCore.Chrome.MainWindow,
DialogFlags.Modal)
{
this.Build ();

Expand Down

0 comments on commit 1806cff

Please sign in to comment.