commit 0766cfde7675a9a71c43f319814feec021c89f16
Author: György Balló <ballogy@freestart.hu>
Date:   Sat Mar 10 04:47:40 2012 +0100

    Remove libgnome/libgnomeui dependency

diff --git a/configure.ac b/configure.ac
index 8ebee12..82fa3b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,15 +14,13 @@ AM_PROG_LIBTOOL
 
 AM_GCONF_SOURCE_2
 
-LIBGNOMEUI_REQUIRED=2.0.0
-LIBGNOME_REQUIRED=2.0.0
 GTK_REQUIRED=2.6.0
 GCONF_REQUIRED=1.1.11
 DBUS_GLIB_REQUIRED=0.33
 GIO_REQUIRED=2.16.0
 
-PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
-		 	  gtk+-2.0 	>= $GTK_REQUIRED 
+PKG_CHECK_MODULES(GNOME, gtk+-2.0 	>= $GTK_REQUIRED 
+ 			  gconf-2.0
 			  gmodule-2.0
 			  gio-unix-2.0 >= $GIO_REQUIRED)
 			
diff --git a/src/custom-cell-renderer-progressbar.c b/src/custom-cell-renderer-progressbar.c
index 140035f..5a26d2e 100644
--- a/src/custom-cell-renderer-progressbar.c
+++ b/src/custom-cell-renderer-progressbar.c
@@ -21,7 +21,8 @@
 
 #include <config.h>
 #include <stdlib.h>
-#include <gnome.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 /* #include <glib/gi18n.h> */
 
 #include "custom-cell-renderer-progressbar.h"
diff --git a/src/gwget-application.c b/src/gwget-application.c
index 111e962..a710d47 100644
--- a/src/gwget-application.c
+++ b/src/gwget-application.c
@@ -21,8 +21,6 @@
 #include "gwget-application.h"
 
 
-#include <libgnomeui/gnome-client.h>
-
 #ifdef ENABLE_DBUS
 #include "gwget-application-service.h"
 #include <dbus/dbus-glib-bindings.h>
@@ -86,39 +84,6 @@ gwget_application_register_service (GwgetApplication *application)
 #endif /* ENABLE_DBUS */
 
 
-static gint
-save_session (GnomeClient *client, gint phase, GnomeSaveStyle save_style, gint shutdown,
-	      GnomeInteractStyle interact_style, gint fast, GwgetApplication *application)
-{
-	char **restart_argv;
-	int argc = 0;
-
-	restart_argv = g_new (char *, 1);
-	restart_argv[0] = g_strdup ("gwget");
-	gnome_client_set_restart_command (client, argc, restart_argv);
-
-	return TRUE;
-}
-
-static void
-removed_from_session (GnomeClient *client, GwgetApplication *application)
-{
-	gwget_application_shutdown (application);
-}
-
-static void
-init_session (GwgetApplication *application)
-{
-	GnomeClient *client;
-
-	client = gnome_master_client ();
-
-	g_signal_connect (client, "save_yourself",
-			  G_CALLBACK (save_session), application);	
-	g_signal_connect (client, "die",
-			  G_CALLBACK (removed_from_session), application);
-}
-
 gboolean
 gwget_application_open_window (GwgetApplication  *application,
                            guint32         timestamp,
@@ -199,7 +164,6 @@ gwget_application_class_init (GwgetApplicationClass *gwget_application_class)
 static void
 gwget_application_init (GwgetApplication *gwget_application)
 {
-	init_session (gwget_application);
 
 }
 
diff --git a/src/main.c b/src/main.c
index 7ed7764..32495fe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,11 +17,13 @@
 
 #include <config.h>
 
-#include <gnome.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #include <string.h>
 #include <gconf/gconf-client.h>
 #include <locale.h>
-#include <libgnomeui/libgnomeui.h>
 #include <gio/gio.h>
 
 #include "main_window_cb.h"
@@ -201,7 +203,6 @@ load_urls (const char **urls)
 
 int main(int argc,char *argv[])
 {
-	GnomeProgram *program;
 	GOptionContext *context;
 	
 	context = g_option_context_new (_("Gwget Download Manager"));
@@ -220,12 +221,7 @@ int main(int argc,char *argv[])
 	
 
 	gwget_init_pref(&gwget_pref);
-	program = gnome_program_init(PACKAGE, VERSION, 
-				LIBGNOMEUI_MODULE, argc, argv,
-			        GNOME_PARAM_GOPTION_CONTEXT, context, 
-				GNOME_PARAM_HUMAN_READABLE_NAME, _("Gwget"),
-				GNOME_PARAM_APP_DATADIR, GNOME_GWGET_LOCALEDIR,
-                              	NULL);
+	gtk_init (&argc, &argv);
 	
 #ifdef ENABLE_DBUS
 	if (!gwget_application_register_service (GWGET_APP)) {
@@ -243,9 +239,5 @@ int main(int argc,char *argv[])
 	
 	gtk_main();
 	
-	gnome_accelerators_sync ();
-	
-	g_object_unref (program);
-	
 	return (0);
 }
diff --git a/src/main_window.c b/src/main_window.c
index 84a36ba..e3f816b 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -15,7 +15,9 @@
  */
  
 #include <config.h>
-#include <gnome.h>
+#include <stdlib.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #include <gconf/gconf-client.h>
 #include <glib/gstdio.h>
 #include <string.h>
diff --git a/src/main_window_cb.c b/src/main_window_cb.c
index eeea988..fd28e86 100644
--- a/src/main_window_cb.c
+++ b/src/main_window_cb.c
@@ -15,7 +15,9 @@
  */
  
 #include <config.h>
-#include <gnome.h>
+#include <stdlib.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #include <gconf/gconf-client.h>
 #include <signal.h>
 
@@ -217,6 +219,9 @@ new_download(GwgetData* gwgetdata)
 	gchar *size;
 	int width = 16, height = 16;
 	gdouble perc;
+	GThemedIcon *icon;
+	const gchar *const *icon_names;
+	gint i;
 	
 	gtk_list_store_append (GTK_LIST_STORE(model), &iter);
 
@@ -245,10 +250,15 @@ new_download(GwgetData* gwgetdata)
 	theme = gtk_icon_theme_get_default ();
 	if (!gwgetdata->recursive) {
 		content_type = g_content_type_guess (gwgetdata->local_filename, NULL, 0, NULL);
-		gwgetdata->icon_name = gnome_icon_lookup (theme, NULL, NULL, NULL, NULL,
-	 							content_type, GNOME_ICON_LOOKUP_FLAGS_NONE, NULL);
-	} else {
 		gwgetdata->icon_name = g_strdup("gtk-refresh");
+		icon = (GThemedIcon*) g_content_type_get_icon (content_type);
+		icon_names = g_themed_icon_get_names (icon);
+		for (i=0; i<sizeof(icon_names)-1; i++) {
+			if (gtk_icon_theme_has_icon (gtk_icon_theme_get_default (), icon_names[i])) {
+	 			gwgetdata->icon_name = icon_names[i];
+				break;
+			}
+		}
 	}
 	gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height);
 	width *= 2;
diff --git a/src/new_window.c b/src/new_window.c
index fb3ed4d..e006dbe 100644
--- a/src/new_window.c
+++ b/src/new_window.c
@@ -24,7 +24,8 @@ This file creates the window for add new download and its callback
 */
 
 
-#include <gnome.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #include <config.h>
 #include "new_window.h"
 #include "main_window.h"
diff --git a/src/systray.c b/src/systray.c
index 18e71cb..23b6454 100644
--- a/src/systray.c
+++ b/src/systray.c
@@ -1,6 +1,7 @@
 
 #include <config.h>
-#include <gnome.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #include "main_window.h"
 #include "gwget_data.h"
 #include "systray.h"
diff --git a/src/utils.c b/src/utils.c
index 7e6a19d..ff3054a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -14,7 +14,8 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#include <gnome.h>
+#include <string.h>
+#include <gtk/gtk.h>
 #include "main_window.h"
 #include "utils.h"
 #include "gwget_data.h"
diff --git a/src/wget-log.c b/src/wget-log.c
index 686a3ba..adeb30c 100644
--- a/src/wget-log.c
+++ b/src/wget-log.c
@@ -25,7 +25,9 @@
 #define _FILE_OFFSET_BITS 64
 
 #include <config.h>
-#include <gnome.h>
+#include <stdlib.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 #include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
