[longomatch] Make sure we show the dialog and close application from the main loop and not from constructor
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make sure we show the dialog and close application from the main loop and not from constructor
- Date: Mon, 1 Dec 2014 19:49:05 +0000 (UTC)
commit 0c04f23cec7007a0650bbd228bd7598038d3773e
Author: Julien Moutte <julien fluendo com>
Date: Mon Dec 1 17:24:27 2014 +0100
Make sure we show the dialog and close application from the main loop and not from constructor
LongoMatch.Migration/MainWindow.cs | 12 ++++++++----
LongoMatch.Migration/Program.cs | 3 +++
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.Migration/MainWindow.cs b/LongoMatch.Migration/MainWindow.cs
index 1a02f72..44feddc 100644
--- a/LongoMatch.Migration/MainWindow.cs
+++ b/LongoMatch.Migration/MainWindow.cs
@@ -35,15 +35,19 @@ public partial class MainWindow: Gtk.Window
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build ();
- FindFiles ();
- UpdateLabel ();
+
buf = "";
+
convertbutton.Clicked += HandleConvertClicked;
closebutton.Clicked += HandleCloseClicked;
}
-
-
+ public void Load ()
+ {
+ FindFiles ();
+ UpdateLabel ();
+ }
+
void FindFiles ()
{
string dbdir, templatesdir;
diff --git a/LongoMatch.Migration/Program.cs b/LongoMatch.Migration/Program.cs
index e8b705b..80f1543 100644
--- a/LongoMatch.Migration/Program.cs
+++ b/LongoMatch.Migration/Program.cs
@@ -29,6 +29,9 @@ namespace LongoMatch.Migration
InitGtk ();
MainWindow win = new MainWindow ();
win.Show ();
+ Application.Invoke (delegate {
+ win.Load ();
+ });
Application.Run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]