#include <gtk/gtk.h>
#include "ui-common.h"
-static _sb_sid=0;
+static gint _sb_sid=0;
GtkWidget *hildon_file_chooser_dialog_new(GtkWindow * parent,
GtkFileChooserAction action)
_sb_sid=g_timeout_add(6000, status_bar_clear, NULL);
}
-GtkWidget *hildon_banner_show_progress(GtkWidget * widget, GtkProgressBar * bar,
+GtkWidget *hildon_banner_show_progress(GtkWidget * widget, GtkProgressBar *bar,
const gchar * text)
{
+ gtk_widget_show(_progress_item);
+ gtk_progress_bar_set_text(_progress_item, text);
hildon_banner_show_information(_status_bar, NULL, text);
return NULL;
}
GTK_BUTTONS_OK_CANCEL, text);
}
-void hildon_banner_set_fraction(GtkWidget * widget, gfloat tmp)
+void hildon_banner_set_fraction(GtkWidget * widget, gdouble fraction)
{
-
+ gtk_progress_bar_set_fraction(_progress_item, fraction);
+ if (fraction==1.0)
+ gtk_widget_hide(_progress_item);
+ else
+ gtk_widget_show(_progress_item);
+ g_printf("P: %f\n", fraction);
}
-GtkWidget *hildon_banner_show_animation(GtkWidget * widget,
- const gchar * animation_name,
- const gchar * text)
+GtkWidget *hildon_banner_show_animation(GtkWidget *widget,
+ const gchar *animation_name,
+ const gchar *text)
{
hildon_banner_show_information(_status_bar, NULL, text);
+ gtk_widget_show(_progress_item);
+ gtk_progress_bar_pulse(_progress_item);
return NULL;
}
void gtk_widget_tap_and_hold_setup(GtkWidget * a, GtkWidget * w, void *p, gint t)
{
+
}
GtkWidget *hildon_number_editor_new(gint min, gint max)
static gint _zoom_timeout_sid=0;
static gint _map_mode=0;
+guint _num_downloads=0;
+guint _curr_download=0;
+
void map_render_paths();
void map_force_redraw();
gboolean curl_download_timeout();
} else {
/* No more retries left - something must be wrong. */
MACRO_BANNER_SHOW_INFO(_window,
- _
- ("Error in download. Check internet connection"
+ _("Error in download. Check internet connection"
" and/or Map Repository URL Format."));
}
}
_num_downloads = _curr_download = 0;
} else
hildon_banner_set_fraction(HILDON_BANNER(_download_banner),
- _curr_download /
- (double)_num_downloads);
+ _curr_download / (double)_num_downloads);
vprintf("%s(): return\n", __PRETTY_FUNCTION__);
return FALSE;
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
#ifndef WITH_HILDON
-
+item = gtk_tool_item_new();
+_progress_item=gtk_progress_bar_new();
+gtk_container_add(item, _progress_item);
+gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
#endif
}