Commit d8903a24 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

added libgimpthumb.

2003-12-08  Sven Neumann  <sven@gimp.org>

	* Makefile.am (SUBDIRS): added libgimpthumb.

	* libgimpthumb/gimpthumb-utils.c
	* libgimpthumb/gimpthumbnail.c: basic functionality is implemented
	and seems to be working.

	* app/Makefile.am: link the application against libgimpthumb.

	* app/core/core-types.h: include libgimpthumb/gimpthumb-types.h.

	* app/core/gimpimagefile.[ch]: removed thumbnail handling routines
	and use libgimpthumb instead. Fixes bug #127914.

	* app/gui/file-open-dialog.c
	* app/widgets/gimpdocumentview.c: changed accordingly.
parent e6249912
2003-12-08 Sven Neumann <sven@gimp.org>
* Makefile.am (SUBDIRS): added libgimpthumb.
* libgimpthumb/gimpthumb-utils.c
* libgimpthumb/gimpthumbnail.c: basic functionality is implemented
and seems to be working.
* app/Makefile.am: link the application against libgimpthumb.
* app/core/core-types.h: include libgimpthumb/gimpthumb-types.h.
* app/core/gimpimagefile.[ch]: removed thumbnail handling routines
and use libgimpthumb instead. Fixes bug #127914.
* app/gui/file-open-dialog.c
* app/widgets/gimpdocumentview.c: changed accordingly.
2003-12-07 Dave Neary <bolsh@gimp.org>
* NEWS: Updated.
......@@ -16,6 +16,7 @@ SUBDIRS = \
libgimpcolor \
libgimpmath \
libgimpmodule \
libgimpthumb \
libgimpwidgets \
libgimp \
app \
......
......@@ -91,6 +91,7 @@ gimp_1_3_LDADD = \
$(top_builddir)/libgimpmath/libgimpmath-$(LT_RELEASE).la \
$(top_builddir)/libgimpbase/libgimpbase-$(LT_RELEASE).la \
$(top_builddir)/libgimpmodule/libgimpmodule-$(LT_RELEASE).la \
$(top_builddir)/libgimpthumb/libgimpthumb-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(LIBART_LIBS) \
......@@ -121,6 +122,7 @@ gimp_console_1_3_LDADD = \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(top_builddir)/libgimpmath/libgimpmath-$(LT_RELEASE).la \
$(top_builddir)/libgimpbase/libgimpbase-$(LT_RELEASE).la \
$(top_builddir)/libgimpthumb/libgimpthumb-$(LT_RELEASE).la \
$(top_builddir)/libgimpmodule/libgimpmodule-$(LT_RELEASE).la \
$(GDK_PIXBUF_LIBS) \
$(LIBART_LIBS) \
......
......@@ -22,6 +22,7 @@
#include "libgimpmath/gimpmath.h"
#include "libgimpmodule/gimpmoduletypes.h"
#include "libgimpthumb/gimpthumb-types.h"
#include "base/base-types.h"
......
This diff is collapsed.
......@@ -27,25 +27,9 @@
#define __GIMP_IMAGEFILE_H__
#include <time.h> /* time_t */
#include "gimpviewable.h"
typedef enum
{
GIMP_IMAGEFILE_STATE_UNKNOWN,
GIMP_IMAGEFILE_STATE_REMOTE,
GIMP_IMAGEFILE_STATE_NOT_FOUND,
GIMP_IMAGEFILE_STATE_EXISTS,
GIMP_IMAGEFILE_STATE_THUMBNAIL_NOT_FOUND,
GIMP_IMAGEFILE_STATE_THUMBNAIL_EXISTS,
GIMP_IMAGEFILE_STATE_THUMBNAIL_OLD,
GIMP_IMAGEFILE_STATE_THUMBNAIL_FAILED,
GIMP_IMAGEFILE_STATE_THUMBNAIL_OK
} GimpImagefileState;
#define GIMP_TYPE_IMAGEFILE (gimp_imagefile_get_type ())
#define GIMP_IMAGEFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGEFILE, GimpImagefile))
#define GIMP_IMAGEFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGEFILE, GimpImagefileClass))
......@@ -61,17 +45,7 @@ struct _GimpImagefile
GimpViewable parent_instance;
Gimp *gimp;
GimpImagefileState state;
time_t image_mtime;
gssize image_size;
gint width;
gint height;
GimpImageType type;
gint n_layers;
GimpThumbnail *thumbnail;
gchar *description;
gboolean static_desc;
};
......
......@@ -35,6 +35,7 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpthumb/gimpthumb.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
......@@ -440,7 +441,7 @@ file_open_create_thumbnail (Gimp *gimp,
gimp_imagefile_update (imagefile, size);
gimp_viewable_get_preview (GIMP_VIEWABLE (imagefile), size, size);
if (imagefile->state < GIMP_IMAGEFILE_STATE_THUMBNAIL_FAILED)
if (imagefile->thumbnail->thumb_state < GIMP_THUMB_STATE_FAILED)
gimp_imagefile_create_thumbnail (imagefile, size);
}
......
......@@ -35,6 +35,7 @@
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "libgimpthumb/gimpthumb.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
......@@ -440,7 +441,7 @@ file_open_create_thumbnail (Gimp *gimp,
gimp_imagefile_update (imagefile, size);
gimp_viewable_get_preview (GIMP_VIEWABLE (imagefile), size, size);
if (imagefile->state < GIMP_IMAGEFILE_STATE_THUMBNAIL_FAILED)
if (imagefile->thumbnail->thumb_state < GIMP_THUMB_STATE_FAILED)
gimp_imagefile_create_thumbnail (imagefile, size);
}
......
......@@ -25,6 +25,7 @@
#include <gtk/gtk.h>
#include "libgimpthumb/gimpthumb.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "widgets-types.h"
......@@ -375,7 +376,7 @@ gimp_document_view_delete_dangling_foreach (GimpImagefile *imagefile,
{
gimp_imagefile_update (imagefile, container_view->preview_size);
if (imagefile->state == GIMP_IMAGEFILE_STATE_NOT_FOUND)
if (imagefile->thumbnail->image_state == GIMP_THUMB_STATE_NOT_FOUND)
{
gimp_container_remove (container_view->container,
GIMP_OBJECT (imagefile));
......
......@@ -81,7 +81,8 @@ gimp_thumb_init (const gchar *creator,
enum_class = g_type_class_ref (GIMP_TYPE_THUMB_SIZE);
thumb_num_sizes = enum_class->n_values;
thumb_subdirs = g_new (gchar *, thumb_num_sizes);
thumb_sizes = g_new (gint, thumb_num_sizes);
thumb_subdirs = g_new (gchar *, thumb_num_sizes);
for (i = 0, enum_value = enum_class->values;
i < enum_class->n_values;
......@@ -167,8 +168,8 @@ gimp_thumb_name_from_uri (const gchar *uri,
}
gchar *
gimp_thumb_find_png_thumb (const gchar *uri,
GimpThumbSize *size)
gimp_thumb_find_thumb (const gchar *uri,
GimpThumbSize *size)
{
const gchar *name;
gchar *thumb_name;
......
EXPORTS
gimp_thumb_ensure_thumb_dirs
gimp_thumb_error_quark
gimp_thumb_file_test
gimp_thumb_find_thumb
gimp_thumb_init
gimp_thumb_name_from_uri
gimp_thumb_size_get_type
gimp_thumb_state_get_type
gimp_thumbnail_get_type
gimp_thumbnail_load_thumb
gimp_thumbnail_new
gimp_thumbnail_peek_image
gimp_thumbnail_peek_thumb
gimp_thumbnail_save_failure
gimp_thumbnail_save_thumb
gimp_thumbnail_set_filename
gimp_thumbnail_set_uri
......@@ -362,6 +362,17 @@ gimp_thumbnail_set_uri (GimpThumbnail *thumbnail,
{
g_return_if_fail (GIMP_IS_THUMBNAIL (thumbnail));
if (thumbnail->image_uri)
g_free (thumbnail->image_uri);
thumbnail->image_uri = g_strdup (uri);
if (thumbnail->image_filename)
{
g_free (thumbnail->image_filename);
thumbnail->image_filename = NULL;
}
g_object_set (thumbnail,
"image-state", GIMP_THUMB_STATE_UNKNOWN,
"image-filesize", 0,
......@@ -434,7 +445,8 @@ gimp_thumbnail_update_image (GimpThumbnail *thumbnail)
gint64 filesize = 0;
gint64 mtime = 0;
g_return_if_fail (thumbnail->image_uri != NULL);
if (! thumbnail->image_uri)
return;
state = thumbnail->image_state;
......@@ -503,6 +515,7 @@ gimp_thumbnail_update_thumb (GimpThumbnail *thumbnail)
switch (state)
{
case GIMP_THUMB_STATE_UNKNOWN:
case GIMP_THUMB_STATE_NOT_FOUND:
g_return_if_fail (thumbnail->thumb_filename == NULL);
thumbnail->thumb_filename =
......@@ -583,7 +596,6 @@ gimp_thumbnail_load_thumb (GimpThumbnail *thumbnail,
GdkPixbuf *pixbuf;
g_return_val_if_fail (GIMP_IS_THUMBNAIL (thumbnail), NULL);
g_return_val_if_fail (thumbnail->image_uri != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
if (! thumbnail->image_uri)
......@@ -763,8 +775,6 @@ gimp_thumbnail_read_thumb (GimpThumbnail *thumbnail,
gint64 image_mtime;
gint64 image_size;
g_return_val_if_fail (thumbnail->thumb_state < GIMP_THUMB_STATE_EXISTS, NULL);
state = GIMP_THUMB_STATE_NOT_FOUND;
name = gimp_thumb_find_thumb (thumbnail->image_uri, &thumb_size);
......@@ -815,7 +825,7 @@ gimp_thumbnail_read_thumb (GimpThumbnail *thumbnail,
cleanup:
if (state != thumbnail->thumb_state)
g_object_set (thumbnail, "state", state, NULL);
g_object_set (thumbnail, "thumb-state", state, NULL);
if (pixbuf && state != GIMP_THUMB_STATE_OK)
{
......
2003-12-08 Sven Neumann <sven@gimp.org>
* POTFILES.in: added files from libgimpthumb.
* de.po: minor updates to the german translation.
2003-12-07 Marco Ciampa <ciampix@libero.it>
* it.po: Updated italian translation
......
......@@ -14,6 +14,9 @@ libgimpbase/gimputils.c
libgimpmodule/gimpmodule.c
libgimpthumb/gimpthumb-utils.c
libgimpthumb/gimpthumbnail.c
libgimpwidgets/gimpcolorbutton.c
libgimpwidgets/gimpcolorscales.c
libgimpwidgets/gimpcolorselect.c
......
......@@ -8,11 +8,11 @@
#
msgid ""
msgstr ""
"Project-Id-Version: GIMP 1.3.17\n"
"Project-Id-Version: GIMP 1.3.24\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-11-24 01:38+0100\n"
"PO-Revision-Date: 2003-11-15 13:55+0100\n"
"Last-Translator: Michael Natterer <mitch@gimp.org>\n"
"POT-Creation-Date: 2003-12-08 10:08+0100\n"
"PO-Revision-Date: 2003-12-08 10:10+0100\n"
"Last-Translator: Sven Neumann <sven@gimp.org>\n"
"Language-Team: German <gnome-de@gnome.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
......@@ -59,9 +59,9 @@ msgid "%s can't handle transparency"
msgstr "%s kennt keine Transparenz"
#: libgimp/gimpexport.c:269
#, fuzzy, c-format
#, c-format
msgid "%s can't handle layer masks"
msgstr "%s kennt keine Ebenen"
msgstr "%s kennt keine Ebenenmasken"
#: libgimp/gimpexport.c:270
msgid "Apply Layer Masks"
......@@ -99,12 +99,11 @@ msgstr ""
"(Für bessere Resultate, diesen Schritt manuell durchführen)"
#: libgimp/gimpexport.c:306
#, fuzzy, c-format
#, c-format
msgid "%s can only handle bitmap (two color) indexed images"
msgstr "%s kennt nur RGB und indizierte Paletten"
msgstr "%s kennt nur Bitmaps (indizierte Palette mit 2 Farben)"
#: libgimp/gimpexport.c:307
#, fuzzy
msgid ""
"Convert to Indexed using bitmap default settings\n"
"(Do it manually to tune the result)"
......@@ -310,6 +309,11 @@ msgstr "Laden fehlgeschlagen"
msgid "Not loaded"
msgstr "Nicht geladen"
#: libgimpthumb/gimpthumb-utils.c:130
#, c-format
msgid "Failed to create thumbnail folder '%s'."
msgstr ""
#: libgimpwidgets/gimpcolorbutton.c:93
msgid "/_Foreground Color"
msgstr "/_Vordergrundfarbe"
......@@ -411,15 +415,15 @@ msgstr "Verzeichnis auswählen"
msgid "Select File"
msgstr "Datei auswählen"
#: libgimpwidgets/gimpmemsizeentry.c:233
#: libgimpwidgets/gimpmemsizeentry.c:234
msgid "KiloBytes"
msgstr "KiloByte"
#: libgimpwidgets/gimpmemsizeentry.c:234
#: libgimpwidgets/gimpmemsizeentry.c:235
msgid "MegaBytes"
msgstr "MegaByte"
#: libgimpwidgets/gimpmemsizeentry.c:235
#: libgimpwidgets/gimpmemsizeentry.c:236
msgid "GigaBytes"
msgstr "GigaByte"
......@@ -537,9 +541,8 @@ msgid "Color Deficient Vision"
msgstr "Farbenblindheit"
#: modules/cdisplay_colorblind.c:464
#, fuzzy
msgid "Color _Deficiency Type:"
msgstr "Art der Sehschwäche:"
msgstr "Art der _Sehschwäche:"
#: modules/cdisplay_colorblind.c:473
msgid "Protanopia (insensitivity to red)"
......@@ -562,9 +565,8 @@ msgid "Gamma"
msgstr "Gamma"
#: modules/cdisplay_gamma.c:311
#, fuzzy
msgid "_Gamma:"
msgstr "Gamma:"
msgstr "_Gamma:"
#: modules/cdisplay_highcontrast.c:90
msgid "High Contrast color display filter"
......@@ -575,9 +577,8 @@ msgid "Contrast"
msgstr "Kontrast"
#: modules/cdisplay_highcontrast.c:308
#, fuzzy
msgid "Contrast C_ycles:"
msgstr "Kontrastverstärkung:"
msgstr "Kontrast_verstärkung:"
#: modules/cdisplay_proof.c:102
msgid "Color proof filter using ICC color profile"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment