Fixed warning relating to Downloads.

svn path=/trunk/netsurf/; revision=5520
This commit is contained in:
Mike Lester 2008-10-09 23:06:07 +00:00
parent 35120aab1a
commit 56500ce8e8
2 changed files with 7 additions and 3 deletions

View File

@ -48,7 +48,7 @@ static GtkTreeIter nsgtk_download_iter;
static GTimer *nsgtk_downloads_timer;
static GList *nsgtk_downloads_list, *nsgtk_download_buttons;
static gint nsgtk_downloads_num_active;
static gchar* status_messages[] = { NULL, "gtkWorking", "gtkError",
static const gchar* status_messages[] = { NULL, "gtkWorking", "gtkError",
"gtkComplete", "gtkCanceled" };
static gboolean nsgtk_download_hide(GtkWidget *window);
@ -316,7 +316,6 @@ GtkTreeView* nsgtk_download_tree_view_new(GladeXML *gladeFile)
GtkTreeView *treeview = GTK_TREE_VIEW(glade_xml_get_widget(gladeFile,
"treeDownloads"));
GtkCellRenderer *renderer;
gchar *progress, *information, *speed, *remaining;
/* Progress column */
renderer = gtk_cell_renderer_progress_new();
@ -428,6 +427,7 @@ gboolean nsgtk_download_update(gboolean force_update)
switch (dl->status) {
case NSGTK_DOWNLOAD_WORKING:
pulse_mode = TRUE;
case NSGTK_DOWNLOAD_NONE:
dl->speed = dl->size_downloaded /
(elapsed - dl->start_time);
@ -448,6 +448,10 @@ gboolean nsgtk_download_update(gboolean force_update)
downloaded += dl->size_downloaded;
total += dl->size_total;
dls++;
default:
;//Do nothing
}
if (update)
nsgtk_download_store_update_item(dl);

View File

@ -70,7 +70,7 @@ struct gui_download_window {
typedef void (*nsgtk_download_selection_action)(struct gui_download_window *dl);
void nsgtk_download_init();
void nsgtk_download_init(void);
void nsgtk_download_destroy (void);
bool nsgtk_check_for_downloads(GtkWindow *parent);
void nsgtk_download_show(GtkWindow *parent);