[glade3/glade-3-8] * gladeui/glade-design-view.c: Made loading progress bar nicer looking and ellipsizing.



commit 3e75c62574cd990a0ca0df78a8fee780b89b303f
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Wed Dec 29 20:47:25 2010 +0900

    	* gladeui/glade-design-view.c: Made loading progress bar nicer looking and ellipsizing.

 ChangeLog                   |    4 ++++
 gladeui/glade-design-view.c |   11 +++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 277f1e1..aea4579 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-29  Tristan Van Berkom <tristanvb openismus com>
+
+	* gladeui/glade-design-view.c: Made loading progress bar nicer looking and ellipsizing.
+
 2010-12-28  Tristan Van Berkom <tristanvb openismus com>
 
 	* gladeui/Makefile.am, gladeui/glade.h, gladeui/glade-clipboard.c, gladeui/glade-app.[ch],
diff --git a/gladeui/glade-design-view.c b/gladeui/glade-design-view.c
index d50052f..006b839 100644
--- a/gladeui/glade-design-view.c
+++ b/gladeui/glade-design-view.c
@@ -155,7 +155,7 @@ glade_design_view_get_property (GObject    *object,
 static void
 glade_design_view_init (GladeDesignView *view)
 {
-	GtkWidget *viewport, *filler;
+	GtkWidget *viewport, *filler, *align;
 
 	view->priv = GLADE_DESIGN_VIEW_GET_PRIVATE (view);
 
@@ -184,9 +184,16 @@ glade_design_view_init (GladeDesignView *view)
 	filler = gtk_label_new (NULL);
 	gtk_widget_show (filler);
 	gtk_box_pack_start (GTK_BOX (view->priv->progress_window), filler, TRUE, TRUE, 0);
+
+	align = gtk_alignment_new (0.5, 0.5, 0.75, 1.0);
+	gtk_widget_show (align);
+	gtk_box_pack_start (GTK_BOX (view->priv->progress_window), align, FALSE, TRUE, 0);
+
 	view->priv->progress = gtk_progress_bar_new ();
+	gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (view->priv->progress), PANGO_ELLIPSIZE_END);
 	gtk_widget_show (view->priv->progress);
-	gtk_box_pack_start (GTK_BOX (view->priv->progress_window), view->priv->progress, FALSE, TRUE, 0);
+	gtk_container_add (GTK_CONTAINER (align), view->priv->progress);
+
 	filler = gtk_label_new (NULL);
 	gtk_widget_show (filler);
 	gtk_box_pack_start (GTK_BOX (view->priv->progress_window), filler, TRUE, TRUE, 0);



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