|
51 | 51 | #include <exempi/xmpconsts.h> |
52 | 52 | #endif |
53 | 53 |
|
54 | | -#if HAVE_EXIF || HAVE_EXEMPI |
| 54 | +/* There's no exempi support in the sidebar yet */ |
| 55 | +#if HAVE_EXIF /*|| HAVE_EXEMPI */ |
55 | 56 | #define HAVE_METADATA 1 |
56 | 57 | #endif |
57 | 58 |
|
@@ -82,6 +83,8 @@ struct _EomMetadataSidebarPrivate { |
82 | 83 | GtkWidget *model_label; |
83 | 84 | GtkWidget *date_label; |
84 | 85 | GtkWidget *time_label; |
| 86 | +#else |
| 87 | + GtkWidget *metadata_grid; |
85 | 88 | #endif |
86 | 89 |
|
87 | 90 | #if HAVE_METADATA |
@@ -166,18 +169,14 @@ static void |
166 | 169 | eom_metadata_sidebar_update_metadata_section (EomMetadataSidebar *sidebar) |
167 | 170 | { |
168 | 171 | EomMetadataSidebarPrivate *priv = sidebar->priv; |
169 | | - EomImage *img = priv->image; |
170 | 172 | #if HAVE_EXIF |
| 173 | + EomImage *img = priv->image; |
171 | 174 | ExifData *exif_data = NULL; |
172 | | -#endif |
173 | 175 |
|
174 | 176 | if (img) { |
175 | | -#if HAVE_EXIF |
176 | 177 | exif_data = eom_image_get_exif_info (img); |
177 | | -#endif |
178 | 178 | } |
179 | 179 |
|
180 | | -#if HAVE_EXIF |
181 | 180 | eom_exif_util_set_label_text (GTK_LABEL (priv->aperture_label), |
182 | 181 | exif_data, EXIF_TAG_FNUMBER); |
183 | 182 | eom_exif_util_set_label_text (GTK_LABEL (priv->exposure_label), |
@@ -356,6 +355,18 @@ eom_metadata_sidebar_init (EomMetadataSidebar *sidebar) |
356 | 355 | g_signal_connect (priv->details_button, "clicked", |
357 | 356 | G_CALLBACK (_details_button_clicked_cb), sidebar); |
358 | 357 | #endif /* HAVE_METADATA */ |
| 358 | + |
| 359 | +#ifndef HAVE_EXIF |
| 360 | + { |
| 361 | + /* Remove the lower 8 lines as they are empty without libexif*/ |
| 362 | + guint i; |
| 363 | + |
| 364 | + for (i = 11; i > 3; i--) |
| 365 | + { |
| 366 | + gtk_grid_remove_row (GTK_GRID (priv->metadata_grid), i); |
| 367 | + } |
| 368 | + } |
| 369 | +#endif /* !HAVE_EXIF */ |
359 | 370 | } |
360 | 371 |
|
361 | 372 | static void |
@@ -472,6 +483,10 @@ eom_metadata_sidebar_class_init (EomMetadataSidebarClass *klass) |
472 | 483 | gtk_widget_class_bind_template_child_private (widget_class, |
473 | 484 | EomMetadataSidebar, |
474 | 485 | time_label); |
| 486 | +#else |
| 487 | + gtk_widget_class_bind_template_child_private (widget_class, |
| 488 | + EomMetadataSidebar, |
| 489 | + metadata_grid); |
475 | 490 | #endif /* HAVE_EXIF */ |
476 | 491 | #if HAVE_METADATA |
477 | 492 | gtk_widget_class_bind_template_child_private (widget_class, |
|
0 commit comments