From 3830d6e8186cc84e7ace95a2569af3c2e0395b27 Mon Sep 17 00:00:00 2001 From: Tim Eaglestone Date: Tue, 30 Jul 2013 14:48:05 +0100 Subject: [PATCH 1/3] fix bug in save dialog defaults to home directory and ensures .rb extension added by default --- app/widgets/main.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/widgets/main.rb b/app/widgets/main.rb index 559fe20..866061d 100755 --- a/app/widgets/main.rb +++ b/app/widgets/main.rb @@ -131,7 +131,7 @@ def openRubyFile(nada) end def saveRubyFile(code) - fileName = Qt::FileDialog.getSaveFileName(self, tr("Save Ruby Code"), tr(".rb")) + fileName = Qt::FileDialog.getSaveFileName(self, tr("Save Ruby Code"),Dir.home, tr(".rb")) unless fileName.nil? file = Qt::File.new(fileName) unless file.open(Qt::File::WriteOnly | Qt::File::Text) From 94553469529178f323e8e8739dd645dc655b9690 Mon Sep 17 00:00:00 2001 From: Tim Eaglestone Date: Fri, 30 Aug 2013 08:13:11 +0100 Subject: [PATCH 2/3] * added to .rb in save dialog. Now *.rb not .rb --- app/widgets/main.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/widgets/main.rb b/app/widgets/main.rb index 866061d..da19e64 100755 --- a/app/widgets/main.rb +++ b/app/widgets/main.rb @@ -131,7 +131,7 @@ def openRubyFile(nada) end def saveRubyFile(code) - fileName = Qt::FileDialog.getSaveFileName(self, tr("Save Ruby Code"),Dir.home, tr(".rb")) + fileName = Qt::FileDialog.getSaveFileName(self, tr("Save Ruby Code"),Dir.home, tr("*.rb")) unless fileName.nil? file = Qt::File.new(fileName) unless file.open(Qt::File::WriteOnly | Qt::File::Text) From 00b1ca63df443e25864175549ef65d1d425a7462 Mon Sep 17 00:00:00 2001 From: Tim Eaglestone Date: Fri, 30 Aug 2013 13:54:28 +0100 Subject: [PATCH 3/3] Ruby file extension automatically added save dialog. --- app/widgets/main.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/widgets/main.rb b/app/widgets/main.rb index da19e64..c25773a 100755 --- a/app/widgets/main.rb +++ b/app/widgets/main.rb @@ -131,7 +131,7 @@ def openRubyFile(nada) end def saveRubyFile(code) - fileName = Qt::FileDialog.getSaveFileName(self, tr("Save Ruby Code"),Dir.home, tr("*.rb")) + fileName = Qt::FileDialog.getSaveFileName(self, tr("Save a Ruby File"),"", tr("Ruby Files (*.rb)")) unless fileName.nil? file = Qt::File.new(fileName) unless file.open(Qt::File::WriteOnly | Qt::File::Text)