Skip to content

Commit 8ff5a29

Browse files
authored
Merge branch 'main' into lenemter/split-dialog
2 parents d5938fa + 741f2ac commit 8ff5a29

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

po/POTFILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ src/Widgets/MonitorClone.vala
8383
src/Widgets/MultitaskingView.vala
8484
src/Widgets/PixelPicker.vala
8585
src/Widgets/PointerLocator.vala
86-
src/Widgets/SafeWindowClone.vala
8786
src/Widgets/ScreenShield.vala
8887
src/Widgets/SelectionArea.vala
8988
src/Widgets/Tooltip.vala

src/WindowManager.vala

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,6 +2325,10 @@ namespace Gala {
23252325
bool success = false;
23262326
string filename_used = "";
23272327
yield screenshot_manager.screenshot_window (true, false, true, filename, out success, out filename_used);
2328+
2329+
if (success) {
2330+
send_screenshot_notification (clipboard);
2331+
}
23282332
} catch (Error e) {
23292333
// Ignore this error
23302334
}
@@ -2339,6 +2343,10 @@ namespace Gala {
23392343
int x, y, w, h;
23402344
yield screenshot_manager.select_area (out x, out y, out w, out h);
23412345
yield screenshot_manager.screenshot_area (x, y, w, h, true, filename, out success, out filename_used);
2346+
2347+
if (success) {
2348+
send_screenshot_notification (clipboard);
2349+
}
23422350
} catch (Error e) {
23432351
// Ignore this error
23442352
}
@@ -2350,9 +2358,23 @@ namespace Gala {
23502358
bool success = false;
23512359
string filename_used = "";
23522360
yield screenshot_manager.screenshot (false, true, filename, out success, out filename_used);
2361+
2362+
if (success) {
2363+
send_screenshot_notification (clipboard);
2364+
}
23532365
} catch (Error e) {
23542366
// Ignore this error
23552367
}
23562368
}
2369+
2370+
private void send_screenshot_notification (bool clipboard) {
2371+
notifications_manager.send.begin (
2372+
"ScreenshotManager",
2373+
"image-x-generic",
2374+
_("Screenshot taken"),
2375+
clipboard ? _("Screenshot is saved to clipboard") : _("Screenshot saved to screenshots folder"),
2376+
new GLib.HashTable<string, Variant> (null, null)
2377+
);
2378+
}
23572379
}
23582380
}

0 commit comments

Comments
 (0)