Remember last directory when adding attachments: Closes #6104
This commit is contained in:
parent
dd3fe43a16
commit
1304b8e5f9
2 changed files with 7 additions and 1 deletions
2
THANKS
2
THANKS
|
|
@ -3,6 +3,7 @@ The Geary team would like to thank the following contributors:
|
||||||
Robert Ancell <robert.ancell@canonical.com>
|
Robert Ancell <robert.ancell@canonical.com>
|
||||||
Jürg Billeter <j@bitron.ch>
|
Jürg Billeter <j@bitron.ch>
|
||||||
Martijn Braam <pizzamartijn@gmail.com>
|
Martijn Braam <pizzamartijn@gmail.com>
|
||||||
|
Attila Bukor <r1pp3rj4ck@w4it.eu>
|
||||||
Andrea Corbellini <corbellini.andrea@gmail.com>
|
Andrea Corbellini <corbellini.andrea@gmail.com>
|
||||||
Sergey Shnatsel Davidoff <sergey@elementaryos.org>
|
Sergey Shnatsel Davidoff <sergey@elementaryos.org>
|
||||||
Joanmarie Diggs <jdiggs@igalia.com>
|
Joanmarie Diggs <jdiggs@igalia.com>
|
||||||
|
|
@ -24,5 +25,4 @@ Alexander Wilms <alexander.wilms@zoho.com>
|
||||||
Andreas Obergrusberger <tradiaz@yahoo.de>
|
Andreas Obergrusberger <tradiaz@yahoo.de>
|
||||||
Martin Olsson <martin@minimum.se>
|
Martin Olsson <martin@minimum.se>
|
||||||
Mathias Hasselmann <mathias@openismus.com>
|
Mathias Hasselmann <mathias@openismus.com>
|
||||||
Attila Bukor <r1pp3rj4ck@w4it.eu>
|
|
||||||
Jon Dowland <jmtd@debian.org>
|
Jon Dowland <jmtd@debian.org>
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ public class ComposerWindow : Gtk.Window {
|
||||||
// Signal sent when the "Send" button is clicked.
|
// Signal sent when the "Send" button is clicked.
|
||||||
public signal void send(ComposerWindow composer);
|
public signal void send(ComposerWindow composer);
|
||||||
|
|
||||||
|
private static string? current_folder = null;
|
||||||
|
|
||||||
public Geary.Account account { get; private set; }
|
public Geary.Account account { get; private set; }
|
||||||
|
|
||||||
public string from { get; set; }
|
public string from { get; set; }
|
||||||
|
|
@ -664,10 +666,14 @@ public class ComposerWindow : Gtk.Window {
|
||||||
_("Choose a file"), this, Gtk.FileChooserAction.OPEN,
|
_("Choose a file"), this, Gtk.FileChooserAction.OPEN,
|
||||||
Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL,
|
Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL,
|
||||||
_("_Attach"), Gtk.ResponseType.ACCEPT);
|
_("_Attach"), Gtk.ResponseType.ACCEPT);
|
||||||
|
if (!Geary.String.is_empty(current_folder))
|
||||||
|
dialog.set_current_folder(current_folder);
|
||||||
dialog.set_local_only(false);
|
dialog.set_local_only(false);
|
||||||
dialog.set_select_multiple(true);
|
dialog.set_select_multiple(true);
|
||||||
|
|
||||||
if (dialog.run() == Gtk.ResponseType.ACCEPT) {
|
if (dialog.run() == Gtk.ResponseType.ACCEPT) {
|
||||||
|
current_folder = dialog.get_current_folder();
|
||||||
|
|
||||||
foreach (File file in dialog.get_files()) {
|
foreach (File file in dialog.get_files()) {
|
||||||
if (!add_attachment(file)) {
|
if (!add_attachment(file)) {
|
||||||
finished = false;
|
finished = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue