[ease/inspector] Add GtkFileFilters to dialogs.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease/inspector] Add GtkFileFilters to dialogs.
- Date: Wed, 9 Jun 2010 21:59:07 +0000 (UTC)
commit 1cd53ac3b9c984def87b6440d1b309c65edd7e5c
Author: Nate Stedman <natesm gmail com>
Date: Mon Jun 7 18:42:08 2010 -0400
Add GtkFileFilters to dialogs.
src/EditorWindow.vala | 4 ++++
src/OpenDialog.vala | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/EditorWindow.vala b/src/EditorWindow.vala
index 25792da..ab7d2da 100644
--- a/src/EditorWindow.vala
+++ b/src/EditorWindow.vala
@@ -149,6 +149,10 @@ public class Ease.EditorWindow : Gtk.Window
Gtk.ResponseType.CANCEL,
"gtk-open",
Gtk.ResponseType.ACCEPT, null);
+
+ var filter = new Gtk.FileFilter();
+ filter.add_pattern("*.ease");
+ dialog.filter = filter;
if (dialog.run() == Gtk.ResponseType.ACCEPT)
{
diff --git a/src/OpenDialog.vala b/src/OpenDialog.vala
index 16f5cef..1e66ded 100644
--- a/src/OpenDialog.vala
+++ b/src/OpenDialog.vala
@@ -53,6 +53,11 @@ public class Ease.OpenDialog : GLib.Object
Gtk.ResponseType.CANCEL,
"gtk-open",
Gtk.ResponseType.ACCEPT);
+
+ // filter to only .ease files
+ var filter = new Gtk.FileFilter();
+ filter.add_pattern("*.ease");
+ dialog.filter = filter;
if (dialog.run() == Gtk.ResponseType.ACCEPT)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]