[gimp] app: connect the Gimp instance's clipboard_image to the system clipboard
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: connect the Gimp instance's clipboard_image to the system clipboard
- Date: Mon, 19 Sep 2016 18:16:26 +0000 (UTC)
commit 70d6cd906cf757b376ec1f927f6a0cf1655e3e74
Author: Michael Natterer <mitch gimp org>
Date: Mon Sep 19 20:14:21 2016 +0200
app: connect the Gimp instance's clipboard_image to the system clipboard
In gui.c's "clipboard-changed" callback, check for the clipboard_image
and set it on GimpClipboard.
app/gui/gui.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/gui/gui.c b/app/gui/gui.c
index 723602d..9d4ed9c 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -444,7 +444,10 @@ gui_restore_callback (Gimp *gimp,
dialogs_init (gimp, global_menu_factory);
gimp_clipboard_init (gimp);
- gimp_clipboard_set_buffer (gimp, gimp_get_clipboard_buffer (gimp));
+ if (gimp_get_clipboard_image (gimp))
+ gimp_clipboard_set_image (gimp, gimp_get_clipboard_image (gimp));
+ else
+ gimp_clipboard_set_buffer (gimp, gimp_get_clipboard_buffer (gimp));
g_signal_connect (gimp, "clipboard-changed",
G_CALLBACK (gui_clipboard_changed),
@@ -781,7 +784,10 @@ gui_tearoff_menus_notify (GimpGuiConfig *gui_config,
static void
gui_clipboard_changed (Gimp *gimp)
{
- gimp_clipboard_set_buffer (gimp, gimp_get_clipboard_buffer (gimp));
+ if (gimp_get_clipboard_image (gimp))
+ gimp_clipboard_set_image (gimp, gimp_get_clipboard_image (gimp));
+ else
+ gimp_clipboard_set_buffer (gimp, gimp_get_clipboard_buffer (gimp));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]