Prefer gtk-2 over gtk-3 for the time being as some functions are now marked as deprec...
authorRoy Marples <roy@marples.name>
Tue, 6 May 2014 11:21:58 +0000 (11:21 +0000)
committerRoy Marples <roy@marples.name>
Tue, 6 May 2014 11:21:58 +0000 (11:21 +0000)
configure
src/dhcpcd-gtk/main.c
src/dhcpcd-gtk/menu.c
src/libdhcpcd/libdhcpcd.h

index 6be180d62798ac25087a8c30e78ebd790c7dffcf..4a75fe537eaf11403a424209b6e432839cb2c0ee 100755 (executable)
--- a/configure
+++ b/configure
@@ -285,10 +285,10 @@ echo "DBUS_LIBS=  $DBUS_LIBS" >>$CONFIG_MK
 
 UI=
 if [ "$WITH_GTK" = yes -o -z "$WITH_GTK" ]; then
-       if pkg-config --cflags gtk+-3.0 >/dev/null 2>&1; then
-               WITH_GTK="gtk+-3.0"
-       elif pkg-config --cflags gtk+-2.0 >/dev/null 2>&1; then
+       if pkg-config --cflags gtk+-2.0 >/dev/null 2>&1; then
                WITH_GTK="gtk+-2.0"
+       elif pkg-config --cflags gtk+-3.0 >/dev/null 2>&1; then
+               WITH_GTK="gtk+-3.0"
        fi
 elif [ -n "$WITH_GTK" -a "$WITH_GTK" != no ]; then
        if ! pkg-config --cflags $WITH_GTK >/dev/null; then
index 62066d72f038443948c305621d862a0e41f41beb..9caf5fe3249cc1a410b1add145afbc5559f5dfda 100644 (file)
@@ -403,7 +403,7 @@ add_watch_cb(DHCPCD_CONNECTION *con, const struct pollfd *fd,
 {
        struct watch *w;
        GIOChannel *gio;
-       int flags;
+       GIOCondition flags;
        guint eventid;
 
        /* Remove any existing watch */
@@ -446,7 +446,7 @@ main(int argc, char *argv[])
        setlocale(LC_ALL, "");
        bindtextdomain(PACKAGE, NULL);
        bind_textdomain_codeset(PACKAGE, "UTF-8");
-       textdomain(PACKAGE); 
+       textdomain(PACKAGE);
 
        gtk_init(&argc, &argv);
        g_set_application_name("Network Configurator");
index 0f410aca0bc0d9a021f5664a40232ceaa5c6956c..2e95f56894305e9f60b2eae10f22594fdbcf0a50 100644 (file)
@@ -129,7 +129,7 @@ add_scans(WI_SCAN *scan)
                if (g_strcmp0(wis->ssid, scan->interface->ssid) == 0)
                        gtk_check_menu_item_set_active(
                                GTK_CHECK_MENU_ITEM(item), true);
-               if (wis->flags == NULL)
+               if (wis->flags[0] == '\0')
                        icon = "network-wireless";
                else
                        icon = "network-wireless-encrypted";
@@ -147,9 +147,13 @@ add_scans(WI_SCAN *scan)
                perc = CLAMP(strength, 0, 100) / 100.0;
                gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(bar), perc);
 
-               tip = g_strconcat(wis->bssid, " ", wis->flags, NULL);
-               gtk_widget_set_tooltip_text(item, tip);
-               g_free(tip);
+               if (wis->flags[0] == '\0')
+                       gtk_widget_set_tooltip_text(item, wis->bssid);
+               else {
+                       tip = g_strconcat(wis->bssid, " ", wis->flags, NULL);
+                       gtk_widget_set_tooltip_text(item, tip);
+                       g_free(tip);
+               }
 
                gtk_widget_show(label);
                gtk_widget_show(bar);
index ba86b89354702e62491a8feb310222925d33edf0..0d31bec76888b047f3b88a4ffb4469616ebc4c0a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * libdhcpcd
- * Copyright 2009-2012 Roy Marples <roy@marples.name>
+ * Copyright 2009-2014 Roy Marples <roy@marples.name>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions