changeset 1389:c44f21235ffe

Use a common function bar_pane_expander_title() to set expanders title widget.
author zas_
date Sat, 07 Mar 2009 10:31:30 +0000
parents 2496a345c452
children ca74a2272999
files src/bar.c src/bar.h src/bar_comment.c src/bar_exif.c src/bar_histogram.c src/bar_keywords.c
diffstat 6 files changed, 15 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/bar.c	Fri Mar 06 22:34:38 2009 +0000
+++ b/src/bar.c	Sat Mar 07 10:31:30 2009 +0000
@@ -354,5 +354,14 @@
 	return bar;
 }
 
+GtkWidget *bar_pane_expander_title(const gchar *title)
+{
+	GtkWidget *widget = gtk_label_new(title);
+
+	pref_label_bold(widget, TRUE, FALSE);
+	//gtk_label_set_ellipsize(GTK_LABEL(widget), PANGO_ELLIPSIZE_END); //FIXME: do not work
+
+	return widget;
+}
 
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
--- a/src/bar.h	Fri Mar 06 22:34:38 2009 +0000
+++ b/src/bar.h	Sat Mar 07 10:31:30 2009 +0000
@@ -47,5 +47,7 @@
 
 gint bar_get_width(GtkWidget *bar);
 
+GtkWidget *bar_pane_expander_title(const gchar *title);
+
 #endif
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
--- a/src/bar_comment.c	Fri Mar 06 22:34:38 2009 +0000
+++ b/src/bar_comment.c	Sat Mar 07 10:31:30 2009 +0000
@@ -221,8 +221,7 @@
 	pcd->pane.pane_set_fd = bar_pane_comment_set_fd;
 	pcd->pane.pane_event = bar_pane_comment_event;
 	pcd->pane.pane_write_config = bar_pane_comment_write_config;
-	pcd->pane.title = gtk_label_new(title);
-	pref_label_bold(pcd->pane.title, TRUE, FALSE);
+	pcd->pane.title = bar_pane_expander_title(title);
 
 	pcd->pane.expanded = expanded;
 	
--- a/src/bar_exif.c	Fri Mar 06 22:34:38 2009 +0000
+++ b/src/bar_exif.c	Sat Mar 07 10:31:30 2009 +0000
@@ -622,8 +622,7 @@
 
 	ped->pane.pane_set_fd = bar_pane_exif_set_fd;
 	ped->pane.pane_write_config = bar_pane_exif_write_config;
-	ped->pane.title = gtk_label_new(title);
-	pref_label_bold(ped->pane.title, TRUE, FALSE);
+	ped->pane.title = bar_pane_expander_title(title);
 	ped->pane.expanded = expanded;
 
 	ped->size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
--- a/src/bar_histogram.c	Fri Mar 06 22:34:38 2009 +0000
+++ b/src/bar_histogram.c	Sat Mar 07 10:31:30 2009 +0000
@@ -333,8 +333,7 @@
 	
 	phd->pane.pane_set_fd = bar_pane_histogram_set_fd;
 	phd->pane.pane_write_config = bar_pane_histogram_write_config;
-	phd->pane.title = gtk_label_new(title);
-	pref_label_bold(phd->pane.title, TRUE, FALSE);
+	phd->pane.title = bar_pane_expander_title(title);
 
 	phd->pane.expanded = expanded;
 	phd->idle_id = -1;
--- a/src/bar_keywords.c	Fri Mar 06 22:34:38 2009 +0000
+++ b/src/bar_keywords.c	Sat Mar 07 10:31:30 2009 +0000
@@ -727,8 +727,7 @@
 	pkd->pane.pane_set_fd = bar_pane_keywords_set_fd;
 	pkd->pane.pane_event = bar_pane_keywords_event;
 	pkd->pane.pane_write_config = bar_pane_keywords_write_config;
-	pkd->pane.title = gtk_label_new(title);
-	pref_label_bold(pkd->pane.title, TRUE, FALSE);
+	pkd->pane.title = bar_pane_expander_title(title);
 
 	pkd->pane.expanded = expanded;