gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / desktop / gexif / patches / 01-localization.patch
blob2ebf18f0c51296914314735593c4d11cb5bcc4c8
1 diff -ur gtkam-0.1.11.after-patch-2/gexif-0.5/Makefile.am gtkam-0.1.11/gexif-0.5/Makefile.am
2 --- gexif-0.5/Makefile.am 2004-06-17 12:11:03.000000000 -0700
3 +++ gexif-0.5/Makefile.am 2004-06-17 12:11:30.000000000 -0700
4 @@ -1,5 +1,10 @@
5 +NULL =
6 SUBDIRS = intl m4 libjpeg gexif po
8 ACLOCAL_AMFLAGS = -I m4
10 -EXTRA_DIST = config.rpath mkinstalldirs
11 +EXTRA_DIST = config.rpath mkinstalldirs \
12 + intltool-extract.in \
13 + intltool-merge.in \
14 + intltool-update.in \
15 + $(NULL)
16 diff -ur gtkam-0.1.11.after-patch-2/gexif-0.5/configure.in gtkam-0.1.11/gexif-0.5/configure.in
17 --- gexif-0.5/configure.in 2004-06-17 12:11:03.000000000 -0700
18 +++ gexif-0.5/configure.in 2004-06-17 12:11:34.000000000 -0700
19 @@ -9,8 +9,15 @@
20 dnl ---------------------------------------------------------------------------
21 dnl i18n support
22 dnl ---------------------------------------------------------------------------
23 +GETTEXT_PACKAGE=gexif
24 +AC_SUBST(GETTEXT_PACKAGE)
25 +AC_PROG_INTLTOOL
26 ALL_LINGUAS="de es fr"
27 -AM_GNU_GETTEXT
28 +AM_GLIB_GNU_GETTEXT
29 +USE_INCLUDED_LIBINTL=no
30 +AC_SUBST(USE_INCLUDED_LIBINTL)
31 +BUILD_INCLUDED_LIBINTL=no
32 +AC_SUBST(BUILD_INCLUDED_LIBINTL)
34 dnl ---------------------------------------------------------------------------
35 dnl libexif
36 @@ -26,7 +33,13 @@
37 AC_SUBST(GEXIF_LIBS)
38 AC_SUBST(GEXIF_CFLAGS)
40 -CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
41 +dnl Only use -Wall if we have gcc
42 +if test "x$GCC" = "xyes"; then
43 + if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
44 + CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
45 + fi
46 +fi
48 AC_SUBST(CFLAGS)
50 AC_OUTPUT([ intl/Makefile po/Makefile.in m4/Makefile
51 diff -ur gtkam-0.1.11.after-patch-2/gexif-0.5/gexif/gexif-main.c gtkam-0.1.11/gexif-0.5/gexif/gexif-main.c
52 --- gexif-0.5/gexif/gexif-main.c 2004-06-17 12:11:03.000000000 -0700
53 +++ gexif-0.5/gexif/gexif-main.c 2004-06-17 12:11:30.000000000 -0700
54 @@ -34,7 +34,10 @@
55 #include <gtk/gtksignal.h>
56 #include <gtk/gtkfilesel.h>
57 #include <gtk/gtkbutton.h>
58 +#undef GTK_DISABLE_DEPRECATED
59 +#include <gtk/gtkfilesel.h>
60 #include <gtk/gtkitemfactory.h>
61 +#define GTK_DISABLE_DEPRECATED
62 #include <gtk/gtkstock.h>
64 #include <libjpeg/jpeg-data.h>
65 @@ -281,7 +281,7 @@
66 action_about (gpointer callback_data, guint callback_action,
67 GtkWidget *widget)
69 - g_warning ("Implement!");
70 + g_warning (_("Implement!"));
73 static void
74 @@ -303,19 +303,25 @@
76 static GtkItemFactoryEntry mi[] =
78 - {"/_File", NULL, 0, 0, "<Branch>"},
79 - {"/File/_Open...", NULL, action_open, 0, "<StockItem>", GTK_STOCK_OPEN},
80 - {"/File/_Save", NULL, action_save, 0, "<StockItem>", GTK_STOCK_SAVE},
81 - {"/File/Save _As...", NULL, action_save_as, 0, "<StockItem>",
82 + {N_("/_File"), NULL, 0, 0, "<Branch>"},
83 + {N_("/File/_Open..."), NULL, action_open, 0, "<StockItem>", GTK_STOCK_OPEN},
84 + {N_("/File/_Save"), NULL, action_save, 0, "<StockItem>", GTK_STOCK_SAVE},
85 + {N_("/File/Save _As..."), NULL, action_save_as, 0, "<StockItem>",
86 GTK_STOCK_SAVE_AS},
87 - {"/File/sep1", NULL, 0, 0, "<Separator>"},
88 - {"/File/E_xit", NULL, action_exit, 0, "<StockItem>", GTK_STOCK_QUIT},
89 - {"/_View", NULL, 0, 0, "<Branch>"},
90 - {"/View/_Thumbnail", NULL, action_thumbnail, 0, NULL, NULL},
91 - {"/_Help", NULL, 0, 0, "<Branch>"},
92 - {"/Help/About", NULL, action_about, 0, NULL, NULL}
93 + {N_("/File/sep1"), NULL, 0, 0, "<Separator>"},
94 + {N_("/File/E_xit"), NULL, action_exit, 0, "<StockItem>", GTK_STOCK_QUIT},
95 + {N_("/_View"), NULL, 0, 0, "<Branch>"},
96 + {N_("/View/_Thumbnail"), NULL, action_thumbnail, 0, NULL, NULL},
97 + {N_("/_Help"), NULL, 0, 0, "<Branch>"},
98 + {N_("/Help/About"), NULL, action_about, 0, NULL, NULL}
101 +static gchar *
102 +translate_func (const gchar *path, gpointer data)
104 + return g_strdup (_(path));
107 GtkWidget *
108 gexif_main_new (void)
110 @@ -337,6 +343,10 @@
111 ag = gtk_accel_group_new ();
112 gtk_window_add_accel_group (GTK_WINDOW (m), ag);
113 gif = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", ag);
114 +#ifdef ENABLE_NLS
115 + gtk_item_factory_set_translate_func (GTK_ITEM_FACTORY (gif),
116 + translate_func, NULL, NULL);
117 +#endif
118 g_object_set_data_full (G_OBJECT (m), "<main>", gif,
119 (GDestroyNotify) g_object_unref);
120 gtk_item_factory_create_items (gif, G_N_ELEMENTS (mi), mi, m);
121 diff -ur gtkam-0.1.11.after-patch-2/gexif-0.5/gexif/gexif-thumbnail.c gtkam-0.1.11/gexif-0.5/gexif/gexif-thumbnail.c
122 --- gexif-0.5/gexif/gexif-thumbnail.c.orig 2006-12-20 17:09:42.125517000 +0000
123 +++ gexif-0.5/gexif/gexif-thumbnail.c 2006-12-20 17:12:40.173757000 +0000
124 @@ -54,6 +54,7 @@
126 struct _GExifThumbnailPrivate
128 + char x; /* Dummy member for building on Solaris. */
131 #define PARENT_TYPE GTK_TYPE_DIALOG
132 diff -ur gtkam-0.1.11.after-patch-2/gexif-0.5/gexif/gexif.c gtkam-0.1.11/gexif-0.5/gexif/gexif.c
133 --- gexif-0.5/gexif/gexif.c 2004-06-17 12:11:03.000000000 -0700
134 +++ gexif-0.5/gexif/gexif.c 2004-06-17 12:11:30.000000000 -0700
135 @@ -50,6 +50,7 @@
137 gtk_set_locale ();
138 bindtextdomain (PACKAGE, GEXIF_LOCALEDIR);
139 + bind_textdomain_codeset (PACKAGE, "UTF-8");
140 textdomain (PACKAGE);
142 gtk_init (&argc, &argv);
143 --- gexif-0.5/gexif/gexif-main.h-orig 2008-06-10 19:12:02.837245000 -0500
144 +++ gexif-0.5/gexif/gexif-main.h 2008-06-10 19:12:21.670740000 -0500
145 @@ -21,7 +21,9 @@
146 #ifndef __GEXIF_MAIN_H__
147 #define __GEXIF_MAIN_H__
149 +#undef GTK_DISABLE_DEPRECATED
150 #include <gtk/gtkwindow.h>
151 +#define GTK_DISABLE_DEPRECATED
153 #define GEXIF_TYPE_MAIN (gexif_main_get_type())
154 #define GEXIF_MAIN(o) (G_TYPE_CHECK_INSTANCE_CAST((o),GEXIF_TYPE_MAIN,GExifMain))