mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 17:46:03 +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,10 +611,24 @@ cb_page_widget_image_selected(ZathuraPage* page, GdkPixbuf* pixbuf, void* data)
|
|||
|
||||
if (selection != NULL) {
|
||||
gtk_clipboard_set_image(gtk_clipboard_get(*selection), pixbuf);
|
||||
|
||||
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
|
||||
cb_page_widget_link(ZathuraPage* page, void* data)
|
||||
|
|
Loading…
Reference in a new issue