mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 17:55:59 +01:00
Display notification after copying image
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
a020da7049
commit
93775267fc
1 changed files with 16 additions and 2 deletions
|
@ -611,9 +611,23 @@ cb_page_widget_image_selected(ZathuraPage* page, GdkPixbuf* pixbuf, void* data)
|
||||||
|
|
||||||
if (selection != NULL) {
|
if (selection != NULL) {
|
||||||
gtk_clipboard_set_image(gtk_clipboard_get(*selection), pixbuf);
|
gtk_clipboard_set_image(gtk_clipboard_get(*selection), pixbuf);
|
||||||
}
|
|
||||||
|
|
||||||
g_free(selection);
|
bool notification = true;
|
||||||
|
girara_setting_get(zathura->ui.session, "selection-notification", ¬ification);
|
||||||
|
|
||||||
|
if (notification == true) {
|
||||||
|
char* target = NULL;
|
||||||
|
girara_setting_get(zathura->ui.session, "selection-clipboard", &target);
|
||||||
|
|
||||||
|
char* escaped_text = g_markup_printf_escaped(
|
||||||
|
_("Copied selected image to selection %s"), target);
|
||||||
|
g_free(target);
|
||||||
|
|
||||||
|
girara_notify(zathura->ui.session, GIRARA_INFO, "%s", escaped_text);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free(selection);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue