Commit 2f45def9 authored by Paolo Bacchilega's avatar Paolo Bacchilega Committed by Paolo Bacchilega

removed removed removed removed

2007-01-22  Paolo Bacchilega  <paobac@cvs.gnome.org>

	* data/GNOME_GThumb.server.in.in: removed
	* src/GNOME_GThumb.idl: removed
	* src/gth-application.c: removed
	* src/gth-application.h: removed
	* data/Makefile.am:
	* libgthumb/Makefile.am:
	* libgthumb/jpegutils/Makefile.am:
	* po/POTFILES.in:
	* src/gth-viewer.c:
	* src/gth-window.c:
	* src/main.c:
	* src/main.h:
	* src/Makefile.am:
	* configure.in:
	* README:

	Use GtkUnique to provide a single instance application.
	Removed the bonobo dependency (#389197).

svn path=/trunk/; revision=1279
parent 832c2160
2007-01-22 Paolo Bacchilega <paobac@cvs.gnome.org>
* data/GNOME_GThumb.server.in.in: removed
* src/GNOME_GThumb.idl: removed
* src/gth-application.c: removed
* src/gth-application.h: removed
* data/Makefile.am:
* libgthumb/Makefile.am:
* libgthumb/jpegutils/Makefile.am:
* po/POTFILES.in:
* src/gth-viewer.c:
* src/gth-window.c:
* src/main.c:
* src/main.h:
* src/Makefile.am:
* configure.in:
* README:
Use GtkUnique to provide a single instance application.
Removed the bonobo dependency (#389197).
2007-01-21 Paolo Bacchilega <paobac@cvs.gnome.org>
* src/gth-browser.c: use pack_end to add the filterbar, this way the
......
This is the distribution of gThumb, an image viewer and browser utility
for the GNOME environment.
for the GNOME environment.
Notes:
......@@ -7,13 +7,13 @@ Notes:
* versions from 1.100 to 2.0 are for the GNOME 2.0 environment, though
they can be used even in the GNOME 2.2 environment but in this case
gThumb and Nautilus do not share the thumbnails database.
gThumb and Nautilus do not share the thumbnails database.
* versions 2.2.0 to 2.4.2 are for GNOME 2.2 and GNOME 2.4.
* versions 2.5 and higher are for GNOME 2.6.
* more information about gthumb can be found at:
* more information about gthumb can be found at:
http://gthumb.sourceforge.net
What is gThumb
......@@ -31,8 +31,8 @@ What is gThumb
* gThumb is an image viewer
+ View single images (including GIF animations). Supported image
types are: BMP, JPEG, GIF, PNG, TIFF, TGA, ICO, XPM.
+ View EXIF data attached to JPEG images.
types are: BMP, JPEG, GIF, PNG, TIFF, TGA, ICO, XPM.
+ View EXIF data attached to JPEG images.
+ View in fullscreen mode.
+ View images rotated, flipped, mirrored.
......@@ -47,7 +47,7 @@ What is gThumb
* gThumb is an image editor
+ Change image hue, saturation, lightness, contrast and adjust colors.
+ Change image hue, saturation, lightness, contrast and adjust colors.
+ Scale and rotate images.
+ Save images in the following formats: JPEG, PNG, TIFF, TGA.
......@@ -68,7 +68,7 @@ Licensing
=========
This program is released under the terms of the GNU General Public
License (GNU GPL).
License (GNU GPL).
You can find a copy of the license in the file COPYING.
......@@ -76,29 +76,28 @@ Compiling
=========
In order to build this program you need a working GNOME environment
version 2 or greater, with the development tools installed properly.
version 2 or greater, with the development tools installed properly.
The following is the detailed list of libraries you need:
* glib version >= 2.6.0
* gtk version >= 2.8.0
* gtk version >= 2.8.0
* libxml version >= 2.4.0
* libgnome version >= 2.6.0
* libgnomeui version >= 2.6.0
* libgnomecanvas version >= 2.6.0
* gnome-vfs version >= 2.6.0
* libglade version >= 2.4.0
* libgnome version >= 2.6.0
* libgnomeui version >= 2.6.0
* libgnomecanvas version >= 2.6.0
* gnome-vfs version >= 2.6.0
* libglade version >= 2.4.0
* libgnomeprint version >= 2.6.0
* libgnomeprintui version >= 2.6.0
* libbonobo version >= 2.6.0
* libbonoboui version >= 2.6.0
* intltool version >= 0.35.0
* libexif version >= 0.6.9
* libjpeg
* gtkunique version >= 0.9.1
If the libtiff library is present you can save images in TIFF
format.
If the libgphoto2 library version >= 2.1.3 is present you can import
If the libgphoto2 library version >= 2.1.3 is present you can import
photos from your camera.
If the libiptc library version >= 0.2.1 is present you can store
......@@ -107,7 +106,7 @@ Compiling
Download
========
* Tar archives can be found here:
* Tar archives can be found here:
http://ftp.gnome.org/pub/GNOME/sources/gthumb
......
......@@ -30,11 +30,10 @@ LIBGNOMEUI_REQUIRED=2.6.0
LIBGNOMECANVAS_REQUIRED=2.6.0
GNOME_VFS_REQUIRED=2.6.0
LIBGLADE_REQUIRED=2.4.0
LIBBONOBO_REQUIRED=2.6.0
LIBBONOBOUI_REQUIRED=2.6.0
LIBEXIF_REQUIRED=0.6.13
LIBIPTCDATA_REQUIRED=0.2.1
LIBGPHOTO_REQUIRED=2.1.3
GTKUNIQUE=0.9.1
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
......@@ -44,16 +43,13 @@ AC_SUBST(LIBGNOMEUI_REQUIRED)
AC_SUBST(LIBGNOMECANVAS_REQUIRED)
AC_SUBST(GNOME_VFS_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
AC_SUBST(LIBBONOBO_REQUIRED)
AC_SUBST(LIBBONOBOUI_REQUIRED)
AC_SUBST(LIBEXIF_REQUIRED)
AC_SUBST(LIBIPTCDATA_REQUIRED)
AC_SUBST(LIBGPHOTO_REQUIRED)
AC_SUBST(GTKUNIQUE_REQUIRED)
dnl ===========================================================================
AM_PATH_ORBIT2
PKG_CHECK_MODULES(GTHUMB, \
glib-2.0 >= $GLIB_REQUIRED \
gthread-2.0 \
......@@ -66,7 +62,8 @@ PKG_CHECK_MODULES(GTHUMB, \
gnome-vfs-module-2.0 \
libexif >= $LIBEXIF_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
libglade-2.0 >= $LIBGLADE_REQUIRED)
libglade-2.0 >= $LIBGLADE_REQUIRED \
gtkunique-1.0 >= $GTKUNIQUE)
AC_SUBST(GTHUMB_LIBS)
AC_SUBST(GTHUMB_CFLAGS)
......@@ -230,12 +227,6 @@ fi
dnl ###############################################
IDL_MODULES="bonobo-activation-2.0 libbonobo-2.0 libbonoboui-2.0"
IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $IDL_MODULES | $srcdir/add-include-prefix`"
AC_SUBST(IDL_INCLUDES)
dnl ###############################################
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
......
<oaf_info>
<oaf_server iid="OAFIID:GNOME_GThumb_Application_Factory" type="exe" location="goo">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/ObjectFactory:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" _value="GThumb Application Factory"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_GThumb_Application" type="factory" location="OAFIID:GNOME_GThumb_Application_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
<item value="IDL:GNOME/Goobox/Application:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" _value="GThumb Application"/>
</oaf_server>
</oaf_info>
......@@ -32,14 +32,6 @@ schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
bonobodir = $(libdir)/bonobo
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_GThumb.server.in.in
server_DATA = $(server_in_files:.server.in.in=.server)
$(server_in_files:.server.in.in=.server.in): $(server_in_files)
sed -e "s|\@BONOBODIR\@|$(bonobodir)|" $< > $@
@INTLTOOL_SERVER_RULE@
if GCONF_SCHEMAS_INSTALL
install-data-local:
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/data/$(schema_DATA)
......@@ -52,13 +44,8 @@ EXTRA_DIST = \
$(desktop_in_files) \
$(desktop_DATA) \
$(icon_DATA) \
$(man_MANS) \
$(server_in_files)
$(man_MANS)
DISTCLEANFILES = \
$(schema_DATA) \
$(desktop_DATA) \
$(server_DATA) \
GNOME_GThumb.server.in \
GNOME_GThumb.server
$(desktop_DATA)
......@@ -2,7 +2,7 @@ SUBDIRS = icons cursors jpegutils
DIST_SUBDIRS = icons cursors jpegutils
if ENABLE_DEPRECATIONS
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
else
DISABLE_DEPRECATED =
endif
......
if ENABLE_DEPRECATIONS
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
else
DISABLE_DEPRECATED =
endif
......
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
data/GNOME_GThumb.server.in.in
data/albumthemes/text.h
data/glade/gthumb.glade
data/glade/gthumb_camera.glade
......@@ -153,8 +152,6 @@ src/dlg-web-exporter.c
src/dlg-web-exporter.h
src/dlg-write-to-cd.c
src/dlg-write-to-cd.h
src/gth-application.c
src/gth-application.h
src/gth-batch-op.c
src/gth-browser-actions-callbacks.c
src/gth-browser-actions-callbacks.h
......
#include <Bonobo.idl>
module GNOME {
module GThumb {
interface Application : Bonobo::Unknown {
oneway void open_browser (in string uri);
oneway void open_viewer (in string uri);
oneway void load_image (in string uri);
oneway void import_photos ();
};
};
};
......@@ -4,7 +4,7 @@ DIST_SUBDIRS = icons
gladedir = $(datadir)/gthumb/glade
if ENABLE_DEPRECATIONS
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED
DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
else
DISABLE_DEPRECATED =
endif
......@@ -20,26 +20,13 @@ INCLUDES = \
-DGTHUMB_DATADIR=\"$(datadir)\" \
-DGTHUMB_LIBDIR=\"$(libdir)\" \
-DPIXMAPSDIR=\""$(datadir)/pixmaps/"\" \
-DBONOBO_UIDIR=\""$(uidir)/"\" \
-DGTHUMB_GLADEDIR=\""$(gladedir)"\" \
-I$(top_srcdir)/libgthumb \
-I../libgthumb
bin_PROGRAMS = gthumb
gnome_gthumb_idl_sources = \
GNOME_GThumb-stubs.c \
GNOME_GThumb-skels.c \
GNOME_GThumb.h \
GNOME_GThumb-common.c
$(gnome_gthumb_idl_sources): gnome_gthumb_idl_stamp
gnome_gthumb_idl_stamp: GNOME_GThumb.idl $(ORBIT_IDL)
$(ORBIT_IDL) $(IDL_INCLUDES) $<
touch $@
gthumb_SOURCES = \
$(gnome_gthumb_idl_sources) \
bookmark-list.c \
bookmark-list.h \
catalog-list.c \
......@@ -88,8 +75,6 @@ gthumb_SOURCES = \
dlg-write-to-cd.h \
gs-fade.c \
gs-fade.h \
gth-application.c \
gth-application.h \
gth-batch-op.c \
gth-batch-op.h \
gth-browser.c \
......@@ -214,13 +199,7 @@ libphotoimporter_la_LIBADD = $(top_builddir)/libgthumb/jpegutils/libgthumb-jpeg
libphotoimporter_la_DEPENDENCIES = gthumb$(EXEEXT)
EXTRA_DIST = \
GNOME_GThumb.idl \
albumtheme.c \
albumtheme.y \
albumtheme.l \
lex.albumtheme.c
CLEANFILES = \
$(gnome_gthumb_idl_sources) \
gnome_gthumb_idl_stamp
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* GThumb
*
* Copyright (C) 2005 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*/
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <gdk/gdkx.h>
#include <bonobo/bonobo-generic-factory.h>
#include "gth-application.h"
#include "gth-browser.h"
#include "gth-viewer.h"
#include "gth-browser-actions-callbacks.h"
#include "main.h"
static BonoboObject *
gth_application_factory (BonoboGenericFactory *this_factory,
const char *iid,
gpointer user_data)
{
if (strcmp (iid, "OAFIID:GNOME_GThumb_Application") != 0)
return NULL;
else
return BONOBO_OBJECT (g_object_new (GTH_TYPE_APPLICATION, NULL));
}
BonoboObject *
gth_application_new (GdkScreen *screen)
{
BonoboGenericFactory *factory;
char *display_name;
char *registration_id;
display_name = gdk_screen_make_display_name (screen);
registration_id = bonobo_activation_make_registration_id ("OAFIID:GNOME_GThumb_Application_Factory", display_name);
factory = bonobo_generic_factory_new (registration_id,
gth_application_factory,
NULL);
g_free (display_name);
g_free (registration_id);
return BONOBO_OBJECT (factory);
}
static void
show_grabbing_focus (GtkWidget *new_window)
{
const char *startup_id = NULL;
guint32 timestamp = 0;
gtk_widget_realize (new_window);
startup_id = g_getenv ("DESKTOP_STARTUP_ID");
if (startup_id != NULL) {
char *startup_id_str = g_strdup (startup_id);
char *ts;
ts = g_strrstr (startup_id_str, "_TIME");
if (ts != NULL) {
ts = ts + 5;
errno = 0;
timestamp = strtoul (ts, NULL, 0);
if ((errno == EINVAL) || (errno == ERANGE))
timestamp = 0;
}
g_free (startup_id_str);
}
if (timestamp == 0)
timestamp = gdk_x11_get_server_time (new_window->window);
gdk_x11_window_set_user_time (new_window->window, timestamp);
gtk_window_present (GTK_WINDOW (new_window));
}
static void
impl_gth_application_open_browser (PortableServer_Servant _servant,
const CORBA_char *uri,
CORBA_Environment *ev)
{
if (*uri == '\0')
uri = NULL;
show_grabbing_focus (gth_browser_new (uri));
}
static void
impl_gth_application_open_viewer (PortableServer_Servant _servant,
const CORBA_char *uri,
CORBA_Environment *ev)
{
if (*uri == '\0')
uri = NULL;
show_grabbing_focus (gth_viewer_new (uri));
}
static void
impl_gth_application_load_image (PortableServer_Servant _servant,
const CORBA_char *uri,
CORBA_Environment *ev)
{
if (*uri == '\0')
uri = NULL;
if (UseViewer) {
GtkWidget *viewer = gth_viewer_get_current_viewer ();
if (viewer == NULL)
show_grabbing_focus (gth_viewer_new (uri));
else {
gth_viewer_load (GTH_VIEWER (viewer), uri);
show_grabbing_focus (viewer);
}
} else {
GtkWidget *browser = gth_browser_get_current_browser ();
if (browser == NULL)
show_grabbing_focus (gth_browser_new (uri));
else {
gth_browser_load_uri (GTH_BROWSER (browser), uri);
show_grabbing_focus (browser);
}
}
}
static void
impl_gth_application_import_photos (PortableServer_Servant _servant,
CORBA_Environment *ev)
{
gth_browser_activate_action_file_camera_import (NULL, NULL);
}
static void
gth_application_class_init (GthApplicationClass *klass)
{
POA_GNOME_GThumb_Application__epv *epv = &klass->epv;
epv->open_browser = impl_gth_application_open_browser;
epv->open_viewer = impl_gth_application_open_viewer;
epv->load_image = impl_gth_application_load_image;
epv->import_photos = impl_gth_application_import_photos;
}
static void
gth_application_init (GthApplication *c)
{
}
BONOBO_TYPE_FUNC_FULL (
GthApplication,
GNOME_GThumb_Application,
BONOBO_TYPE_OBJECT,
gth_application);
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* GThumb
*
* Copyright (C) 2005 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*/
#ifndef GTH_APPLICATION_H
#define GTH_APPLICATION_H
#include <gtk/gtk.h>
#include <bonobo/bonobo-object.h>
#include "GNOME_GThumb.h"
#define GTH_TYPE_APPLICATION (gth_application_get_type ())
#define GTH_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTH_TYPE_APPLICATION, GthApplication))
#define GTH_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTH_APPLICATION_TYPE, GthApplicationClass))
#define GTH_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTH_TYPE_APPLICATION))
#define GTH_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTH_TYPE_APPLICATION))
#define GTH_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTH_TYPE_APPLICATION, GthApplicationClass))
typedef struct _GthApplication GthApplication;
typedef struct _GthApplicationClass GthApplicationClass;
struct _GthApplication
{
BonoboObject __parent;
};
struct _GthApplicationClass
{
BonoboObjectClass __parent_class;
POA_GNOME_GThumb_Application__epv epv;
};
GType gth_application_get_type (void);
BonoboObject * gth_application_new (GdkScreen *screen);
#endif /* GTH_APPLICATION_H */
......@@ -29,6 +29,7 @@
#include <glade/glade.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-mime.h>
#include <gtkunique/gtkunique.h>
#include <libexif/exif-data.h>
#include "jpegutils/jpeg-data.h"
......
......@@ -27,6 +27,7 @@
#include "gth-window.h"
#include "dlg-comment.h"
#include "dlg-categories.h"
#include "main.h"
enum {
PROP_0,
......@@ -59,9 +60,10 @@ gth_window_finalize (GObject *object)
window->priv = NULL;
}
window_list = g_list_remove (window_list, window);
G_OBJECT_CLASS (parent_class)->finalize (object);
window_list = g_list_remove (window_list, window);
if (window_list == NULL)
gtk_main_quit ();
}
......@@ -236,6 +238,7 @@ gth_window_init (GthWindow *window)
priv->history = gth_image_history_new ();
window_list = g_list_prepend (window_list, window);
gtk_unique_app_add_window (gth_application, GTK_WINDOW (window));
}
......@@ -283,6 +286,8 @@ gth_window_close (GthWindow *window)
priv->categories_dlg = NULL;
}
gtk_unique_app_remove_window (gth_application, GTK_WINDOW (window));
class->close (window);
}
......
......@@ -23,11 +23,9 @@
#include <config.h>
#include <gnome.h>
#include <glade/glade.h>
#include <libgnomeui/gnome-window-icon.h>
#include <libgnomeui/gnome-ui-init.h>
#include <gdk/gdkx.h>
#include <libgnomevfs/gnome-vfs-init.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libbonobo.h>
#include "catalog.h"
#include "comments.h"
......@@ -35,7 +33,6 @@
#include "file-utils.h"
#include "gconf-utils.h"
#include "gtk-utils.h"
#include "gth-application.h"
#include "gth-browser.h"
#include "gth-browser-actions-callbacks.h"
#include "gth-dir-list.h"
......@@ -63,40 +60,50 @@ static char*icon_mime_name[ICON_NAMES] = { "gnome-fs-directory",
"gnome-fs-home",
"gnome-fs-desktop" };
GthMonitor *monitor = NULL;
char **file_urls, **dir_urls;
int n_file_urls, n_dir_urls;
int StartInFullscreen = FALSE;
int StartSlideshow = FALSE;
int ViewFirstImage = FALSE;
int HideSidebar = FALSE;
gboolean ExitAll = FALSE;
char *ImageToDisplay = NULL;
gboolean FirstStart = TRUE;
gboolean ImportPhotos = FALSE;