* add parameter checks
pmo-trunk-r1864
/* If the mail operation is the currently shown one */
if (priv->current == mail_op) {
gchar *msg = NULL;
/* If the mail operation is the currently shown one */
if (priv->current == mail_op) {
gchar *msg = NULL;
- gint done = modest_mail_operation_get_task_done (mail_op);
- gint total = modest_mail_operation_get_task_total (mail_op);
-
+ guint done = modest_mail_operation_get_task_done (mail_op);
+ guint total = modest_mail_operation_get_task_total (mail_op);
+
determined = (done > 0 && total > 0);
id = modest_mail_operation_get_id (mail_op);
determined = (done > 0 && total > 0);
id = modest_mail_operation_get_id (mail_op);
void
modest_progress_bar_widget_set_progress (ModestProgressBarWidget *self,
const gchar *message,
void
modest_progress_bar_widget_set_progress (ModestProgressBarWidget *self,
const gchar *message,
- gint done,
- gint total)
+ guint done,
+ guint total)
{
ModestProgressBarWidgetPrivate *priv;
{
ModestProgressBarWidgetPrivate *priv;
+ g_return_if_fail (MODEST_IS_PROGRESS_BAR_WIDGET(self));
+ g_return_if_fail (done <= total);
+
priv = MODEST_PROGRESS_BAR_WIDGET_GET_PRIVATE (self);
/* Set progress */
priv = MODEST_PROGRESS_BAR_WIDGET_GET_PRIVATE (self);
/* Set progress */
/* member functions */
GType modest_progress_bar_widget_get_type (void) G_GNUC_CONST;
/* member functions */
GType modest_progress_bar_widget_get_type (void) G_GNUC_CONST;
-GtkWidget* modest_progress_bar_widget_new ();
+GtkWidget* modest_progress_bar_widget_new (void);
-void modest_progress_bar_widget_set_progress (ModestProgressBarWidget *self, const gchar *msg, gint done, gint total);
+void modest_progress_bar_widget_set_progress (ModestProgressBarWidget *self,
+ const gchar *msg, guint done, guint total);