Changeset 3154


Ignore:
Timestamp:
Sep 23, 2007, 10:32:22 PM (15 years ago)
Author:
charles
Message:

Try out using the stock gtk+ connect/disconnect icons in the torrent inspector's peers tab to denote connected peers. This commit is to get feedback -- I'm not 100% sure about this change.

Location:
trunk/gtk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/Makefile.am

    r2785 r3154  
    1111    conf.h \
    1212    dialogs.h \
    13     dot-icons.h \
    1413    hig.h \
    1514    img_icon_full.h \
  • trunk/gtk/torrent-inspector.c

    r3153 r3154  
    3333#include "actions.h"
    3434#include "tr_torrent.h"
    35 #include "dot-icons.h"
    3635#include "hig.h"
    3736#include "torrent-inspector.h"
     
    339338                   gpointer             data UNUSED)
    340339{
    341   static GdkPixbuf * rdot = NULL;
    342   static GdkPixbuf * gdot = NULL;
    343340  gboolean is_connected = FALSE;
    344341  gtk_tree_model_get (tree_model, iter, PEER_COL_IS_CONNECTED, &is_connected,
    345                                         -1);
    346   if (!rdot) rdot = gdk_pixbuf_new_from_inline (-1, red_dot, FALSE, NULL);
    347   if (!gdot) gdot = gdk_pixbuf_new_from_inline (-1, green_dot, FALSE, NULL);
     342                                        -1 );
    348343  g_object_set (renderer, "xalign", (gfloat)0.0,
    349344                          "yalign", (gfloat)0.5,
    350                           "pixbuf", (is_connected ? gdot : rdot),
     345                          "stock-id", ( is_connected ? GTK_STOCK_CONNECT : GTK_STOCK_DISCONNECT ),
    351346                          NULL);
    352347}
Note: See TracChangeset for help on using the changeset viewer.