gtkemojicompletion.c: Don't use g_autoptr()

This code is also built with non-GCC/non-CLang compilers, so don't use a
GCCism here.
This commit is contained in:
Chun-wei Fan 2018-05-15 13:28:08 +08:00
parent 04b4c077f6
commit 9332237bd4

View File

@ -620,7 +620,7 @@ long_pressed_cb (GtkGesture *gesture,
static void static void
gtk_emoji_completion_init (GtkEmojiCompletion *completion) gtk_emoji_completion_init (GtkEmojiCompletion *completion)
{ {
g_autoptr(GBytes) bytes = NULL; GBytes *bytes = NULL;
GtkGesture *long_press; GtkGesture *long_press;
gtk_widget_init_template (GTK_WIDGET (completion)); gtk_widget_init_template (GTK_WIDGET (completion));
@ -628,6 +628,8 @@ gtk_emoji_completion_init (GtkEmojiCompletion *completion)
bytes = g_resources_lookup_data ("/org/gtk/libgtk/emoji/emoji.data", 0, NULL); bytes = g_resources_lookup_data ("/org/gtk/libgtk/emoji/emoji.data", 0, NULL);
completion->data = g_variant_ref_sink (g_variant_new_from_bytes (G_VARIANT_TYPE ("a(auss)"), bytes, TRUE)); completion->data = g_variant_ref_sink (g_variant_new_from_bytes (G_VARIANT_TYPE ("a(auss)"), bytes, TRUE));
g_bytes_unref (bytes);
long_press = gtk_gesture_long_press_new (); long_press = gtk_gesture_long_press_new ();
g_signal_connect (long_press, "pressed", G_CALLBACK (long_pressed_cb), completion); g_signal_connect (long_press, "pressed", G_CALLBACK (long_pressed_cb), completion);
gtk_widget_add_controller (completion->list, GTK_EVENT_CONTROLLER (long_press)); gtk_widget_add_controller (completion->list, GTK_EVENT_CONTROLLER (long_press));