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
8 -LIBGNOMEUI_REQUIRED=2.0.0
9 -LIBGNOME_REQUIRED=2.0.0
12 DBUS_GLIB_REQUIRED=0.33
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
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
30 -/* #include <glib/gi18n.h> */
31 +#include <glib/gi18n.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
40 #include "gwget-application.h"
43 -#include <libgnomeui/gnome-client.h>
46 #include "gwget-application-service.h"
47 #include <dbus/dbus-glib-bindings.h>
49 #endif /* ENABLE_DBUS */
53 -save_session (GnomeClient *client, gint phase, GnomeSaveStyle save_style, gint shutdown,
54 - GnomeInteractStyle interact_style, gint fast, GwgetApplication *application)
56 - char **restart_argv;
59 - restart_argv = g_new (char *, 1);
60 - restart_argv[0] = g_strdup ("gwget");
61 - gnome_client_set_restart_command (client, argc, restart_argv);
67 -removed_from_session (GnomeClient *client, GwgetApplication *application)
69 - gwget_application_shutdown (application);
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);
86 gwget_application_open_window (GwgetApplication *application,
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
106 +#include <glib/gi18n.h>
107 +#include <gtk/gtk.h>
109 #include <gconf/gconf-client.h>
111 -#include <libgnomeui/libgnomeui.h>
114 #include "main_window_cb.h"
117 int main(int argc,char *argv[])
119 - GnomeProgram *program;
120 GOptionContext *context;
122 context = g_option_context_new (_("Gwget Download Manager"));
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,
133 + gtk_init (&argc, &argv);
136 if (!gwget_application_register_service (GWGET_APP)) {
141 - gnome_accelerators_sync ();
143 - g_object_unref (program);
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
156 +#include <glib/gi18n.h>
157 +#include <gtk/gtk.h>
158 #include <gconf/gconf-client.h>
159 #include <glib/gstdio.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
207 +#include <glib/gi18n.h>
208 +#include <gtk/gtk.h>
209 #include <gconf/gconf-client.h>
214 int width = 16, height = 16;
217 + const gchar *const *icon_names;
220 gtk_list_store_append (GTK_LIST_STORE(model), &iter);
221 size = g_strdup_printf ("%d kB", (guint32)(gwgetdata->cur_size + 512) / 1024);
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]);
236 + if (gwgetdata->icon_name == NULL) {
237 + gwgetdata->icon_name = g_strdup("text-x-generic");
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
250 +#include <glib/gi18n.h>
251 +#include <gtk/gtk.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
262 +#include <glib/gi18n.h>
263 +#include <gtk/gtk.h>
264 #include "main_window.h"
265 #include "gwget_data.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
271 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
276 +#include <gtk/gtk.h>
277 #include "main_window.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
284 #define _FILE_OFFSET_BITS 64
289 +#include <glib/gi18n.h>
290 +#include <gtk/gtk.h>
292 #include <sys/stat.h>