upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / gwget / repos / community-x86_64 / drop-libgnomeui.patch
blob55a274dca16d0afa57e6b74b5079269831023b5c
1 diff -Naur gwget-1.0.4.orig/configure.ac gwget-1.0.4/configure.ac
2 --- gwget-1.0.4.orig/configure.ac 2013-07-04 02:34:53.853338000 +0200
3 +++ gwget-1.0.4/configure.ac 2013-07-04 02:35:57.021516447 +0200
4 @@ -14,15 +14,13 @@
6 AM_GCONF_SOURCE_2
8 -LIBGNOMEUI_REQUIRED=2.0.0
9 -LIBGNOME_REQUIRED=2.0.0
10 GTK_REQUIRED=2.6.0
11 GCONF_REQUIRED=1.1.11
12 DBUS_GLIB_REQUIRED=0.33
13 GIO_REQUIRED=2.16.0
15 -PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
16 - gtk+-2.0 >= $GTK_REQUIRED
17 +PKG_CHECK_MODULES(GNOME, gtk+-2.0 >= $GTK_REQUIRED
18 + gconf-2.0
19 gmodule-2.0
20 gio-unix-2.0 >= $GIO_REQUIRED)
22 diff -Naur gwget-1.0.4.orig/src/custom-cell-renderer-progressbar.c gwget-1.0.4/src/custom-cell-renderer-progressbar.c
23 --- gwget-1.0.4.orig/src/custom-cell-renderer-progressbar.c 2009-06-16 19:58:06.000000000 +0200
24 +++ gwget-1.0.4/src/custom-cell-renderer-progressbar.c 2013-07-04 02:35:57.024849860 +0200
25 @@ -21,8 +21,8 @@
27 #include <config.h>
28 #include <stdlib.h>
29 -#include <gnome.h>
30 -/* #include <glib/gi18n.h> */
31 +#include <glib/gi18n.h>
32 +#include <gtk/gtk.h>
34 #include "custom-cell-renderer-progressbar.h"
36 diff -Naur gwget-1.0.4.orig/src/gwget-application.c gwget-1.0.4/src/gwget-application.c
37 --- gwget-1.0.4.orig/src/gwget-application.c 2009-06-20 10:12:37.000000000 +0200
38 +++ gwget-1.0.4/src/gwget-application.c 2013-07-04 02:35:57.024849860 +0200
39 @@ -21,8 +21,6 @@
40 #include "gwget-application.h"
43 -#include <libgnomeui/gnome-client.h>
45 #ifdef ENABLE_DBUS
46 #include "gwget-application-service.h"
47 #include <dbus/dbus-glib-bindings.h>
48 @@ -86,39 +84,6 @@
49 #endif /* ENABLE_DBUS */
52 -static gint
53 -save_session (GnomeClient *client, gint phase, GnomeSaveStyle save_style, gint shutdown,
54 - GnomeInteractStyle interact_style, gint fast, GwgetApplication *application)
56 - char **restart_argv;
57 - int argc = 0;
59 - restart_argv = g_new (char *, 1);
60 - restart_argv[0] = g_strdup ("gwget");
61 - gnome_client_set_restart_command (client, argc, restart_argv);
63 - return TRUE;
66 -static void
67 -removed_from_session (GnomeClient *client, GwgetApplication *application)
69 - gwget_application_shutdown (application);
72 -static void
73 -init_session (GwgetApplication *application)
75 - GnomeClient *client;
77 - client = gnome_master_client ();
79 - g_signal_connect (client, "save_yourself",
80 - G_CALLBACK (save_session), application);
81 - g_signal_connect (client, "die",
82 - G_CALLBACK (removed_from_session), application);
85 gboolean
86 gwget_application_open_window (GwgetApplication *application,
87 guint32 timestamp,
88 @@ -199,7 +164,6 @@
89 static void
90 gwget_application_init (GwgetApplication *gwget_application)
92 - init_session (gwget_application);
96 diff -Naur gwget-1.0.4.orig/src/main.c gwget-1.0.4/src/main.c
97 --- gwget-1.0.4.orig/src/main.c 2009-06-20 10:12:37.000000000 +0200
98 +++ gwget-1.0.4/src/main.c 2013-07-04 02:35:57.024849860 +0200
99 @@ -17,11 +17,13 @@
101 #include <config.h>
103 -#include <gnome.h>
104 +#include <stdlib.h>
105 +#include <errno.h>
106 +#include <glib/gi18n.h>
107 +#include <gtk/gtk.h>
108 #include <string.h>
109 #include <gconf/gconf-client.h>
110 #include <locale.h>
111 -#include <libgnomeui/libgnomeui.h>
112 #include <gio/gio.h>
114 #include "main_window_cb.h"
115 @@ -201,7 +203,6 @@
117 int main(int argc,char *argv[])
119 - GnomeProgram *program;
120 GOptionContext *context;
122 context = g_option_context_new (_("Gwget Download Manager"));
123 @@ -220,12 +221,7 @@
126 gwget_init_pref(&gwget_pref);
127 - program = gnome_program_init(PACKAGE, VERSION,
128 - LIBGNOMEUI_MODULE, argc, argv,
129 - GNOME_PARAM_GOPTION_CONTEXT, context,
130 - GNOME_PARAM_HUMAN_READABLE_NAME, _("Gwget"),
131 - GNOME_PARAM_APP_DATADIR, GNOME_GWGET_LOCALEDIR,
132 - NULL);
133 + gtk_init (&argc, &argv);
135 #ifdef ENABLE_DBUS
136 if (!gwget_application_register_service (GWGET_APP)) {
137 @@ -243,9 +239,5 @@
139 gtk_main();
141 - gnome_accelerators_sync ();
143 - g_object_unref (program);
145 return (0);
147 diff -Naur gwget-1.0.4.orig/src/main_window.c gwget-1.0.4/src/main_window.c
148 --- gwget-1.0.4.orig/src/main_window.c 2009-08-14 19:19:51.000000000 +0200
149 +++ gwget-1.0.4/src/main_window.c 2013-07-04 02:35:57.024849860 +0200
150 @@ -15,7 +15,9 @@
153 #include <config.h>
154 -#include <gnome.h>
155 +#include <stdlib.h>
156 +#include <glib/gi18n.h>
157 +#include <gtk/gtk.h>
158 #include <gconf/gconf-client.h>
159 #include <glib/gstdio.h>
160 #include <string.h>
161 @@ -118,20 +120,22 @@
162 toolbar = GTK_WIDGET (gtk_builder_get_object(builder,"toolbar1"));
163 toolbar_setting = gconf_client_get_string(gconf_client,"/desktop/gnome/interface/toolbar_style",NULL);
165 - if (!strcmp(toolbar_setting,"icons")) {
166 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_ICONS);
169 - if (!strcmp(toolbar_setting,"both")) {
170 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH);
173 - if (!strcmp(toolbar_setting,"both-horiz")) {
174 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH_HORIZ);
177 - if (!strcmp(toolbar_setting,"text")) {
178 - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_TEXT);
179 + if (toolbar_setting!=NULL) {
180 + if (!strcmp(toolbar_setting,"icons")) {
181 + gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_ICONS);
184 + if (!strcmp(toolbar_setting,"both")) {
185 + gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH);
188 + if (!strcmp(toolbar_setting,"both-horiz")) {
189 + gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_BOTH_HORIZ);
192 + if (!strcmp(toolbar_setting,"text")) {
193 + gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_TEXT);
197 /* Listen to changes to the key. */
198 diff -Naur gwget-1.0.4.orig/src/main_window_cb.c gwget-1.0.4/src/main_window_cb.c
199 --- gwget-1.0.4.orig/src/main_window_cb.c 2009-08-14 19:19:51.000000000 +0200
200 +++ gwget-1.0.4/src/main_window_cb.c 2013-07-04 02:45:43.468873631 +0200
201 @@ -15,7 +15,9 @@
204 #include <config.h>
205 -#include <gnome.h>
206 +#include <stdlib.h>
207 +#include <glib/gi18n.h>
208 +#include <gtk/gtk.h>
209 #include <gconf/gconf-client.h>
210 #include <signal.h>
212 @@ -217,6 +219,9 @@
213 gchar *size;
214 int width = 16, height = 16;
215 gdouble perc;
216 + GIcon *icon;
217 + const gchar *const *icon_names;
218 + gint i;
220 gtk_list_store_append (GTK_LIST_STORE(model), &iter);
221 size = g_strdup_printf ("%d kB", (guint32)(gwgetdata->cur_size + 512) / 1024);
222 @@ -243,8 +248,17 @@
223 theme = gtk_icon_theme_get_default ();
224 if (!gwgetdata->recursive) {
225 content_type = g_content_type_guess (gwgetdata->local_filename, NULL, 0, NULL);
226 - gwgetdata->icon_name = gnome_icon_lookup (theme, NULL, NULL, NULL, NULL,
227 - content_type, GNOME_ICON_LOOKUP_FLAGS_NONE, NULL);
228 + icon = g_content_type_get_icon (content_type);
229 + icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon));
230 + for (i=0; i < g_strv_length ((gchar **)icon_names); i++) {
231 + if (gtk_icon_theme_has_icon (theme, icon_names[i])) {
232 + gwgetdata->icon_name = g_strdup (icon_names[i]);
233 + break;
236 + if (gwgetdata->icon_name == NULL) {
237 + gwgetdata->icon_name = g_strdup("text-x-generic");
239 } else {
240 gwgetdata->icon_name = g_strdup("gtk-refresh");
242 diff -Naur gwget-1.0.4.orig/src/new_window.c gwget-1.0.4/src/new_window.c
243 --- gwget-1.0.4.orig/src/new_window.c 2009-08-14 19:19:51.000000000 +0200
244 +++ gwget-1.0.4/src/new_window.c 2013-07-04 02:35:57.028183273 +0200
245 @@ -24,7 +24,8 @@
249 -#include <gnome.h>
250 +#include <glib/gi18n.h>
251 +#include <gtk/gtk.h>
252 #include <config.h>
253 #include "new_window.h"
254 #include "main_window.h"
255 diff -Naur gwget-1.0.4.orig/src/systray.c gwget-1.0.4/src/systray.c
256 --- gwget-1.0.4.orig/src/systray.c 2013-07-04 02:34:53.920006000 +0200
257 +++ gwget-1.0.4/src/systray.c 2013-07-04 02:35:57.028183273 +0200
258 @@ -1,6 +1,7 @@
260 #include <config.h>
261 -#include <gnome.h>
262 +#include <glib/gi18n.h>
263 +#include <gtk/gtk.h>
264 #include "main_window.h"
265 #include "gwget_data.h"
266 #include "systray.h"
267 diff -Naur gwget-1.0.4.orig/src/utils.c gwget-1.0.4/src/utils.c
268 --- gwget-1.0.4.orig/src/utils.c 2009-08-14 19:19:51.000000000 +0200
269 +++ gwget-1.0.4/src/utils.c 2013-07-04 02:35:57.028183273 +0200
270 @@ -14,7 +14,8 @@
271 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
274 -#include <gnome.h>
275 +#include <string.h>
276 +#include <gtk/gtk.h>
277 #include "main_window.h"
278 #include "utils.h"
279 #include "gwget_data.h"
280 diff -Naur gwget-1.0.4.orig/src/wget-log.c gwget-1.0.4/src/wget-log.c
281 --- gwget-1.0.4.orig/src/wget-log.c 2009-10-04 20:29:35.000000000 +0200
282 +++ gwget-1.0.4/src/wget-log.c 2013-07-04 02:35:57.028183273 +0200
283 @@ -25,7 +25,9 @@
284 #define _FILE_OFFSET_BITS 64
286 #include <config.h>
287 -#include <gnome.h>
288 +#include <stdlib.h>
289 +#include <glib/gi18n.h>
290 +#include <gtk/gtk.h>
291 #include <string.h>
292 #include <sys/stat.h>
293 #include <unistd.h>