Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 8.0.1 #290

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions data/screenshot.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/elementary/screenshot/8.0.0/data/screenshot.png</image>
<image>https://raw.githubusercontent.com/elementary/screenshot/8.0.1/data/screenshot.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/elementary/screenshot/8.0.0/data/screenshot2.png</image>
<image>https://raw.githubusercontent.com/elementary/screenshot/8.0.1/data/screenshot2.png</image>
</screenshot>
</screenshots>

Expand Down Expand Up @@ -52,6 +52,12 @@
<update_contact>contact_at_elementary.io</update_contact>

<releases>
<release version="8.0.1" date="2024-12-02" urgency="medium">
<issues>
<issue url="https://github.com/elementary/screenshot/issues/224">Screenshots to clipboard don't paste into many apps like Web, etc. (ctrl+prnt, ctrl+shift+prnt, ctrl+alt+prnt)</issue>
</issues>
</release>

<release version="8.0.0" date="2024-07-25" urgency="medium">
<description>
<p>Minor updates:</p>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'io.elementary.screenshot', 'vala', 'c',
meson_version : '>= 0.57',
version: '8.0.0'
version: '8.0.1'
)

gnome = import('gnome')
Expand Down
26 changes: 24 additions & 2 deletions src/SaveDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ public class Screenshot.SaveDialog : Granite.Dialog {
});

clipboard_btn.clicked.connect (() => {
Gdk.Display.get_default ().get_clipboard ().set_texture (Gdk.Texture.for_pixbuf (pixbuf));
close ();
Gdk.Clipboard clipboard = Gdk.Display.get_default ().get_clipboard ();
clipboard.changed.connect (on_clipboard_changed);
clipboard.set_texture (Gdk.Texture.for_pixbuf (pixbuf));
});

retry_btn.clicked.connect (() => {
Expand Down Expand Up @@ -249,4 +250,25 @@ public class Screenshot.SaveDialog : Granite.Dialog {
folder_image.gicon = new ThemedIcon ("folder");
}
}

private void on_clipboard_changed () {
Gdk.Clipboard clipboard = Gdk.Display.get_default ().get_clipboard ();
Gdk.Texture texture = Gdk.Texture.for_pixbuf (pixbuf);
clipboard.read_texture_async.begin (null, (obj, res) => {
Gdk.Texture _texture = clipboard.read_texture_async.end (res);
if (_texture != null && _texture.height == texture.height && _texture.width == texture.width) {
hide_destroy ();
}
});
}

public void hide_destroy () {
hide ();

// Timeout added to ensure the clipboard is synced
// before closing the window
GLib.Timeout.add_once (500, () => {
close ();
});
}
}