[longomatch] Center dialogs correctly in OS X



commit 77d3ceaf1de6a678c66918dbd51298719382ad82
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu May 7 19:04:02 2015 +0200

    Center dialogs correctly in OS X

 LongoMatch.GUI/Gui/Component/DashboardWidget.cs    |    2 +-
 .../Gui/Component/PlaysListTreeWidget.cs           |    3 +-
 LongoMatch.GUI/Gui/Dialog/BusyDialog.cs            |    3 +-
 LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs    |    3 +-
 LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs   |    4 +-
 LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs      |    3 +-
 LongoMatch.GUI/Gui/Dialog/DrawingTool.cs           |    3 +-
 LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs    |    7 ++-
 LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs      |    4 +-
 LongoMatch.GUI/Gui/Dialog/EntryDialog.cs           |    4 +-
 LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs   |    3 +-
 .../Gui/Dialog/FramesCaptureProgressDialog.cs      |    3 +-
 LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs  |    3 +-
 LongoMatch.GUI/Gui/Dialog/PlayEditor.cs            |    3 +-
 LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs   |    3 +-
 LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs       |    4 +-
 LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs   |    4 +-
 LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs          |    4 +-
 .../Gui/Dialog/VideoEditionProperties.cs           |    3 +-
 LongoMatch.GUI/Gui/GUIToolkit.cs                   |   53 ++++++++++----------
 LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs   |    3 +-
 LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs    |    3 +-
 .../LongoMatch.Gui.Dialog.CodecsChoiceDialog.cs    |    2 +-
 .../LongoMatch.Gui.Dialog.DatabasesManager.cs      |    1 +
 .../LongoMatch.Gui.Dialog.EditCategoryDialog.cs    |    2 +
 .../LongoMatch.Gui.Dialog.SubstitutionsEditor.cs   |    2 +-
 .../LongoMatch.Gui.Dialog.VideoConversionTool.cs   |    3 +-
 LongoMatch.GUI/gtk-gui/gui.stetic                  |   10 +++-
 28 files changed, 88 insertions(+), 57 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
index ecf4bbc..6abd161 100644
--- a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
@@ -506,7 +506,7 @@ namespace LongoMatch.Gui.Component
                {
                        AnalysisEventButton button = (dashboardButton as AnalysisEventButton); 
                        AnalysisEventType evt = button.AnalysisEventType;
-                       EventTypeTagsEditor dialog = new EventTypeTagsEditor ();
+                       EventTypeTagsEditor dialog = new EventTypeTagsEditor (this.Toplevel as Window);
                        dialog.EventType = evt;
                        dialog.Run ();
                        dialog.Destroy ();
diff --git a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs 
b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
index 4e32b22..0e9ee8c 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
@@ -147,7 +147,8 @@ namespace LongoMatch.Gui.Component
 
                protected virtual void OnEditProperties (EventType eventType)
                {
-                       EditCategoryDialog dialog = new EditCategoryDialog (project, eventType);
+                       EditCategoryDialog dialog = new EditCategoryDialog (project, eventType,
+                               this.Toplevel as Window);
                        dialog.Run ();
                        dialog.Destroy ();
                }
diff --git a/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs b/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
index b228cb8..362e360 100644
--- a/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
@@ -28,8 +28,9 @@ namespace LongoMatch.Gui.Dialog
                ProgressBar progressBar;
                uint timeout;
 
-               public BusyDialog ()
+               public BusyDialog (Window parent)
                {
+                       TransientFor = parent;
                        box = new VBox (false, 10);
                        titleLabel = new Label ();
                        progressBar = new ProgressBar ();
diff --git a/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs b/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs
index 80112fb..4af4684 100644
--- a/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/ChooseOptionDialog.cs
@@ -24,8 +24,9 @@ namespace LongoMatch.Gui.Dialog
 {
        public partial class ChooseOptionDialog : Gtk.Dialog
        {
-               public ChooseOptionDialog ()
+               public ChooseOptionDialog (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                }
 
diff --git a/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs 
b/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs
index 315cfc4..879ff17 100644
--- a/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/ChooseProjectDialog.cs
@@ -17,14 +17,16 @@
 //
 using System;
 using System.Collections.Generic;
+using Gtk;
 using LongoMatch.Core.Store;
 
 namespace LongoMatch.Gui.Dialog
 {
        public partial class ChooseProjectDialog : Gtk.Dialog
        {
-               public ChooseProjectDialog ()
+               public ChooseProjectDialog (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        projectlistwidget1.ShowList = false;
                        projectlistwidget1.SelectionMode = Gtk.SelectionMode.Single;
diff --git a/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs b/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
index ceaf818..a2ae851 100644
--- a/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
+++ b/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
@@ -33,8 +33,9 @@ namespace LongoMatch.Gui.Dialog
                IDataBaseManager manager;
                ListStore store;
 
-               public DatabasesManager ()
+               public DatabasesManager (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        this.manager = Config.DatabaseManager;
                        ActiveDB = manager.ActiveDB;
diff --git a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
index 954224c..db5c925 100644
--- a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
+++ b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
@@ -45,8 +45,9 @@ namespace LongoMatch.Gui.Dialog
                double scaleFactor;
                bool ignoreChanges;
 
-               public DrawingTool ()
+               public DrawingTool (Window parent)      
                {
+                       TransientFor = parent;
                        this.Build ();
                        savebutton.Clicked += OnSavebuttonClicked;
                        savetoprojectbutton.Clicked += OnSavetoprojectbuttonClicked;
diff --git a/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs b/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
index 20d526e..cac19dd 100644
--- a/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
@@ -17,6 +17,7 @@
 //
 
 using System;
+using Gtk;
 using LongoMatch.Core.Store;
 
 namespace LongoMatch.Gui.Dialog
@@ -25,15 +26,17 @@ namespace LongoMatch.Gui.Dialog
        public partial class EditCategoryDialog : Gtk.Dialog
        {
 
-               public EditCategoryDialog (Project project, DashboardButton tagger)
+               public EditCategoryDialog (Project project, DashboardButton tagger, Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        timenodeproperties2.Tagger = tagger;
                        timenodeproperties2.Dashboard = project.Dashboard;
                }
 
-               public EditCategoryDialog (Project project, EventType eventType)
+               public EditCategoryDialog (Project project, EventType eventType, Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        timenodeproperties2.EventType = eventType;
                        timenodeproperties2.Dashboard = project.Dashboard;
diff --git a/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs b/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
index bcdf68f..54a1274 100644
--- a/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EndCaptureDialog.cs
@@ -17,6 +17,7 @@
 //
 
 using System;
+using Gtk;
 using LongoMatch.Core.Common;
 using LongoMatch.Gui.Helpers;
 
@@ -27,8 +28,9 @@ namespace LongoMatch.Gui.Dialog
        public partial class EndCaptureDialog : Gtk.Dialog
        {
 
-               public EndCaptureDialog (string filepath)
+               public EndCaptureDialog (string filepath, Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        image439.Pixbuf = Helpers.Misc.LoadStockIcon (this, "gtk-dialog-question", 
Gtk.IconSize.Dialog);
                        savebutton.Visible = System.IO.File.Exists (filepath);
diff --git a/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs b/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs
index 2d0c0c2..b2b3f54 100644
--- a/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EntryDialog.cs
@@ -20,6 +20,7 @@
 
 using System;
 using System.Collections.Generic;
+using Gtk;
 
 namespace LongoMatch.Gui.Dialog
 {
@@ -32,8 +33,9 @@ namespace LongoMatch.Gui.Dialog
 
                bool showCount;
 
-               public EntryDialog ()
+               public EntryDialog (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        ShowCount = false;
                        setAvailableTemplatesVisible (false);
diff --git a/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs 
b/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs
index 9581725..87b7ce6 100644
--- a/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/EventTypeTagsEditor.cs
@@ -32,8 +32,9 @@ namespace LongoMatch.Gui.Dialog
                AnalysisEventType eventType;
                Entry focusEntry;
 
-               public EventTypeTagsEditor ()
+               public EventTypeTagsEditor (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                }
 
diff --git a/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs 
b/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
index 3575123..2e3a4f4 100644
--- a/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
@@ -36,8 +36,9 @@ namespace LongoMatch.Gui.Dialog
        {
                private FramesSeriesCapturer capturer;
 
-               public FramesCaptureProgressDialog (FramesSeriesCapturer capturer)
+               public FramesCaptureProgressDialog (FramesSeriesCapturer capturer, Gtk.Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        this.Deletable = false;
                        this.capturer = capturer;
diff --git a/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs 
b/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
index 63209b2..33623cd 100644
--- a/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
@@ -31,8 +31,9 @@ namespace LongoMatch.Gui.Dialog
 
                #region Constructors
 
-               public HotKeySelectorDialog ()
+               public HotKeySelectorDialog (Gtk.Window parent)
                {
+                       TransientFor = parent;
                        hotKey = new HotKey ();
                        this.Build ();
                }
diff --git a/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs b/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
index cdaf137..015ad80 100644
--- a/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/PlayEditor.cs
@@ -33,8 +33,9 @@ namespace LongoMatch.Gui.Dialog
                TeamTagger teamtagger;
                TimelineEvent play;
 
-               public PlayEditor ()
+               public PlayEditor (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        teamtagger = new TeamTagger (new WidgetWrapper (drawingarea3));
                        teamtagger.Compact = true;
diff --git a/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs 
b/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
index baabf00..f063988 100644
--- a/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
@@ -29,8 +29,9 @@ namespace LongoMatch.Gui.Dialog
        {
                IRenderingJobsManager manager;
 
-               public RenderingJobsDialog ()
+               public RenderingJobsDialog (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        this.manager = Config.RenderingJobsManger;
                        UpdateModel ();
diff --git a/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs b/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs
index 47176b6..a900555 100644
--- a/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SnapshotsDialog.cs
@@ -19,6 +19,7 @@
 //
 
 using System;
+using Gtk;
 using LongoMatch.Core.Store;
 using LongoMatch.Core.Handlers;
 
@@ -29,8 +30,9 @@ namespace LongoMatch.Gui.Dialog
        [System.ComponentModel.ToolboxItem (false)]
        public partial class SnapshotsDialog : Gtk.Dialog
        {
-               public SnapshotsDialog ()
+               public SnapshotsDialog (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                }
 
diff --git a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs 
b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
index f0487e1..4a42f56 100644
--- a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
@@ -18,6 +18,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using Gtk;
 using LongoMatch.Core.Common;
 using LongoMatch.Core.Interfaces.Drawing;
 using LongoMatch.Core.Store;
@@ -40,8 +41,9 @@ namespace LongoMatch.Gui.Dialog
                SubstitutionEvent substitution;
                const int PLAYER_SIZE = 100;
 
-               public SubstitutionsEditor ()
+               public SubstitutionsEditor (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        tagger = new TeamTagger (new WidgetWrapper (drawingarea));
                        tagger.PlayersSelectionChangedEvent += HandlePlayersSelectionChangedEvent;
diff --git a/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs b/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs
index c66e86f..5b302c4 100644
--- a/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs
@@ -19,6 +19,7 @@
 //
 
 using System;
+using Gtk;
 
 namespace LongoMatch.Gui.Dialog
 {
@@ -28,8 +29,9 @@ namespace LongoMatch.Gui.Dialog
        public partial class UpdateDialog : Gtk.Dialog
        {
 
-               public UpdateDialog ()
+               public UpdateDialog (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                }
 
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs 
b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
index 02a6cf7..636a9e6 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
@@ -37,8 +37,9 @@ namespace LongoMatch.Gui.Dialog
 
                #region Constructors
 
-               public VideoEditionProperties ()
+               public VideoEditionProperties (Window parent)
                {
+                       TransientFor = parent;
                        this.Build ();
                        encSettings = new EncodingSettings ();
                        stdStore = Misc.FillImageFormat (sizecombobox, VideoStandards.Rendering,
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index a0887ab..7080f64 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -168,13 +168,18 @@ namespace LongoMatch.Gui
                public object ChooseOption (Dictionary<string, object> options, object parent = null)
                {
                        object res = null;
-                       ChooseOptionDialog dialog = new ChooseOptionDialog ();
-                       dialog.Options = options;
+                       Window parentWindow;
+                       ChooseOptionDialog dialog; 
+
                        if (parent != null) {
-                               dialog.TransientFor = (parent as Widget).Toplevel as Gtk.Window;
+                               parentWindow = (parent as Widget).Toplevel as Gtk.Window;
                        } else {
-                               dialog.TransientFor = mainWindow as Gtk.Window;
+                               parentWindow = mainWindow as Gtk.Window;
                        }
+
+                       dialog = new ChooseOptionDialog (parentWindow);
+                       dialog.Options = options;
+
                        if (dialog.Run () == (int)ResponseType.Ok) {
                                res = dialog.SelectedOption;
                        }
@@ -194,8 +199,7 @@ namespace LongoMatch.Gui
                                return null;
                        }
 
-                       vep = new VideoEditionProperties ();
-                       vep.TransientFor = mainWindow as Gtk.Window;
+                       vep = new VideoEditionProperties (mainWindow as Gtk.Window);
                        vep.Playlist = playlist;
                        response = vep.Run ();
                        while (response == (int)ResponseType.Ok) {
@@ -249,8 +253,7 @@ namespace LongoMatch.Gui
                        string outDir;
 
                        Log.Information ("Export frame series");
-                       sd = new SnapshotsDialog ();
-                       sd.TransientFor = mainWindow as Gtk.Window;
+                       sd = new SnapshotsDialog (mainWindow as Gtk.Window);
                        sd.Play = play.Name;
 
                        if (sd.Run () == (int)ResponseType.Ok) {
@@ -259,8 +262,7 @@ namespace LongoMatch.Gui
                                sd.Destroy ();
                                outDir = System.IO.Path.Combine (snapshotsDir, seriesName);
                                var fsc = new FramesSeriesCapturer (openedProject.Description.FileSet, play, 
interval, outDir);
-                               var fcpd = new FramesCaptureProgressDialog (fsc);
-                               fcpd.TransientFor = mainWindow as Gtk.Window;
+                               var fcpd = new FramesCaptureProgressDialog (fsc, mainWindow as Gtk.Window);
                                fcpd.Run ();
                                fcpd.Destroy ();
                        } else
@@ -270,14 +272,14 @@ namespace LongoMatch.Gui
                public void EditPlay (TimelineEvent play, Project project, bool editTags, bool editPos, bool 
editPlayers, bool editNotes)
                {
                        if (play is StatEvent) {
-                               SubstitutionsEditor dialog = new SubstitutionsEditor ();
+                               SubstitutionsEditor dialog = new SubstitutionsEditor (mainWindow as 
Gtk.Window);
                                dialog.Load (project, play as StatEvent);
                                if (dialog.Run () == (int)ResponseType.Ok) {
                                        dialog.SaveChanges ();
                                }
                                dialog.Destroy ();
                        } else {
-                               PlayEditor dialog = new PlayEditor ();
+                               PlayEditor dialog = new PlayEditor (mainWindow as Gtk.Window);
                                dialog.LoadPlay (play, project, editTags, editPos, editPlayers, editNotes);
                                dialog.Run ();
                                dialog.Destroy ();
@@ -287,8 +289,8 @@ namespace LongoMatch.Gui
                public void DrawingTool (Image image, TimelineEvent play, FrameDrawing drawing,
                                         CameraConfig camConfig, Project project)
                {
-                       DrawingTool dialog = new DrawingTool ();
-                       dialog.Show ();
+                       DrawingTool dialog = new DrawingTool (mainWindow);
+                       dialog.TransientFor = mainWindow;
 
                        Log.Information ("Drawing tool");
                        if (play == null) {
@@ -296,7 +298,7 @@ namespace LongoMatch.Gui
                        } else {
                                dialog.LoadPlay (play, image, drawing, camConfig, project);
                        }
-                       dialog.TransientFor = mainWindow;
+                       dialog.Show ();
                        dialog.Run ();
                        dialog.Destroy ();
                }
@@ -305,7 +307,7 @@ namespace LongoMatch.Gui
                {
                        Log.Information ("Choosing project");
                        ProjectDescription pd = null;
-                       ChooseProjectDialog dialog = new ChooseProjectDialog ();
+                       ChooseProjectDialog dialog = new ChooseProjectDialog (mainWindow);
                        dialog.Fill (projects);
                        if (dialog.Run () == (int)ResponseType.Ok) {
                                pd = dialog.Project;
@@ -350,18 +352,16 @@ namespace LongoMatch.Gui
 
                public void OpenDatabasesManager ()
                {
-                       DatabasesManager dm = new DatabasesManager ();
+                       DatabasesManager dm = new DatabasesManager (mainWindow);
                        Log.Information ("Open db manager");
-                       dm.TransientFor = mainWindow as Gtk.Window;
                        dm.Run ();
                        dm.Destroy ();
                }
 
                public void ManageJobs ()
                {
-                       RenderingJobsDialog dialog = new RenderingJobsDialog ();
+                       RenderingJobsDialog dialog = new RenderingJobsDialog (mainWindow as Gtk.Window);
                        Log.Information ("Manage jobs");
-                       dialog.TransientFor = mainWindow as Gtk.Window;
                        dialog.Run ();
                        dialog.Destroy ();
                }
@@ -369,13 +369,14 @@ namespace LongoMatch.Gui
                public IBusyDialog BusyDialog (string message, object parent = null)
                {
                        BusyDialog dialog;
+                       Window parentWindow;
 
-                       dialog = new BusyDialog ();
                        if (parent != null) {
-                               dialog.TransientFor = (parent as Widget).Toplevel as Gtk.Window;
+                               parentWindow = (parent as Widget).Toplevel as Gtk.Window;
                        } else {
-                               dialog.TransientFor = mainWindow as Gtk.Window;
+                               parentWindow = mainWindow as Gtk.Window;
                        }
+                       dialog = new BusyDialog (parentWindow);
                        dialog.Message = message; 
                        return dialog;
                }
@@ -427,8 +428,7 @@ namespace LongoMatch.Gui
                public EndCaptureResponse EndCapture (string filepath)
                {
                        int res;
-                       EndCaptureDialog dialog = new EndCaptureDialog (filepath);
-                       dialog.TransientFor = mainWindow.Toplevel as Gtk.Window;
+                       EndCaptureDialog dialog = new EndCaptureDialog (filepath, mainWindow);
                        res = dialog.Run ();
                        dialog.Destroy ();
                        return (EndCaptureResponse)res;
@@ -481,8 +481,7 @@ namespace LongoMatch.Gui
                        Window w;
                        
                        w = parent != null ? (parent as Widget).Toplevel as Window : mainWindow;
-                       dialog = new HotKeySelectorDialog ();
-                       dialog.TransientFor = w;
+                       dialog = new HotKeySelectorDialog (w);
                        if (dialog.Run () == (int)ResponseType.Ok) {
                                hotkey = dialog.HotKey;
                        } else {
diff --git a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs 
b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
index 68e57f9..ad5032c 100644
--- a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
@@ -368,8 +368,7 @@ namespace LongoMatch.Gui.Panel
                        bool create = false;
                        bool force = false;
                        
-                       EntryDialog dialog = new EntryDialog ();
-                       dialog.TransientFor = (Gtk.Window)this.Toplevel;
+                       EntryDialog dialog = new EntryDialog (Toplevel as Gtk.Window);
                        dialog.ShowCount = true;
                        dialog.Text = Catalog.GetString ("New dasboard");
                        dialog.CountText = Catalog.GetString ("Event types:");
diff --git a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
index 286a3fc..ffc5f98 100644
--- a/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/TeamsTemplatesPanel.cs
@@ -325,8 +325,7 @@ namespace LongoMatch.Gui.Panel
                        bool create = false;
                        bool force = false;
                        
-                       EntryDialog dialog = new EntryDialog ();
-                       dialog.TransientFor = (Gtk.Window)this.Toplevel;
+                       EntryDialog dialog = new EntryDialog (Toplevel as Gtk.Window);
                        dialog.ShowCount = true;
                        dialog.Text = Catalog.GetString ("New team");
                        dialog.AvailableTemplates = templatesNames;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.CodecsChoiceDialog.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.CodecsChoiceDialog.cs
index 3137cd0..6bfaa45 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.CodecsChoiceDialog.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.CodecsChoiceDialog.cs
@@ -26,7 +26,7 @@ namespace LongoMatch.Gui.Dialog
                        // Widget LongoMatch.Gui.Dialog.CodecsChoiceDialog
                        this.Name = "LongoMatch.Gui.Dialog.CodecsChoiceDialog";
                        this.Icon = global::Stetic.IconLoader.LoadIcon (this, "longomatch", 
global::Gtk.IconSize.Menu);
-                       this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+                       this.WindowPosition = ((global::Gtk.WindowPosition)(1));
                        this.Modal = true;
                        this.DestroyWithParent = true;
                        this.Gravity = ((global::Gdk.Gravity)(5));
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs
index fd8e1ab..72bd4d6 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs
@@ -35,6 +35,7 @@ namespace LongoMatch.Gui.Dialog
                        this.Name = "LongoMatch.Gui.Dialog.DatabasesManager";
                        this.Title = global::Mono.Unix.Catalog.GetString ("Databases manager");
                        this.Icon = global::Stetic.IconLoader.LoadIcon (this, "longomatch", 
global::Gtk.IconSize.Menu);
+                       this.TypeHint = ((global::Gdk.WindowTypeHint)(1));
                        this.WindowPosition = ((global::Gtk.WindowPosition)(4));
                        this.Modal = true;
                        this.Gravity = ((global::Gdk.Gravity)(5));
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
index a81d763..de83b98 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
@@ -15,8 +15,10 @@ namespace LongoMatch.Gui.Dialog
                        this.Name = "LongoMatch.Gui.Dialog.EditCategoryDialog";
                        this.Title = global::Mono.Unix.Catalog.GetString ("Properties");
                        this.Icon = global::Stetic.IconLoader.LoadIcon (this, "longomatch", 
global::Gtk.IconSize.Menu);
+                       this.TypeHint = ((global::Gdk.WindowTypeHint)(1));
                        this.WindowPosition = ((global::Gtk.WindowPosition)(4));
                        this.Modal = true;
+                       this.Gravity = ((global::Gdk.Gravity)(5));
                        // Internal child LongoMatch.Gui.Dialog.EditCategoryDialog.VBox
                        global::Gtk.VBox w1 = this.VBox;
                        w1.Name = "dialog1_VBox";
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.SubstitutionsEditor.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.SubstitutionsEditor.cs
index 891238a..e357dc9 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.SubstitutionsEditor.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.SubstitutionsEditor.cs
@@ -36,7 +36,7 @@ namespace LongoMatch.Gui.Dialog
                        // Widget LongoMatch.Gui.Dialog.SubstitutionsEditor
                        this.Name = "LongoMatch.Gui.Dialog.SubstitutionsEditor";
                        this.Icon = global::Stetic.IconLoader.LoadIcon (this, "longomatch", 
global::Gtk.IconSize.Menu);
-                       this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+                       this.WindowPosition = ((global::Gtk.WindowPosition)(2));
                        this.DestroyWithParent = true;
                        this.Gravity = ((global::Gdk.Gravity)(5));
                        this.SkipPagerHint = true;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoConversionTool.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoConversionTool.cs
index 45ed092..60aa0eb 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoConversionTool.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.VideoConversionTool.cs
@@ -48,7 +48,8 @@ namespace LongoMatch.Gui.Dialog
                        this.Name = "LongoMatch.Gui.Dialog.VideoConversionTool";
                        this.Title = global::Mono.Unix.Catalog.GetString ("Video converter tool");
                        this.Icon = global::Stetic.IconLoader.LoadIcon (this, "longomatch", 
global::Gtk.IconSize.Menu);
-                       this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+                       this.TypeHint = ((global::Gdk.WindowTypeHint)(1));
+                       this.WindowPosition = ((global::Gtk.WindowPosition)(1));
                        this.Modal = true;
                        this.DestroyWithParent = true;
                        this.Gravity = ((global::Gdk.Gravity)(5));
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index c565248..7ec68c5 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -3154,8 +3154,10 @@ You can download it using this direct link:</property>
     <property name="MemberName" />
     <property name="Title" translatable="yes">Properties</property>
     <property name="Icon">stock:longomatch Menu</property>
+    <property name="TypeHint">Dialog</property>
     <property name="WindowPosition">CenterOnParent</property>
     <property name="Modal">True</property>
+    <property name="Gravity">Center</property>
     <property name="Buttons">1</property>
     <property name="HelpButton">False</property>
     <child internal-child="VBox">
@@ -4776,7 +4778,8 @@ You can continue with the current capture, cancel it or save your project.
     <property name="HeightRequest">0</property>
     <property name="Title" translatable="yes">Video converter tool</property>
     <property name="Icon">stock:longomatch Menu</property>
-    <property name="WindowPosition">CenterOnParent</property>
+    <property name="TypeHint">Dialog</property>
+    <property name="WindowPosition">Center</property>
     <property name="Modal">True</property>
     <property name="DestroyWithParent">True</property>
     <property name="Gravity">Center</property>
@@ -5070,6 +5073,7 @@ You can continue with the current capture, cancel it or save your project.
     <property name="MemberName" />
     <property name="Title" translatable="yes">Databases manager</property>
     <property name="Icon">stock:longomatch Menu</property>
+    <property name="TypeHint">Dialog</property>
     <property name="WindowPosition">CenterOnParent</property>
     <property name="Modal">True</property>
     <property name="Gravity">Center</property>
@@ -10676,7 +10680,7 @@ You can continue with the current capture, cancel it or save your project.
   <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.SubstitutionsEditor" design-size="726 404">
     <property name="MemberName" />
     <property name="Icon">stock:longomatch Menu</property>
-    <property name="WindowPosition">CenterOnParent</property>
+    <property name="WindowPosition">Mouse</property>
     <property name="DestroyWithParent">True</property>
     <property name="Gravity">Center</property>
     <property name="SkipPagerHint">True</property>
@@ -11385,7 +11389,7 @@ You can continue with the current capture, cancel it or save your project.
   <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.CodecsChoiceDialog" design-size="606 397">
     <property name="MemberName" />
     <property name="Icon">stock:longomatch Menu</property>
-    <property name="WindowPosition">CenterOnParent</property>
+    <property name="WindowPosition">Center</property>
     <property name="Modal">True</property>
     <property name="DestroyWithParent">True</property>
     <property name="Gravity">Center</property>


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