Make libexif an optional requirement now. You do not have to have it to use ephoto.

SVN revision: 28763
This commit is contained in:
titan 2007-03-16 04:34:22 +00:00 committed by titan
parent a7ced3b637
commit 594787580b
6 changed files with 37 additions and 19 deletions

View File

@ -73,11 +73,19 @@ AC_CHECK_HEADERS(sqlite3.h,
)
AC_SUBST(SQLITE_LIBS)
AC_CHECK_HEADERS(libexif/exif-data.h,
EXIF_LIBS="$EXIF_LIBS -lexif",
AC_MSG_ERROR([Ephoto needs libexif to compile.])
)
AC_SUBST(EXIF_LIBS)
if pkg-config --exists 'sqlite3 >= 3.3'; then
have_sqlite3="Yes"
else
have_sqlite3="No"
AC_MSG_ERROR([Ephoto needs sqlite3 to compile.])
fi
if pkg-config --exists 'libexif >= 0.6.13'; then
have_exif="Yes"
AC_DEFINE(BUILD_EXIF_SUPPORT, 1, [Enable Exif Support])
else
have_exif="No"
fi
PROG="evas-config";
AC_PATH_PROG(EVAS_CONFIG, $PROG, "", $PATH)
@ -182,8 +190,8 @@ echo " Ecore ...........: Yes"
echo " Edje ............: Yes"
echo " Epsilon .........: Yes"
echo " EWL .............: Yes"
echo " Libexif .........: Yes"
echo " Sqlite3 .........: Yes"
echo " Libexif .........: $have_exif"
echo " Sqlite3 .........: $have_sqlite3"
echo
echo "Installation Path.........: $prefix"
echo

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-15 07:12-0600\n"
"POT-Creation-Date: 2007-03-15 17:29-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -15,22 +15,22 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/bin/ephoto_utils.c:43
#: src/bin/ephoto_utils.c:9
#, c-format
msgid "%'.0f Bytes"
msgstr ""
#: src/bin/ephoto_utils.c:47
#: src/bin/ephoto_utils.c:13
#, c-format
msgid "%'.0f KB"
msgstr ""
#: src/bin/ephoto_utils.c:51
#: src/bin/ephoto_utils.c:17
#, c-format
msgid "%'.0f MB"
msgstr ""
#: src/bin/ephoto_utils.c:55
#: src/bin/ephoto_utils.c:21
#, c-format
msgid "%'.1f GB"
msgstr ""

View File

@ -1,5 +1,8 @@
/* src/bin/config.h.in. Generated from configure.in by autoheader. */
/* Enable Exif Support */
#undef BUILD_EXIF_SUPPORT
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
@ -20,9 +23,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <libexif/exif-data.h> header file. */
#undef HAVE_LIBEXIF_EXIF_DATA_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

View File

@ -8,8 +8,10 @@
#include <Evas.h>
#include <Ewl.h>
#include <fnmatch.h>
#ifdef BUILD_EXIF_SUPPORT
#include <libexif/exif-data.h>
#include <libexif/exif-loader.h>
#endif
#include <libgen.h>
#include <limits.h>
#include <sqlite3.h>
@ -47,8 +49,10 @@ Ecore_List *get_directories(const char *directory);
Ecore_List *get_images(const char *directory);
/* Ephoto Exif */
#ifdef BUILD_EXIF_SUPPORT
Ecore_Hash *get_exif_data(const char *file);
void display_exif_dialog(Ewl_Widget *w, void *event, void *data);
#endif
/* Ephoto Databasing */
sqlite3 *ephoto_db_init(void);

View File

@ -1,5 +1,6 @@
#include "ephoto.h"
#ifdef BUILD_EXIF_SUPPORT
static const char *get_image(void);
static void close_dialog(Ewl_Widget *w, void *event, void *data);
static void add_exif_to_container(Ewl_Widget *w, void *event, void *data);
@ -186,4 +187,4 @@ void display_exif_dialog(Ewl_Widget *w, void *event, void *data)
return;
}
#endif

View File

@ -116,7 +116,7 @@ void create_main_gui(void)
ewl_container_child_append(EWL_CONTAINER(vbox), hsep);
ewl_widget_show(hsep);
em->toolbar = ewl_toolbar_new();
em->toolbar = ewl_htoolbar_new();
ewl_box_spacing_set(EWL_BOX(em->toolbar), 5);
ewl_object_minimum_h_set(EWL_OBJECT(em->toolbar), 30);
ewl_object_alignment_set(EWL_OBJECT(em->toolbar), EWL_FLAG_ALIGN_CENTER);
@ -140,10 +140,15 @@ void create_main_gui(void)
ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep);
ewl_widget_show(vsep);
button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/get_exif.png", display_exif_dialog, NULL);
button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/get_exif.png", NULL, NULL);
ewl_image_size_set(EWL_IMAGE(EWL_BUTTON(button)->image_object), 30, 30);
ewl_attach_tooltip_text_set(button, "You do not have libexif 0.6.13");
#ifdef BUILD_EXIF_SUPPORT
ewl_callback_append(button, EWL_CALLBACK_CLICKED, display_exif_dialog, NULL);
ewl_attach_tooltip_text_set(button, "View Exif Data");
button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/stock_fullscreen.png", window_fullscreen, NULL);
#endif
button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/stock_fullscreen.png", window_fullscreen, NULL);
ewl_image_size_set(EWL_IMAGE(EWL_BUTTON(button)->image_object), 30, 30);
ewl_attach_tooltip_text_set(button, "Toggle Fullscreen");