Use gtk_show_uri instead of libgnome-ui/exo.
authorRoy Marples <roy@marples.name>
Thu, 22 Jan 2009 16:29:45 +0000 (16:29 +0000)
committerRoy Marples <roy@marples.name>
Thu, 22 Jan 2009 16:29:45 +0000 (16:29 +0000)
Makefile
de-.mk [deleted file]
de-GNOME.mk [deleted file]
de-XFCE.mk [deleted file]
main.c
menu.c

index dfbbe71879db9efc1aca94405c7b11274b80320b..d9371cfffd82841b822853c50ae0b8ef722fdd07 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,22 +9,16 @@ SYSCONFDIR?=  ${PREFIX}/etc/xdg/autostart
 FILESDIR?=     ${SYSCONFDIR}
 FILES=         dhcpcd-gtk.desktop
 
-# Crappy include for Desktop Environment
-# We have mk for GNOME and XFCE
-include                de-${DE}.mk 
-
-_PKGCFLAGS_SH= pkg-config --cflags dbus-glib-1 gtk+-2.0 libnotify ${DEPKGS}
+_PKGCFLAGS_SH= pkg-config --cflags dbus-glib-1 gtk+-2.0 libnotify
 _PKGCFLAGS!=   ${_PKGCFLAGS_SH}
 PKGCFLAGS?=    ${_PKGCFLAGS}$(shell ${_PKGCFLAGS_SH})
 CFLAGS+=       ${PKGCFLAGS}
 
-_PKGLIBS_SH=   pkg-config --libs dbus-glib-1 gtk+-2.0 libnotify ${DEPKGS}
+_PKGLIBS_SH=   pkg-config --libs dbus-glib-1 gtk+-2.0 libnotify
 _PKGLIBS!=     ${_PKGLIBS_SH}
 PKGLIBS?=      ${_PKGLIBS}$(shell ${_PKGLIBS_SH})
 LDADD+=                ${PKGLIBS}
 
-CPPFLAGS+=     ${DECPPFLAGS}
-
 MK=            mk
 include ${MK}/sys.mk
 include ${MK}/prog.mk
diff --git a/de-.mk b/de-.mk
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/de-GNOME.mk b/de-GNOME.mk
deleted file mode 100644 (file)
index f757fd2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-DEPKGS=                libgnomeui-2.0
-DECPPFLAGS=    -DHAVE_GNOME
diff --git a/de-XFCE.mk b/de-XFCE.mk
deleted file mode 100644 (file)
index 2c8be82..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-DEPKGS=                exo-0.3
-DECPPFLAGS=    -DHAVE_XFCE
diff --git a/main.c b/main.c
index 95d13be05977c952a1a0c82533f252ac10b9d834..6bd3d2f2483f9d4b9da7402a2c22febee283a1a2 100644 (file)
--- a/main.c
+++ b/main.c
@@ -459,11 +459,6 @@ main(int argc, char *argv[])
        char *version = NULL;
        GType otype;
        
-#if defined(HAVE_GNOME) || defined(HAVE_XFCE)
-       if (!g_thread_supported())
-               g_thread_init(NULL);
-#endif
-
        gtk_init(&argc, &argv);
        g_set_application_name("dhcpcd Monitor");
        status_icon = gtk_status_icon_new_from_stock(GTK_STOCK_DISCONNECT);
diff --git a/menu.c b/menu.c
index deb592d432092b4796010147507c8bcb5080aa97..3406713588651638a55e10557d53f7da09187308 100644 (file)
--- a/menu.c
+++ b/menu.c
 
 #include <gtk/gtk.h>
 
-#ifdef HAVE_GNOME
-# include <gnome.h>
-#endif
-
 #include "config.h"
 #include "menu.h"
 
@@ -77,14 +73,13 @@ on_help(_unused GtkMenuItem *item, _unused gpointer data)
 {
 }
 
-#ifdef HAVE_GNOME
 static void
 url_show(GtkAboutDialog *dialog, const char *url)
 {
        GdkScreen *screen;
 
        screen = gtk_widget_get_screen(GTK_WIDGET(dialog));
-       gnome_url_show_on_screen(url, screen, NULL);
+       gtk_show_uri(screen, url, GDK_CURRENT_TIME, NULL);
 }
 
 static void
@@ -102,19 +97,13 @@ url_hook(GtkAboutDialog *dialog, const char *url, _unused gpointer p)
 {
        url_show(dialog, url);
 }
-#endif
 
 static void
 on_about(_unused GtkMenuItem *item, _unused gpointer data)
 {
        gtk_window_set_default_icon_name(GTK_STOCK_NETWORK);
-#ifdef HAVE_GNOME
        gtk_about_dialog_set_email_hook(email_hook, NULL, NULL);
        gtk_about_dialog_set_url_hook(url_hook, NULL, NULL);
-#elif HAVE_XFCE
-       gtk_about_dialog_set_email_hook(exo_url_about_dialog_hook, NULL, NULL);
-       gtk_about_dialog_set_url_hook(exo_url_about_dialog_hook, NULL, NULL);
-#endif
        gtk_show_about_dialog(NULL,
                              "version", VERSION,
                              "copyright", copyright,