summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-05-13 02:40:29 +0200
committerraveit65 <[email protected]>2018-05-14 20:55:04 +0200
commit8a31b066eeac97fde61fe1526bd1343271819570 (patch)
tree5335b3be3ecbd54f002b5c392d71fc095392eafb
parent1aff6ea8460ff0bf962d30299fa50335d0b5e170 (diff)
downloadcaja-8a31b066eeac97fde61fe1526bd1343271819570.tar.bz2
caja-8a31b066eeac97fde61fe1526bd1343271819570.tar.xz
eel-editable-label.c: avoid deprecated 'gdk_keymap_get_default'
-rw-r--r--eel/eel-editable-label.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 3f14745f..cb86ed4a 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1485,7 +1485,7 @@ eel_editable_label_draw_cursor (EelEditableLabel *label, cairo_t *cr, gint xoff
gtk_render_insertion_cursor (context, cr,
xoffset, yoffset,
label->layout, index,
- gdk_keymap_get_direction (gdk_keymap_get_default ()));
+ gdk_keymap_get_direction (gdk_keymap_get_for_display (gtk_widget_get_display (widget))));
}
else /* Block cursor */
{
@@ -2233,7 +2233,7 @@ eel_editable_label_focus_in (GtkWidget *widget,
label->need_im_reset = TRUE;
gtk_im_context_focus_in (label->im_context);
- g_signal_connect (gdk_keymap_get_default (),
+ g_signal_connect (gdk_keymap_get_for_display (gtk_widget_get_display (widget)),
"direction_changed",
G_CALLBACK (eel_editable_label_keymap_direction_changed), label);
@@ -2255,7 +2255,7 @@ eel_editable_label_focus_out (GtkWidget *widget,
eel_editable_label_check_cursor_blink (label);
- g_signal_handlers_disconnect_by_func (gdk_keymap_get_default (),
+ g_signal_handlers_disconnect_by_func (gdk_keymap_get_for_display (gtk_widget_get_display (widget)),
(gpointer) eel_editable_label_keymap_direction_changed,
label);
@@ -2459,7 +2459,7 @@ get_better_cursor (EelEditableLabel *label,
gint *y)
{
GtkTextDirection keymap_direction =
- (gdk_keymap_get_direction (gdk_keymap_get_default ()) == PANGO_DIRECTION_LTR) ?
+ (gdk_keymap_get_direction (gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (label)))) == PANGO_DIRECTION_LTR) ?
GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL;
GtkTextDirection widget_direction = gtk_widget_get_direction (GTK_WIDGET (label));
gboolean split_cursor;
@@ -2561,7 +2561,7 @@ eel_editable_label_move_visually (EelEditableLabel *label,
else
{
GtkTextDirection keymap_direction =
- (gdk_keymap_get_direction (gdk_keymap_get_default ()) == PANGO_DIRECTION_LTR) ?
+ (gdk_keymap_get_direction (gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (label)))) == PANGO_DIRECTION_LTR) ?
GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL;
strong = keymap_direction == gtk_widget_get_direction (GTK_WIDGET (label));