Backported upstream patches to fix build with latest gtk3

This commit is contained in:
Kalev Lember 2010-11-15 14:50:06 +02:00
parent 979ee25a66
commit 804cb7d328
3 changed files with 207 additions and 0 deletions

View File

@ -0,0 +1,66 @@
From ae2897ec20de184ff793e0bdc78f72c57a89f030 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@0d.be>
Date: Sat, 17 Jul 2010 10:42:25 +0200
Subject: [PATCH] GtkNotebookPage has been removed in GTK+ (aa017fa)
---
src/dh-util.c | 2 +-
src/dh-window.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/dh-util.c b/src/dh-util.c
index 77a0b32..85a25d6 100644
--- a/src/dh-util.c
+++ b/src/dh-util.c
@@ -517,7 +517,7 @@ util_state_notebook_timeout_cb (gpointer notebook)
static void
util_state_notebook_switch_page_cb (GtkWidget *notebook,
- GtkNotebookPage *page,
+ gpointer page,
guint page_num,
gpointer user_data)
{
diff --git a/src/dh-window.c b/src/dh-window.c
index 760e9b1..2fcec5f 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -983,7 +983,7 @@ dh_window_init (DhWindow *window)
*/
static void
window_control_switch_page_cb (GtkWidget *notebook,
- GtkNotebookPage *page,
+ gpointer page,
guint page_num,
DhWindow *window)
{
@@ -998,7 +998,7 @@ window_control_switch_page_cb (GtkWidget *notebook,
static void
window_control_after_switch_page_cb (GtkWidget *notebook,
- GtkNotebookPage *page,
+ gpointer page,
guint page_num,
DhWindow *window)
{
@@ -1013,7 +1013,7 @@ window_control_after_switch_page_cb (GtkWidget *notebook,
static void
window_web_view_switch_page_cb (GtkNotebook *notebook,
- GtkNotebookPage *page,
+ gpointer page,
guint new_page_num,
DhWindow *window)
{
@@ -1051,7 +1051,7 @@ window_web_view_switch_page_cb (GtkNotebook *notebook,
static void
window_web_view_switch_page_after_cb (GtkNotebook *notebook,
- GtkNotebookPage *page,
+ gpointer page,
guint new_page_num,
DhWindow *window)
{
--
1.7.3.2

View File

@ -0,0 +1,136 @@
From 95a0a433c6ad95b42124e0874bb613ff6bb765ca Mon Sep 17 00:00:00 2001
From: Olav Vitters <olav@vitters.nl>
Date: Fri, 22 Oct 2010 11:53:12 +0200
Subject: [PATCH 1/3] Replace deprecated GDK_Escape with GDK_KEY_Escape
---
src/dh-assistant.c | 2 +-
src/eggfindbar.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dh-assistant.c b/src/dh-assistant.c
index bd19d88..05f8103 100644
--- a/src/dh-assistant.c
+++ b/src/dh-assistant.c
@@ -46,7 +46,7 @@ assistant_key_press_event_cb (GtkWidget *widget,
GdkEventKey *event,
DhAssistant *assistant)
{
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
gtk_widget_destroy (GTK_WIDGET (assistant));
return TRUE;
}
diff --git a/src/eggfindbar.c b/src/eggfindbar.c
index f6e1dba..e6daf14 100644
--- a/src/eggfindbar.c
+++ b/src/eggfindbar.c
@@ -181,7 +181,7 @@ egg_find_bar_class_init (EggFindBarClass *klass)
binding_set = gtk_binding_set_by_class (klass);
- gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
"close", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
--
1.7.3.2
From 0ee886323821f82afc10beded85bbccb51f61b97 Mon Sep 17 00:00:00 2001
From: Olav Vitters <olav@vitters.nl>
Date: Fri, 22 Oct 2010 11:58:22 +0200
Subject: [PATCH 2/3] Replace deprecated GDK_* with GDK_KEY_*
---
src/dh-search.c | 6 +++---
src/dh-window.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/dh-search.c b/src/dh-search.c
index 4afd8c4..46b2e9f 100644
--- a/src/dh-search.c
+++ b/src/dh-search.c
@@ -221,7 +221,7 @@ search_entry_key_press_event_cb (GtkEntry *entry,
{
DhSearchPriv *priv = GET_PRIVATE (search);
- if (event->keyval == GDK_Tab) {
+ if (event->keyval == GDK_KEY_Tab) {
if (event->state & GDK_CONTROL_MASK) {
gtk_widget_grab_focus (priv->hitlist);
} else {
@@ -231,8 +231,8 @@ search_entry_key_press_event_cb (GtkEntry *entry,
return TRUE;
}
- if (event->keyval == GDK_Return ||
- event->keyval == GDK_KP_Enter) {
+ if (event->keyval == GDK_KEY_Return ||
+ event->keyval == GDK_KEY_KP_Enter) {
GtkTreeIter iter;
DhLink *link;
gchar *name;
diff --git a/src/dh-window.c b/src/dh-window.c
index 2fcec5f..1eacdb9 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -83,8 +83,8 @@ enum {
static gint signals[LAST_SIGNAL] = { 0 };
static guint tab_accel_keys[] = {
- GDK_1, GDK_2, GDK_3, GDK_4, GDK_5,
- GDK_6, GDK_7, GDK_8, GDK_9, GDK_0
+ GDK_KEY_1, GDK_KEY_2, GDK_KEY_3, GDK_KEY_4, GDK_KEY_5,
+ GDK_KEY_6, GDK_KEY_7, GDK_KEY_8, GDK_KEY_9, GDK_KEY_0
};
static const
--
1.7.3.2
From 9cf3860591b22d66d3dbafc750fe8b01da58013b Mon Sep 17 00:00:00 2001
From: Olav Vitters <olav@vitters.nl>
Date: Fri, 22 Oct 2010 12:00:09 +0200
Subject: [PATCH 3/3] Replace deprecated GDK_* with GDK_KEY_*
---
src/eggfindbar.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/eggfindbar.c b/src/eggfindbar.c
index e6daf14..c6d6184 100644
--- a/src/eggfindbar.c
+++ b/src/eggfindbar.c
@@ -184,22 +184,22 @@ egg_find_bar_class_init (EggFindBarClass *klass)
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
"close", 0);
- gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, 0,
"scroll", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_BACKWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, 0,
"scroll", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_FORWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Up, 0,
"scroll", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Up, 0,
"scroll", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_BACKWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Page_Down, 0,
"scroll", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
- gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, 0,
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Page_Down, 0,
"scroll", 1,
GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_PAGE_FORWARD);
}
--
1.7.3.2

View File

@ -23,6 +23,8 @@ Patch2: 0002-Use-double-quotes-for-including-dh-headers.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=624198
Patch3: 0001-Fix-broken-schemas-file.patch
Patch4: 0002-Fix-use-of-disabled_books.patch
Patch5: devhelp-2.90.5-gdk-key.patch
Patch6: 0001-GtkNotebookPage-has-been-removed-in-GTK-aa017fa.patch
### Dependencies ###
@ -64,6 +66,8 @@ into other applications such as IDEs.
%patch2 -p1 -b .double-quotes
%patch3 -p1 -b .schema
%patch4 -p1 -b .disabled-books
%patch5 -p1 -b .gdk_key
%patch6 -p1 -b .GtkNotebookPage
# force regeneration
rm data/devhelp.schemas
@ -153,6 +157,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%changelog
* Mon Nov 15 2010 Kalev Lember <kalev@smartlink.ee> - 2.90.5-6
- Carry epoch over from F14 branch to preserve upgrade path
- Backported upstream patches to fix build with latest gtk3
* Thu Sep 09 2010 Bastien Nocera <bnocera@redhat.com> 2.90.5-5
- Fix broken schemas file, and "disabled_books" usage (#624198)