Unbreak with newer GLib.
This commit is contained in:
parent
c60d9f715d
commit
bf54764fcd
@ -1,9 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.22 2016/04/25 17:09:45 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.23 2017/04/11 08:35:53 ajacoutot Exp $
|
||||
|
||||
COMMENT= GNOME dictionary application
|
||||
|
||||
GNOME_PROJECT= gnome-dictionary
|
||||
GNOME_VERSION= 3.20.0
|
||||
REVISION= 0
|
||||
|
||||
SHARED_LIBS += gdict-1.0 9.1 # 10.0
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-libgdict_gdict-client-context_h,v 1.1 2017/04/11 08:35:53 ajacoutot Exp $
|
||||
|
||||
From d529e2dd056f05cb1115c2f68bb6f773b4b14948 Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuele Bassi <ebassi@gnome.org>
|
||||
Date: Sun, 5 Mar 2017 14:38:07 +0000
|
||||
Subject: Include the right header in GdictClientContext
|
||||
|
||||
--- libgdict/gdict-client-context.h.orig Wed Sep 16 20:50:01 2015
|
||||
+++ libgdict/gdict-client-context.h Tue Apr 11 09:13:38 2017
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef __GDICT_CLIENT_CONTEXT_H__
|
||||
#define __GDICT_CLIENT_CONTEXT_H__
|
||||
|
||||
-#include <glib-object.h>
|
||||
+#include "gdict-context.h"
|
||||
|
||||
#define GDICT_TYPE_CLIENT_CONTEXT (gdict_client_context_get_type ())
|
||||
#define GDICT_CLIENT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDICT_TYPE_CLIENT_CONTEXT, GdictClientContext))
|
28
x11/gnome/dictionary/patches/patch-src_gdict-app_c
Normal file
28
x11/gnome/dictionary/patches/patch-src_gdict-app_c
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-src_gdict-app_c,v 1.1 2017/04/11 08:35:53 ajacoutot Exp $
|
||||
|
||||
From 1163ed404c64ac2cecf082f2034442a352d69e0f Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuele Bassi <ebassi@gnome.org>
|
||||
Date: Mon, 6 Mar 2017 17:54:11 +0000
|
||||
Subject: Use gtk_show_uri_on_window() with newer GTK+
|
||||
|
||||
--- src/gdict-app.c.orig Tue Mar 22 09:15:31 2016
|
||||
+++ src/gdict-app.c Tue Apr 11 09:15:41 2017
|
||||
@@ -121,9 +121,18 @@ gdict_app_cmd_help (GSimpleAction *action,
|
||||
g_return_if_fail (GTK_IS_APPLICATION (app));
|
||||
|
||||
window = GDICT_WINDOW (gtk_application_get_windows (app)->data);
|
||||
+
|
||||
+#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
+ gtk_show_uri_on_window (GTK_WINDOW (window),
|
||||
+ "help:gnome-dictionary",
|
||||
+ gtk_get_current_event_time (),
|
||||
+ &err);
|
||||
+#else
|
||||
gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)),
|
||||
"help:gnome-dictionary",
|
||||
gtk_get_current_event_time (), &err);
|
||||
+#endif
|
||||
+
|
||||
if (err)
|
||||
{
|
||||
gdict_show_gerror_dialog (GTK_WINDOW (window),
|
66
x11/gnome/dictionary/patches/patch-src_gdict-sidebar_c
Normal file
66
x11/gnome/dictionary/patches/patch-src_gdict-sidebar_c
Normal file
@ -0,0 +1,66 @@
|
||||
$OpenBSD: patch-src_gdict-sidebar_c,v 1.1 2017/04/11 08:35:53 ajacoutot Exp $
|
||||
|
||||
From a62a03715f831d195e2acbd66957716218a2bfd3 Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuele Bassi <ebassi@gnome.org>
|
||||
Date: Mon, 6 Mar 2017 18:03:55 +0000
|
||||
Subject: Use gtk_menu_popup_at_widget() with newer GTK+
|
||||
|
||||
--- src/gdict-sidebar.c.orig Tue Mar 22 09:15:31 2016
|
||||
+++ src/gdict-sidebar.c Tue Apr 11 09:16:16 2017
|
||||
@@ -136,6 +136,8 @@ gdict_sidebar_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (gdict_sidebar_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
+#if !GTK_CHECK_VERSION (3, 22, 0)
|
||||
+/* We only use this with older versions of GTK+ */
|
||||
static void
|
||||
gdict_sidebar_menu_position_function (GtkMenu *menu,
|
||||
gint *x,
|
||||
@@ -158,6 +160,7 @@ gdict_sidebar_menu_position_function (GtkMenu *menu,
|
||||
|
||||
*push_in = FALSE;
|
||||
}
|
||||
+#endif /* !GTK_CHECK_VERSION (3, 22, 0) */
|
||||
|
||||
static gboolean
|
||||
gdict_sidebar_select_button_press_cb (GtkWidget *widget,
|
||||
@@ -181,10 +184,19 @@ gdict_sidebar_select_button_press_cb (GtkWidget *
|
||||
gtk_widget_grab_focus (widget);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
|
||||
+
|
||||
+#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
+ gtk_menu_popup_at_widget (GTK_MENU (sidebar->priv->menu),
|
||||
+ widget,
|
||||
+ GDK_GRAVITY_SOUTH_WEST,
|
||||
+ GDK_GRAVITY_NORTH_WEST,
|
||||
+ (GdkEvent *) event);
|
||||
+#else
|
||||
gtk_menu_popup (GTK_MENU (sidebar->priv->menu),
|
||||
NULL, NULL,
|
||||
gdict_sidebar_menu_position_function, widget,
|
||||
event->button, event->time);
|
||||
+#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -205,10 +217,19 @@ gdict_sidebar_select_key_press_cb (GtkWidget *widget
|
||||
event->keyval == GDK_KEY_KP_Enter)
|
||||
{
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
|
||||
+
|
||||
+#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
+ gtk_menu_popup_at_widget (GTK_MENU (sidebar->priv->menu),
|
||||
+ widget,
|
||||
+ GDK_GRAVITY_SOUTH_WEST,
|
||||
+ GDK_GRAVITY_NORTH_WEST,
|
||||
+ (GdkEvent *) event);
|
||||
+#else
|
||||
gtk_menu_popup (GTK_MENU (sidebar->priv->menu),
|
||||
NULL, NULL,
|
||||
gdict_sidebar_menu_position_function, widget,
|
||||
1, event->time);
|
||||
+#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
26
x11/gnome/dictionary/patches/patch-src_gdict-source-dialog_c
Normal file
26
x11/gnome/dictionary/patches/patch-src_gdict-source-dialog_c
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-src_gdict-source-dialog_c,v 1.1 2017/04/11 08:35:53 ajacoutot Exp $
|
||||
|
||||
From 1163ed404c64ac2cecf082f2034442a352d69e0f Mon Sep 17 00:00:00 2001
|
||||
From: Emmanuele Bassi <ebassi@gnome.org>
|
||||
Date: Mon, 6 Mar 2017 17:54:11 +0000
|
||||
Subject: Use gtk_show_uri_on_window() with newer GTK+
|
||||
|
||||
--- src/gdict-source-dialog.c.orig Wed Sep 16 20:50:01 2015
|
||||
+++ src/gdict-source-dialog.c Tue Apr 11 09:15:41 2017
|
||||
@@ -443,9 +443,16 @@ on_dialog_response (GtkDialog *dialog,
|
||||
break;
|
||||
|
||||
case GTK_RESPONSE_HELP:
|
||||
+#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
+ gtk_show_uri_on_window (GTK_WINDOW (dialog),
|
||||
+ "help:gnome-dictionary/gnome-dictionary-add-source",
|
||||
+ gtk_get_current_event_time (), &err);
|
||||
+#else
|
||||
gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (dialog)),
|
||||
"help:gnome-dictionary/gnome-dictionary-add-source",
|
||||
gtk_get_current_event_time (), &err);
|
||||
+#endif
|
||||
+
|
||||
if (err)
|
||||
{
|
||||
gdict_show_gerror_dialog (GTK_WINDOW (dialog),
|
Loading…
x
Reference in New Issue
Block a user