changeset 1427:c449a9344c8e

show file name in advanced_exif
author nadvornik
date Fri, 13 Mar 2009 12:06:01 +0000
parents cd88fe4e5588
children 3019f5d3a3c7
files src/advanced_exif.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/advanced_exif.c	Fri Mar 13 10:36:32 2009 +0000
+++ b/src/advanced_exif.c	Fri Mar 13 12:06:01 2009 +0000
@@ -43,6 +43,7 @@
 	GtkWidget *vbox;
 	GtkWidget *scrolled;
 	GtkWidget *listview;
+	GtkWidget *label_file_name;
 
 	FileData *fd;
 };
@@ -158,6 +159,8 @@
 	file_data_unref(ew->fd);
 	ew->fd = file_data_ref(fd);
 
+	gtk_label_set_text(GTK_LABEL(ew->label_file_name), (ew->fd) ? ew->fd->path : "");
+
 	advanced_exif_clear(ew);
 	advanced_exif_update(ew);
 }
@@ -362,6 +365,7 @@
 	GtkListStore *store;
 	GdkGeometry geometry;
 	GtkTreeSortable *sortable;
+	GtkWidget *box;
 	gint n;
 
 	ew = g_new0(ExifWin, 1);
@@ -382,6 +386,18 @@
 	gtk_container_add(GTK_CONTAINER(ew->window), ew->vbox);
 	gtk_widget_show(ew->vbox);
 
+	box = gtk_hbox_new(FALSE, 0);
+
+	ew->label_file_name = gtk_label_new("");
+	gtk_label_set_ellipsize(GTK_LABEL(ew->label_file_name), PANGO_ELLIPSIZE_START);
+	gtk_label_set_selectable(GTK_LABEL(ew->label_file_name), TRUE);
+	gtk_misc_set_alignment(GTK_MISC(ew->label_file_name), 0.5, 0.5);
+	gtk_box_pack_start(GTK_BOX(box), ew->label_file_name, TRUE, TRUE, 0);
+	gtk_widget_show(ew->label_file_name);
+
+	gtk_box_pack_start(GTK_BOX(ew->vbox), box, FALSE, FALSE, 0);
+	gtk_widget_show(box);
+
 
 	store = gtk_list_store_new(7, G_TYPE_BOOLEAN,
 				      G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,