Package: gmanedit
Version: 0.4.2-4
Severity: important
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

gmanedit failed to build on Ubuntu amd64 because it builds with
-DGTK_DISABLE_DEPRECATED but uses symbols that have since been
deprecated in GTK+:

  
https://launchpadlibrarian.net/70216621/buildlog_ubuntu-natty-amd64.gmanedit_0.4.2-4_FAILEDTOBUILD.txt.gz

This fails specifically on amd64 because unprototyped functions
implicitly return int, and ints and pointers have different sizes on
amd64, so we force those particular compiler warnings to cause build
failures since they may well lead to crashes at runtime.

The following patch fixes this.  It should be suitable for forwarding
upstream with a little rearrangement; the "Internet browser" preference
has been removed, but it looks as though the rest of it should still
pretty much apply.

  * Update for deprecated symbols in current GTK+ (LP: #771093).

diff -Nru gmanedit-0.4.2/debian/patches/gtk_deprecated 
gmanedit-0.4.2/debian/patches/gtk_deprecated
--- gmanedit-0.4.2/debian/patches/gtk_deprecated        1970-01-01 
01:00:00.000000000 +0100
+++ gmanedit-0.4.2/debian/patches/gtk_deprecated        2011-09-13 
11:08:24.000000000 +0100
@@ -0,0 +1,100 @@
+Description: Update for deprecated symbols in current GTK+
+ gtk_set_locale is already called by gtk_init and so unnecessary.  The other
+ symbols have straightforward replacements.
+Author: Colin Watson <cjwat...@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/771093
+Forwarded: no
+Last-Update: 2009-09-13
+
+Index: b/src/callbacks.c
+===================================================================
+--- a/src/callbacks.c
++++ b/src/callbacks.c
+@@ -830,7 +830,11 @@
+       entry=lookup_widget(prefs,"entry_command");
+       entry_text=gtk_entry_get_text(GTK_ENTRY(entry));
+       ch = lookup_widget(prefs, "combo2");
++#if !GTK_CHECK_VERSION(2,24,0)
+       browser = gtk_combo_box_get_active_text (GTK_COMBO_BOX (ch));
++#else
++      browser = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (ch));
++#endif
+       snprintf(buf, sizeof buf, "# File created by gmanedit preferences 
option\n\nCOMMAND=%s\nINTERNET_BROWSER=%s", entry_text, browser);
+       g_free(browser);
+       
+Index: b/src/interface.c
+===================================================================
+--- a/src/interface.c
++++ b/src/interface.c
+@@ -507,14 +507,26 @@
+   label17 = gtk_label_new (_("Internet browser"));
+   gtk_widget_show (label17);
+   gtk_box_pack_start (GTK_BOX (hbox4), label17, FALSE, FALSE, 0);
++#if !GTK_CHECK_VERSION(2,24,0)
+   combo2 = gtk_combo_box_entry_new_text ();
++#else
++  combo2 = gtk_combo_box_text_new_with_entry ();
++#endif
+   gtk_widget_show (combo2);
+   gtk_box_pack_start (GTK_BOX (hbox4), combo2, TRUE, TRUE, 0);
++#if !GTK_CHECK_VERSION(2,24,0)
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo2), "mozilla");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo2), "firefox");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo2), "galeon");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo2), "epiphany");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo2), "konqueror");
++#else
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo2), "mozilla");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo2), "firefox");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo2), "galeon");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo2), "epiphany");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo2), "konqueror");
++#endif
+   HOOKUP_OBJECT (wpreferences, combo2, "combo2");
+ 
+ //  gtk_tooltips_set_tip (tooltips, cbinet, _("Select your internet browser 
from this list"), NULL);
+@@ -721,10 +733,15 @@
+   gtk_widget_show (label2);
+   gtk_fixed_put (GTK_FIXED (fixed2), label2, 56, 168);
+ 
++#if !GTK_CHECK_VERSION(2,24,0)
+   combo1 = gtk_combo_box_new_text ();
++#else
++  combo1 = gtk_combo_box_text_new ();
++#endif
+   gtk_widget_show (combo1);
+   gtk_fixed_put (GTK_FIXED (fixed2), combo1, 240, 168);
+   gtk_widget_set_size_request (combo1, 175, 26);
++#if !GTK_CHECK_VERSION(2,24,0)
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo1), "1");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo1), "2");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo1), "3");
+@@ -733,6 +750,16 @@
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo1), "6");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo1), "7");
+   gtk_combo_box_append_text (GTK_COMBO_BOX(combo1), "8");
++#else
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "1");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "2");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "3");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "4");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "5");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "6");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "7");
++  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo1), "8");
++#endif
+   gtk_combo_box_set_active (GTK_COMBO_BOX(combo1), 0);
+   HOOKUP_OBJECT (wizard, combo1, "combo1");
+ 
+Index: b/src/main.c
+===================================================================
+--- a/src/main.c
++++ b/src/main.c
+@@ -53,7 +53,6 @@
+ 
+   add_pixmap_directory (DATADIR G_DIR_SEPARATOR_S "pixmaps");
+ 
+-  gtk_set_locale ();
+   gtk_init (&argc, &argv);
+ 
+   /*
diff -Nru gmanedit-0.4.2/debian/patches/series 
gmanedit-0.4.2/debian/patches/series
--- gmanedit-0.4.2/debian/patches/series        2011-02-23 07:55:32.000000000 
+0000
+++ gmanedit-0.4.2/debian/patches/series        2011-09-13 10:15:02.000000000 
+0100
@@ -4,3 +4,4 @@
 spanish_translation
 desktop_utf8
 file_save_dialog
+gtk_deprecated

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to