filepath.diff adds a 'file path' field to the 'Image Properties' dialog; I did this after some discussion between gg and myself on the importance of being able to find out the path easily. Image_metadata.diff changes the title used by the 'metadata' plugin for its window. Mainly, it's just so that there are not two different dialogs both titled 'Image Properties' available. Maybe the title should be 'File Properties' instead -- but, IMV, this is ambiguous VS 'Image properties' -- 'metadata' is the more correct term. Neither of these patches seem controversial (although they do effect translations), which is why I posted them here instead of on Bugzilla. I hope that the ML software doesn't strip off these attachments :)
Index: plug-ins/metadata/interface.c =================================================================== --- plug-ins/metadata/interface.c (revision 22834) +++ plug-ins/metadata/interface.c (working copy) @@ -653,7 +653,7 @@ gimp_ui_init (PLUG_IN_BINARY, FALSE); - mgui.dlg = gimp_dialog_new (_("Image Properties"), PLUG_IN_BINARY, + mgui.dlg = gimp_dialog_new (_("Image Metadata"), PLUG_IN_BINARY, NULL, 0, gimp_standard_help_func, EDITOR_PROC,
Index: app/widgets/gimpimagepropview.c =================================================================== --- app/widgets/gimpimagepropview.c (revision 22834) +++ app/widgets/gimpimagepropview.c (working copy) @@ -134,6 +134,9 @@ view->filename_label = gimp_image_prop_view_add_label (table, row++, _("File Name:")); + view->filepath_label = + gimp_image_prop_view_add_label (table, row++, _("File Path:")); + view->filesize_label = gimp_image_prop_view_add_label (table, row++, _("File Size:")); @@ -329,6 +332,27 @@ } static void +gimp_image_prop_view_label_set_filepath (GtkWidget *label, + GimpImage *image) +{ + const gchar *uri = gimp_object_get_name (GIMP_OBJECT (image)); + + if (uri) + { + gchar *name = file_utils_uri_display_name (uri); + gchar *path = g_path_get_dirname (name); + + gtk_label_set_text (GTK_LABEL (label), path); + g_free (path); + } + else + { + gtk_label_set_text (GTK_LABEL (label), NULL); + } +} + + +static void gimp_image_prop_view_label_set_filesize (GtkWidget *label, GimpImage *image) { @@ -424,6 +448,7 @@ gdouble unit_factor; gint unit_digits; const gchar *desc; + const gchar *path; gchar format_buf[32]; gchar buf[256]; @@ -515,9 +540,13 @@ /* filename */ gimp_image_prop_view_label_set_filename (view->filename_label, image); + /* file path */ + gimp_image_prop_view_label_set_filepath (view->filepath_label, image); + /* filesize */ gimp_image_prop_view_label_set_filesize (view->filesize_label, image); + /* filetype */ gimp_image_prop_view_label_set_filetype (view->filetype_label, image); } Index: app/widgets/gimpimagepropview.h =================================================================== --- app/widgets/gimpimagepropview.h (revision 22834) +++ app/widgets/gimpimagepropview.h (working copy) @@ -47,6 +47,7 @@ GtkWidget *resolution_label; GtkWidget *colorspace_label; GtkWidget *filename_label; + GtkWidget *filepath_label; GtkWidget *filesize_label; GtkWidget *filetype_label; GtkWidget *memsize_label;
_______________________________________________ Gimp-developer mailing list Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer