X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=clients%2Fgtk2%2Fdolcon.c;h=a5adc12fc0893751367abbe0ae5e4cb4a0b74354;hb=4f0d9ba6afe60e0b0091baa188026000b206ebc4;hp=356fc62dbc57c8b66ab3521e483acc0c35b463e7;hpb=040118de4a1c2c5d81f4748461b8919b11c2eaac;p=doldaconnect.git diff --git a/clients/gtk2/dolcon.c b/clients/gtk2/dolcon.c index 356fc62..a5adc12 100644 --- a/clients/gtk2/dolcon.c +++ b/clients/gtk2/dolcon.c @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include @@ -420,7 +421,7 @@ void transspeedinfo(GtkTreeViewColumn *col, GtkCellRenderer *rend, GtkTreeModel void transerrorinfo(GtkTreeViewColumn *col, GtkCellRenderer *rend, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { int error; - time_t errortime; + gint64 errortime; char finbuf[64], tbuf[64], *errstr; gtk_tree_model_get(model, iter, 10, &error, 11, &errortime, -1); @@ -430,7 +431,7 @@ void transerrorinfo(GtkTreeViewColumn *col, GtkCellRenderer *rend, GtkTreeModel errstr = _("Not found"); else if(error == DC_TRNSE_NOSLOTS) errstr = _("No slots"); - strftime(tbuf, 64, _("%H:%M:%S"), localtime(&errortime)); + strftime(tbuf, 64, _("%H:%M:%S"), localtime((const time_t[]){errortime})); snprintf(finbuf, 64, _("%s (reported at %s)"), errstr, tbuf); } else { *finbuf = 0; @@ -479,8 +480,7 @@ void updatetransferlists(void) char *buf; char *peerid, *peernick, *path, *hash; int state, dir, error; - gint64 size, curpos; - time_t errortime; + gint64 size, curpos, errortime; GtkListStore *stores[3]; for(transfer = dc_transfers; transfer != NULL; transfer = transfer->next) @@ -569,7 +569,7 @@ void updatetransferlists(void) 8, gettrstatestock(transfer->state), 9, 0.0, 10, transfer->error, - 11, transfer->errortime, + 11, (gint64)transfer->errortime, 12, hash, -1); free(peerid); @@ -2255,7 +2255,7 @@ int main(int argc, char **argv) } dc_init(); signal(SIGCHLD, SIG_IGN); - pubhubaddr = sstrdup("http://www.hublist.org/PublicHubList.xml.bz2"); + pubhubaddr = sstrdup("http://dchublist.com/hublist.xml.bz2"); dcserver = sstrdup(""); if((pwent = getpwuid(getuid())) == NULL) { @@ -2287,7 +2287,7 @@ int main(int argc, char **argv) G_TYPE_STRING, /* stock */ G_TYPE_FLOAT, /* percentage */ G_TYPE_INT, /* error */ - G_TYPE_INT, /* errortime */ + G_TYPE_INT64, /* errortime */ G_TYPE_STRING); /* hash */ gtk_tree_view_set_model(GTK_TREE_VIEW(main_downloads), GTK_TREE_MODEL(dlmodel));