2006-05-16 [wwp] 2.2.0cvs19

* src/action.c
	* src/gedit-print.c
	* src/inc.c
	* src/mainwindow.c
	* src/mh.c
	* src/statusbar.c
	* src/send_message.c
	* src/summaryview.c
		get rid of some gtk warning/errors at runtime (and avoid divide-by-0).
This commit is contained in:
Tristan Chabredier 2006-05-16 09:38:20 +00:00
parent 127c47b4fd
commit 749e0af242
11 changed files with 25 additions and 10 deletions

View file

@ -1,3 +1,15 @@
2006-05-16 [wwp] 2.2.0cvs19
* src/action.c
* src/gedit-print.c
* src/inc.c
* src/mainwindow.c
* src/mh.c
* src/statusbar.c
* src/send_message.c
* src/summaryview.c
get rid of some gtk warning/errors at runtime (and avoid divide-by-0).
2006-05-15 [colin] 2.2.0cvs18
* src/procmsg.c

View file

@ -1488,3 +1488,4 @@
( cvs diff -u -r 1.115.2.85 -r 1.115.2.86 src/main.c; ) > 2.2.0cvs16.patchset
( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 tools/filter_conv_new.pl; ) > 2.2.0cvs17.patchset
( cvs diff -u -r 1.150.2.62 -r 1.150.2.63 src/procmsg.c; ) > 2.2.0cvs18.patchset
( cvs diff -u -r 1.12.2.34 -r 1.12.2.35 src/action.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/gedit-print.c; cvs diff -u -r 1.149.2.47 -r 1.149.2.48 src/inc.c; cvs diff -u -r 1.274.2.110 -r 1.274.2.111 src/mainwindow.c; cvs diff -u -r 1.79.2.25 -r 1.79.2.26 src/mh.c; cvs diff -u -r 1.5.2.8 -r 1.5.2.9 src/statusbar.c; cvs diff -u -r 1.17.2.27 -r 1.17.2.28 src/send_message.c; cvs diff -u -r 1.395.2.198 -r 1.395.2.199 src/summaryview.c; ) > 2.2.0cvs19.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=2
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=18
EXTRA_VERSION=19
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -1137,6 +1137,7 @@ static void update_io_dialog(Children *children)
gchar *text;
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(children->progress_bar),
(children->initial_nb == 0) ? 0 :
(gdouble) (children->initial_nb - children->nb) /
(gdouble) children->initial_nb);
text = g_strdup_printf("%s %d/%d", _("Completed"),

View file

@ -276,7 +276,7 @@ page_cb (GtkSourcePrintJob *job, GeditPrintJobInfo *pji)
g_free (str);
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (pji->progressbar),
1.0 * page_num / total);
(total == 0) ? 0 : 1.0 * page_num / total);
/* Update UI */
while (gtk_events_pending ())

View file

@ -927,7 +927,7 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
}
progress_dialog_set_fraction
(inc_dialog->dialog,(gfloat)cur_total / (gfloat)total);
(inc_dialog->dialog, (total == 0) ? 0: (gfloat)cur_total / (gfloat)total);
g_snprintf(buf, sizeof(buf), "%d / %d",
pop3_session->cur_msg, pop3_session->count);
@ -935,7 +935,7 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
(GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), buf);
gtk_progress_bar_set_fraction
(GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar),
(gfloat)cur_total / (gfloat)total);
(total == 0) ? 0 : (gfloat)cur_total / (gfloat)total);
if (pop3_session->cur_total_num > 0) {
g_snprintf(buf, sizeof(buf),

View file

@ -1948,8 +1948,7 @@ void main_window_progress_set(MainWindow *mainwin, gint cur, gint total)
g_snprintf(buf, sizeof(buf), "%d / %d", cur, total);
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(mainwin->progressbar), buf);
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(mainwin->progressbar),
(cur == 0 && total == 0) ? 0 :
(gfloat)cur / (gfloat)total);
(total == 0) ? 0 : (gfloat)cur / (gfloat)total);
}
void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)

View file

@ -331,7 +331,8 @@ static MsgInfo *mh_get_msginfo(Folder *folder, FolderItem *item, gint num)
gchar *file;
g_return_val_if_fail(item != NULL, NULL);
g_return_val_if_fail(num > 0, NULL);
if (num <= 0)
return NULL;
file = mh_fetch_msg(folder, item, num);
if (!file) return NULL;

View file

@ -493,7 +493,7 @@ static gint send_send_data_progressive(Session *session, guint cur_len,
cur_len, total_len);
progress_dialog_set_label(dialog->dialog, buf);
progress_dialog_set_fraction
(dialog->dialog, (gfloat)cur_len / (gfloat)total_len);
(dialog->dialog, (total_len == 0) ? 0 : (gfloat)cur_len / (gfloat)total_len);
return 0;
}

View file

@ -155,7 +155,7 @@ void statusbar_progress_all (gint done, gint total, gint step)
(GTK_PROGRESS_BAR(mainwindow_get_mainwindow()->progressbar), buf);
gtk_progress_bar_set_fraction
(GTK_PROGRESS_BAR(mainwindow_get_mainwindow()->progressbar),
(gfloat)done / (gfloat)total);
(total == 0) ? 0 : (gfloat)done / (gfloat)total);
} else if (total == 0) {
gtk_progress_bar_set_text
(GTK_PROGRESS_BAR(mainwindow_get_mainwindow()->progressbar), "");

View file

@ -2496,7 +2496,8 @@ static gchar *summary_complete_address(const gchar *addr)
Xstrdup_a(email_addr, addr, return NULL);
extract_address(email_addr);
g_return_val_if_fail(*email_addr, NULL);
if (!*email_addr)
return NULL;
/*
* completion stuff must be already initialized