aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/ChangeLog3
-rw-r--r--widgets/misc/e-info-label.c34
2 files changed, 19 insertions, 18 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 4f62dc5f68..7afc41686b 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,5 +1,8 @@
2004-04-08 Not Zed <NotZed@Ximian.com>
+ * e-info-label.c (e_info_label_set_info): ugh, fix some last
+ minute changes which broke shit.
+
* e-info-label.[ch]: A widget to show component info for the
current component/view.
diff --git a/widgets/misc/e-info-label.c b/widgets/misc/e-info-label.c
index 3e04355583..fffc24c83d 100644
--- a/widgets/misc/e-info-label.c
+++ b/widgets/misc/e-info-label.c
@@ -143,29 +143,27 @@ e_info_label_set_info(EInfoLabel *el, const char *location, const char *info)
{
char *tmp;
- if (el->location == NULL)
+ if (el->location == NULL) {
el->location = e_clipped_label_new(location, PANGO_WEIGHT_BOLD, 1.0);
- else
- e_clipped_label_set_text((EClippedLabel *)el->location, location);
-
- if (el->info == NULL)
el->info = gtk_label_new(NULL);
- tmp = g_strdup_printf("<span size=\"smaller\">%s</span>", info);
- gtk_label_set_markup((GtkLabel *)el->info, tmp);
- g_free(tmp);
-
- gtk_misc_set_alignment((GtkMisc *)el->location, 0.0, 0.0);
- gtk_misc_set_padding((GtkMisc *)el->location, 0, 6);
- gtk_misc_set_alignment((GtkMisc *)el->info, 0.0, 1.0);
- gtk_misc_set_padding((GtkMisc *)el->info, 0, 6);
+ gtk_misc_set_alignment((GtkMisc *)el->location, 0.0, 0.0);
+ gtk_misc_set_padding((GtkMisc *)el->location, 0, 6);
+ gtk_misc_set_alignment((GtkMisc *)el->info, 0.0, 1.0);
+ gtk_misc_set_padding((GtkMisc *)el->info, 0, 6);
- gtk_widget_show(el->location);
- gtk_widget_show(el->info);
+ gtk_widget_show(el->location);
+ gtk_widget_show(el->info);
- gtk_box_pack_start((GtkBox *)el, (GtkWidget *)el->location, TRUE, TRUE, 0);
- gtk_box_pack_end((GtkBox *)el, (GtkWidget *)el->info, FALSE, TRUE, 6);
+ gtk_box_pack_start((GtkBox *)el, (GtkWidget *)el->location, TRUE, TRUE, 0);
+ gtk_box_pack_end((GtkBox *)el, (GtkWidget *)el->info, FALSE, TRUE, 6);
+ gtk_widget_set_state((GtkWidget *)el, GTK_STATE_ACTIVE);
+ } else {
+ e_clipped_label_set_text((EClippedLabel *)el->location, location);
+ }
- gtk_widget_set_state((GtkWidget *)el, GTK_STATE_ACTIVE);
+ tmp = g_strdup_printf("<span size=\"smaller\">%s</span>", info);
+ gtk_label_set_markup((GtkLabel *)el->info, tmp);
+ g_free(tmp);
}