27 #define EV_PROGRESS_MESSAGE_AREA_GET_PRIVATE(obj) \
28 (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_PROGRESS_MESSAGE_AREA, EvProgressMessageAreaPrivate))
55 GObjectClass *gobject_class = G_OBJECT_CLASS (
class);
60 g_object_class_install_property (gobject_class,
62 g_param_spec_string (
"status",
64 "The status text of the progress area",
67 G_PARAM_STATIC_STRINGS));
68 g_object_class_install_property (gobject_class,
70 g_param_spec_double (
"fraction",
72 "The fraction of total work that has been completed",
75 G_PARAM_STATIC_STRINGS));
90 vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
93 gtk_label_set_use_markup (GTK_LABEL (area->
priv->
label),
TRUE);
94 gtk_label_set_ellipsize (GTK_LABEL (area->
priv->
label),
96 gtk_misc_set_alignment (GTK_MISC (area->
priv->
label), 0.0, 0.5);
105 gtk_box_pack_start (GTK_BOX (contents), vbox,
TRUE,
TRUE, 0);
106 gtk_widget_show (vbox);
125 G_OBJECT_WARN_INVALID_PROPERTY_ID (
object, prop_id, pspec);
139 g_value_set_string (value, gtk_label_get_label (GTK_LABEL (area->
priv->
label)));
144 fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (area->
priv->
progress_bar));
145 g_value_set_double (value, fraction);
149 G_OBJECT_WARN_INVALID_PROPERTY_ID (
object, prop_id, pspec);
156 const gchar *first_button_text,
162 "message-type", GTK_MESSAGE_OTHER,
165 if (first_button_text) {
168 va_start (args, first_button_text);
186 gtk_label_set_text (GTK_LABEL (area->
priv->
label), str);
188 g_object_notify (G_OBJECT (area),
"status");
199 g_object_notify (G_OBJECT (area),
"fraction");