[frogr] With GTK3, set the show-text property for progress bars



commit 7f707353410ce0d665cbdb1cb2092da545e83f38
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Fri Apr 22 20:59:40 2011 +0200

    With GTK3, set the show-text property for progress bars

 src/frogr-main-view.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 82d92ff..4b191c8 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -1558,9 +1558,18 @@ frogr_main_view_init (FrogrMainView *self)
   gtk_window_set_default_size (GTK_WINDOW (progress_dialog), 250, -1);
 
   progress_vbox = gtk_dialog_get_content_area (GTK_DIALOG (progress_dialog));
-  progress_bar = gtk_progress_bar_new ();
+
   progress_label = gtk_label_new (NULL);
   gtk_box_pack_start (GTK_BOX (progress_vbox), progress_label, FALSE, FALSE, 6);
+
+  progress_bar = gtk_progress_bar_new ();
+
+#ifdef GTK_API_VERSION_3
+  /* In GTK3, we need to make this explicit, otherwise no text will be
+     shown superimposed over the progress bar */
+  gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR (progress_bar), TRUE);
+#endif
+
   gtk_box_pack_start (GTK_BOX (progress_vbox), progress_bar, FALSE, FALSE, 6);
 
   gtk_widget_hide (progress_dialog);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]