Merge lp:~artem-anufrij/screenshot-tool/add-in-clipboard into lp:~elementary-apps/screenshot-tool/trunk

Proposed by Artem Anufrij
Status: Merged
Approved by: Danielle Foré
Approved revision: 235
Merged at revision: 235
Proposed branch: lp:~artem-anufrij/screenshot-tool/add-in-clipboard
Merge into: lp:~elementary-apps/screenshot-tool/trunk
Diff against target: 60 lines (+12/-1)
2 files modified
src/ScreenshotWindow.vala (+3/-1)
src/Widgets/SaveDialog.vala (+9/-0)
To merge this branch: bzr merge lp:~artem-anufrij/screenshot-tool/add-in-clipboard
Reviewer Review Type Date Requested Status
Danielle Foré Needs Fixing
Review via email: mp+306952@code.launchpad.net

Commit message

Add Copy to Clipboard save option

To post a comment you must log in.
232. By Artem Anufrij

merge trunk

Revision history for this message
Danielle Foré (danrabbit) wrote :

alternate actions should go to the left of the Cancel button. See https://elementary.io/docs/human-interface-guidelines#dialogs

Also the app appears to freeze for a second when "Clipboard" is selected

review: Needs Fixing
233. By Artem Anufrij

moved clipboard button

Revision history for this message
Artem Anufrij (artem-anufrij) wrote :

Dan, I can't confirm the freeze...

234. By Artem Anufrij

dont close main window if 'close on save' doesm't selected

Revision history for this message
Cody Garver (codygarver) wrote :

Works for me but shouldn't it be "Copy to Clipboard"?

235. By Artem Anufrij

Changed Label

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ScreenshotWindow.vala'
2--- src/ScreenshotWindow.vala 2016-09-30 18:23:41 +0000
3+++ src/ScreenshotWindow.vala 2016-10-04 20:06:59 +0000
4@@ -352,7 +352,9 @@
5 });
6
7 save_dialog.close.connect (() => {
8- this.destroy ();
9+ if (close_on_save) {
10+ this.destroy ();
11+ }
12 });
13
14 save_dialog.show_all ();
15
16=== modified file 'src/Widgets/SaveDialog.vala'
17--- src/Widgets/SaveDialog.vala 2016-09-27 20:50:57 +0000
18+++ src/Widgets/SaveDialog.vala 2016-10-04 20:06:59 +0000
19@@ -14,6 +14,7 @@
20 You should have received a copy of the GNU General Public License along
21 with this program. If not, see <http://www.gnu.org/licenses>
22
23+ Authored by: Artem Anufrij <artem.anufrij@live.de>
24 ***/
25
26 namespace Screenshot.Widgets {
27@@ -28,6 +29,7 @@
28 private Gtk.ComboBoxText format_cmb;
29 private Gtk.Button save_btn;
30 private Gtk.Button retry_btn;
31+ private Gtk.Button clipboard_btn;
32
33 private string file_name;
34 private string date_time;
35@@ -124,11 +126,13 @@
36
37 save_btn = new Gtk.Button.with_label (_("Save"));
38 retry_btn = new Gtk.Button.with_label (_("Cancel"));
39+ clipboard_btn = new Gtk.Button.with_label (_("Copy to Clipboard"));
40
41 save_btn.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);
42
43 Gtk.Box actions = get_action_area () as Gtk.Box;
44 actions.margin_top = 12;
45+ actions.add (clipboard_btn);
46 actions.add (retry_btn);
47 actions.add (save_btn);
48
49@@ -136,6 +140,11 @@
50 save_response (true, folder_dir, name_entry.get_text (), format_cmb.get_active_text ());
51 });
52
53+ clipboard_btn.clicked.connect (() => {
54+ Gtk.Clipboard.get_default (this.get_display ()).set_image (pixbuf);
55+ this.close ();
56+ });
57+
58 retry_btn.clicked.connect (() => {
59 save_response (false, folder_dir, file_name, format_cmb.get_active_text ());
60 });

Subscribers

People subscribed via source and target branches

to all changes: