commit 5d1749b14456cf73f5108828efea557fa4e716f5
parent 74a98ab352a781ea9a71090889326b634b89cc08
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Sat, 15 May 2010 11:00:21 +1000
Open dialog will remember the folder
Diffstat:
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/spek-window.vala b/src/spek-window.vala
@@ -23,6 +23,7 @@ namespace Spek {
public class Window : Gtk.Window {
private Spectrogram spectrogram;
+ private string path;
public Window () {
title = _("Spek - Acoustic Spectrum Analyser");
@@ -72,6 +73,7 @@ namespace Spek {
toolbar.insert (about, -1);
spectrogram = new Spectrogram ();
+ path = Environment.get_home_dir ();
var vbox = new VBox (false, 0);
vbox.pack_start (toolbar, false, true, 0);
@@ -85,8 +87,14 @@ namespace Spek {
_("Open File"), this, FileChooserAction.OPEN,
STOCK_CANCEL, ResponseType.CANCEL,
STOCK_OPEN, ResponseType.ACCEPT, null);
+ chooser.set_default_response (ResponseType.ACCEPT);
+ chooser.select_multiple = false;
+ chooser.local_only = false;
+ chooser.set_current_folder (path);
if (chooser.run () == ResponseType.ACCEPT) {
- spectrogram.open (chooser.get_filename ());
+ var filename = chooser.get_filename ();
+ path = Path.get_dirname (filename);
+ spectrogram.open (filename);
}
chooser.destroy ();
}
diff --git a/win/make-win32.sh b/win/make-win32.sh
@@ -66,7 +66,6 @@ cd ..
mkdir deps
"$WIX_PATH"/dark.exe x86-OSSBuild-GStreamer-Dependencies-GPL.msm -o deps/deps.wxs -x deps
-#!/usr/bin/env bash
for line in $(grep "<File" deps/deps.wxs | sed -e "s/.* Name=\"\([^\"]*\)\".* Source=\"\([^\"]*\)\".*/\1;\2/g"); do
line=${line//\\/\/}
name=${line%;*}