Commit 18a07d42 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

ellipsize progress label.

2007-02-01  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpprogressbox.c: ellipsize progress label.

	* app/widgets/gimpprogressdialog.c: set a fixed width for progress
	dialogs.

	* libgimp/gimpprogressbar.c: ellipsize progress label.


svn path=/trunk/; revision=21831
parent fb6db20b
2007-02-01 Sven Neumann <sven@gimp.org>
* app/widgets/gimpprogressbox.c: ellipsize progress label.
* app/widgets/gimpprogressdialog.c: set a fixed width for progress
dialogs.
* libgimp/gimpprogressbar.c: ellipsize progress label.
2007-02-01 Sven Neumann <sven@gimp.org>
 
* app/config/gimpdisplayconfig.c
......@@ -63,6 +63,21 @@ gimp_progress_box_class_init (GimpProgressBoxClass *klass)
static void
gimp_progress_box_init (GimpProgressBox *box)
{
gtk_box_set_spacing (GTK_BOX (box), 6);
box->progress = gtk_progress_bar_new ();
gtk_widget_set_size_request (box->progress, 250, 20);
gtk_box_pack_start (GTK_BOX (box), box->progress, FALSE, FALSE, 0);
gtk_widget_show (box->progress);
box->label = gtk_label_new ("");
gtk_label_set_ellipsize (GTK_LABEL (box->label), PANGO_ELLIPSIZE_MIDDLE);
gtk_misc_set_alignment (GTK_MISC (box->label), 0.0, 0.5);
gimp_label_set_attributes (GTK_LABEL (box->label),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
gtk_box_pack_start (GTK_BOX (box), box->label, FALSE, FALSE, 0);
gtk_widget_show (box->label);
}
static void
......@@ -188,24 +203,5 @@ gimp_progress_box_progress_pulse (GimpProgress *progress)
GtkWidget *
gimp_progress_box_new (void)
{
GimpProgressBox *box;
box = g_object_new (GIMP_TYPE_PROGRESS_BOX,
"spacing", 6,
NULL);
box->progress = gtk_progress_bar_new ();
gtk_widget_set_size_request (box->progress, 250, 20);
gtk_box_pack_start (GTK_BOX (box), box->progress, FALSE, FALSE, 0);
gtk_widget_show (box->progress);
box->label = gtk_label_new ("");
gtk_misc_set_alignment (GTK_MISC (box->label), 0.0, 0.5);
gimp_label_set_attributes (GTK_LABEL (box->label),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
gtk_box_pack_start (GTK_BOX (box), box->label, FALSE, FALSE, 0);
gtk_widget_show (box->label);
return GTK_WIDGET (box);
return g_object_new (GIMP_TYPE_PROGRESS_BOX, NULL);
}
......@@ -35,6 +35,9 @@
#include "gimp-intl.h"
#define PROGRESS_DIALOG_WIDTH 400
static void gimp_progress_dialog_progress_iface_init (GimpProgressInterface *iface);
static void gimp_progress_dialog_response (GtkDialog *dialog,
......@@ -85,6 +88,8 @@ gimp_progress_dialog_init (GimpProgressDialog *dialog)
gtk_dialog_add_button (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
gtk_widget_set_size_request (GTK_WIDGET (dialog), PROGRESS_DIALOG_WIDTH, -1);
}
static void
......
......@@ -72,6 +72,7 @@ gimp_progress_bar_init (GimpProgressBar *bar)
GimpProgressVtable vtable = { 0, };
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (bar), " ");
gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (bar), PANGO_ELLIPSIZE_END);
vtable.start = gimp_progress_bar_start;
vtable.end = gimp_progress_bar_end;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment