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



commit 159aa6f695197e17b88b53ae115ed4052e7e8ab8
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Wed Dec 29 20:40:38 2010 +0900

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

 ChangeLog                   |    2 ++
 gladeui/glade-design-view.c |   11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a13806a..a1bf346 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
 	  properties and do height-for-width, also now use GtkComboBox:fixed-width = FALSE
 	  to allow popups to show the full column values instead of the old hack in place.
 
+	* 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 201d3d8..e75b51f 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,10 +184,17 @@ 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_show_text (GTK_PROGRESS_BAR (view->priv->progress), TRUE);
+	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]