[banshee] Close the import dialog as soon as import pressed
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] Close the import dialog as soon as import pressed
- Date: Tue, 27 Oct 2009 19:27:45 +0000 (UTC)
commit 19ebfbea05f3a4dfb62381cb8b7afe601e6761fa
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Oct 27 12:23:05 2009 -0700
Close the import dialog as soon as import pressed
.../Banshee.Gui/GlobalActions.cs | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs
index 734fd45..db10db9 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/GlobalActions.cs
@@ -132,15 +132,13 @@ namespace Banshee.Gui
private void OnImport (object o, EventArgs args)
{
- Banshee.Library.Gui.ImportDialog dialog = new Banshee.Library.Gui.ImportDialog ();
- try {
- if (dialog.Run () != Gtk.ResponseType.Ok) {
- return;
- }
-
- dialog.ActiveSource.Import ();
- } finally {
- dialog.Destroy ();
+ var dialog = new Banshee.Library.Gui.ImportDialog ();
+ var res = dialog.Run ();
+ var src = dialog.ActiveSource;
+ dialog.Destroy ();
+
+ if (res == Gtk.ResponseType.Ok) {
+ src.Import ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]