float val;
char buf[64];
- colnum = (int)data;
+ colnum = GPOINTER_TO_INT(data);
gtk_tree_model_get(model, iter, colnum, &val, -1);
snprintf(buf, 64, "%.2f%%", (double)(val * 100.0));
g_object_set(rend, "text", buf, NULL);
int colnum, val;
char buf[64];
- colnum = (int)data;
+ colnum = GPOINTER_TO_INT(data);
gtk_tree_model_get(model, iter, colnum, &val, -1);
if(val >= 0)
snprintf(buf, 64, "%'i", val);
long long val;
char buf[64];
- colnum = (int)data;
+ colnum = GPOINTER_TO_INT(data);
gtk_tree_model_get(model, iter, colnum, &val, -1);
if(val >= 0)
strcpy(buf, bytes2si(val));
int colnum, val;
char buf[64];
- colnum = (int)data;
+ colnum = GPOINTER_TO_INT(data);
gtk_tree_model_get(model, iter, colnum, &val, -1);
if(val > 0)
snprintf(buf, 64, "%i", val);
}
int msgbox(int type, int buttons, char *format, ...)
+#if defined(__GNUC__)
+ __attribute__ ((format (printf, 3, 4)))
+#endif
+;
+
+int msgbox(int type, int buttons, char *format, ...)
{
GtkWidget *swnd;
va_list args;
gtk_tree_view_column_set_title(col, names[i]);
rnd = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start(col, rnd, TRUE);
- gtk_tree_view_column_set_cell_data_func(col, rnd, transnicebytefunc2, (gpointer)cols[i], NULL);
+ gtk_tree_view_column_set_cell_data_func(col, rnd, transnicebytefunc2, GINT_TO_POINTER(cols[i]), NULL);
} else {
col = gtk_tree_view_column_new_with_attributes(names[i], gtk_cell_renderer_text_new(), "text", cols[i], NULL);
}
}
if(i == numcols)
{
- msgbox(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, _("The hub list at %s did not contain the address to any hubs"));
+ msgbox(GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, _("The hub list at %s did not contain the address to any hubs"), pubhubaddr);
break;
}
model = gtk_list_store_newv(numcols, types);