Skip to content

Commit

Permalink
add gtk3 clipboard support
Browse files Browse the repository at this point in the history
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
  • Loading branch information
freemangordon committed Dec 31, 2022
1 parent a38e68a commit 93c6487
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/hildon-im-context.c
Expand Up @@ -1508,6 +1508,28 @@ client_message_filter(GdkXEvent *xevent,GdkEvent *event,
case HILDON_IM_CONTEXT_CLIPBOARD_PASTE:
hildon_gtk_im_context_paste(GTK_IM_CONTEXT(self));
break;
#elif GTK_CHECK_VERSION(3,0,0)
case HILDON_IM_CONTEXT_CLIPBOARD_COPY:
{
if (GTK_IS_ENTRY(self->client_gtk_widget))
g_signal_emit_by_name(self, "copy-clipboard", 0);

break;
}
case HILDON_IM_CONTEXT_CLIPBOARD_CUT:
{
if (GTK_IS_ENTRY(self->client_gtk_widget))
g_signal_emit_by_name(self, "cut-clipboard", 0);

break;
}
case HILDON_IM_CONTEXT_CLIPBOARD_PASTE:
{
if (GTK_IS_ENTRY(self->client_gtk_widget))
g_signal_emit_by_name(self, "paste-clipboard", 0);

break;
}
#endif
case HILDON_IM_CONTEXT_CLIPBOARD_SELECTION_QUERY:
hildon_im_clipboard_selection_query(self);
Expand Down

0 comments on commit 93c6487

Please sign in to comment.