Changeset 2558


Ignore:
Timestamp:
Jul 30, 2007, 8:48:43 PM (15 years ago)
Author:
charles
Message:

(gtk) don't #include private libtransmission headers. use g_snprintf() instead of snprintf().

Location:
trunk/gtk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/dialogs.c

    r2510 r2558  
    260260    else
    261261    {
    262         snprintf( str, sizeof str, "%i", count );
     262        g_snprintf( str, sizeof str, "%i", count );
    263263        gtk_label_set_text( label, str );
    264264    }
  • trunk/gtk/torrent-inspector.c

    r2441 r2558  
    3030
    3131#include <libtransmission/transmission.h>
    32 #include <libtransmission/platform.h> /* for tr_getTorrentsDirectory */
    3332
    3433#include "actions.h"
     
    416415  } else {
    417416    char str[16];
    418     snprintf( str, sizeof str, "%i", count );
     417    g_snprintf( str, sizeof str, "%i", count );
    419418    gtk_label_set_text( GTK_LABEL(l), str );
    420419  }
     
    689688  char *pch;
    690689  char *dname, *bname;
    691   const char * default_torrents_dir;
    692690  char buf[256];
    693691  char name[128];
     
    762760
    763761    g_snprintf (name, sizeof(name), namefmt, _("Torrent File Path"));
    764     default_torrents_dir = tr_getTorrentsDirectory();
    765762    dname = g_path_get_dirname (info->torrent);
    766     l = gtk_label_new (strstr(dname,default_torrents_dir)==dname
    767       ? _("Transmission Support Folder")
    768       : dname);
     763    l = gtk_label_new ( dname );
    769764    hig_workarea_add_row (t, &row, name, l, NULL);
    770765    g_free (dname);
  • trunk/gtk/tr_core.c

    r2463 r2558  
    679679    char buf[32];
    680680
    681     snprintf( buf, sizeof buf, "%i", val );
     681    g_snprintf( buf, sizeof buf, "%i", val );
    682682
    683683    tr_core_set_pref( self, id, buf );
Note: See TracChangeset for help on using the changeset viewer.