gthumb r2445 - in branches/gthumb-2-10: . libgthumb src
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2445 - in branches/gthumb-2-10: . libgthumb src
- Date: Thu, 13 Nov 2008 13:21:26 +0000 (UTC)
Author: mjc
Date: Thu Nov 13 13:21:26 2008
New Revision: 2445
URL: http://svn.gnome.org/viewvc/gthumb?rev=2445&view=rev
Log:
2008-11-13 Michael J. Chudobiak <mjc svn gnome org>
* NEWS:
* configure.in:
* libgthumb/eel-canvas-rect.c:
* libgthumb/gth-image-list.c:
* src/catalog-png-exporter.c:
* src/gs-fade.c:
* src/gth-application.c: (show_grabbing_focus):
* src/gth-fullscreen.c: (gth_fullscreen_finalize),
(slideshow_timeout_cb), (viewer_image_loaded_cb), (fade_faded_cb),
(gth_fullscreen_init), (load_current_image), (gth_fullscreen_show),
(gth_fullscreen_pause_slideshow):
* src/main.c:
* src/totem-scrsaver.c:
* src/totem-scrsaver.h:
Modified the build files to better support gtk on MAC OS / Quartz.
Bug #551225. Based on a patch by W. Michael Petullo <mike flyn org>.
Modified:
branches/gthumb-2-10/ChangeLog
branches/gthumb-2-10/NEWS
branches/gthumb-2-10/configure.in
branches/gthumb-2-10/libgthumb/eel-canvas-rect.c
branches/gthumb-2-10/libgthumb/gth-image-list.c
branches/gthumb-2-10/src/catalog-png-exporter.c
branches/gthumb-2-10/src/gs-fade.c
branches/gthumb-2-10/src/gth-application.c
branches/gthumb-2-10/src/gth-fullscreen.c
branches/gthumb-2-10/src/main.c
branches/gthumb-2-10/src/totem-scrsaver.c
branches/gthumb-2-10/src/totem-scrsaver.h
Modified: branches/gthumb-2-10/NEWS
==============================================================================
--- branches/gthumb-2-10/NEWS (original)
+++ branches/gthumb-2-10/NEWS Thu Nov 13 13:21:26 2008
@@ -6,6 +6,8 @@
* Added a new gthumb-import.desktop.in file to handle gvfs-mounted
cameras more elegantly. The camera is first unmounted, and the
libgphoto import routines are then run. Bug #560352.
+ * Modified the build files to better support gtk on MAC OS / Quartz.
+ Bug #551225.
version 2.10.10
---------------
Modified: branches/gthumb-2-10/configure.in
==============================================================================
--- branches/gthumb-2-10/configure.in (original)
+++ branches/gthumb-2-10/configure.in Thu Nov 13 13:21:26 2008
@@ -120,25 +120,6 @@
#
-# Checks for Xft/XRender
-#
-AC_ARG_ENABLE([render],
- [AC_HELP_STRING([--disable-render],[disable support for Xrender])],,
- [enable_render=yes])
-
-HAVE_RENDER=no
-if test x$enable_render = xyes ; then
- AC_MSG_CHECKING(Xrender Support)
- AC_MSG_RESULT()
- AC_CHECK_LIB(Xrender, XRenderFindFormat,
- AC_DEFINE(HAVE_RENDER, 1, [Define to 1 if Xft/XRender support is included])
- RENDER_LIBS='-lXrender -lXext'
- HAVE_RENDER=yes
- ,,[-lXext $GTHUMB_LIBS])
- AC_SUBST(RENDER_LIBS)
-fi
-
-#
# Checks for Xtest
#
have_xtest=false
@@ -241,6 +222,34 @@
[HAVE_LIBOPENRAW=no])
fi
+#
+# Checks for GDK X11 support; may not be present on MAC OS / Quartz systems
+#
+HAVE_GDKX=no
+PKG_CHECK_MODULES(GDKX, gdk-x11-2.0,
+ [HAVE_GDKX=yes],
+ [AC_MSG_WARN(Disabling GDK/X11-dependent features and Xrender.)])
+
+
+#
+# Checks for Xft/XRender
+#
+AC_ARG_ENABLE([render],
+ [AC_HELP_STRING([--disable-render],[disable support for Xrender])],,
+ [enable_render=yes])
+
+HAVE_RENDER=no
+if (test x$enable_render = xyes) && (test $HAVE_GDKX = yes); then
+ AC_MSG_CHECKING(Xrender Support)
+ AC_MSG_RESULT()
+ AC_CHECK_LIB(Xrender, XRenderFindFormat,
+ AC_DEFINE(HAVE_RENDER, 1, [Define to 1 if Xft/XRender support is included])
+ RENDER_LIBS='-lXrender -lXext'
+ HAVE_RENDER=yes
+ ,,[-lXext $GTHUMB_LIBS])
+ AC_SUBST(RENDER_LIBS)
+fi
+
dnl ###############################################
@@ -347,6 +356,7 @@
Source code location: ${srcdir}
Compiler: ${CC}
+ Have gdk-x11: ${HAVE_GDKX}
Have XRender: ${HAVE_RENDER}
Have XTest: ${have_xtest}
Have XF86VidModeSetGamma: ${have_xf86gamma}
Modified: branches/gthumb-2-10/libgthumb/eel-canvas-rect.c
==============================================================================
--- branches/gthumb-2-10/libgthumb/eel-canvas-rect.c (original)
+++ branches/gthumb-2-10/libgthumb/eel-canvas-rect.c Thu Nov 13 13:21:26 2008
@@ -29,11 +29,11 @@
#include <glib/gstring.h>
#include <libgnome/gnome-macros.h>
#include <libgnomecanvas/gnome-canvas-util.h>
-#include <gdk/gdkx.h>
#include "eel-canvas-rect.h"
#ifdef HAVE_RENDER
+#include <gdk/gdkx.h>
#include <X11/extensions/Xrender.h>
#endif
Modified: branches/gthumb-2-10/libgthumb/gth-image-list.c
==============================================================================
--- branches/gthumb-2-10/libgthumb/gth-image-list.c (original)
+++ branches/gthumb-2-10/libgthumb/gth-image-list.c Thu Nov 13 13:21:26 2008
@@ -29,9 +29,9 @@
#include <gtk/gtkbindings.h>
#include <gtk/gtkdnd.h>
#include <gtk/gtkstock.h>
-#include <gdk/gdkx.h>
#ifdef HAVE_RENDER
+#include <gdk/gdkx.h>
#include <X11/extensions/Xrender.h>
#endif
Modified: branches/gthumb-2-10/src/catalog-png-exporter.c
==============================================================================
--- branches/gthumb-2-10/src/catalog-png-exporter.c (original)
+++ branches/gthumb-2-10/src/catalog-png-exporter.c Thu Nov 13 13:21:26 2008
@@ -26,7 +26,6 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
#include <gdk/gdkrgb.h>
#include <libgnomevfs/gnome-vfs.h>
Modified: branches/gthumb-2-10/src/gs-fade.c
==============================================================================
--- branches/gthumb-2-10/src/gs-fade.c (original)
+++ branches/gthumb-2-10/src/gs-fade.c Thu Nov 13 13:21:26 2008
@@ -42,6 +42,8 @@
*
*/
+#ifdef HAVE_GDKX
+
#include "config.h"
#include <stdlib.h>
@@ -630,3 +632,5 @@
{
return fade->priv->fading && (fade->priv->direction = GS_FADE_DIRECTION_OUT);
}
+
+#endif /* HAVE_GDKX */
Modified: branches/gthumb-2-10/src/gth-application.c
==============================================================================
--- branches/gthumb-2-10/src/gth-application.c (original)
+++ branches/gthumb-2-10/src/gth-application.c Thu Nov 13 13:21:26 2008
@@ -26,7 +26,6 @@
#include <stdlib.h>
#include <errno.h>
-#include <gdk/gdkx.h>
#include <bonobo/bonobo-generic-factory.h>
#include "gth-application.h"
@@ -93,9 +92,11 @@
g_free (startup_id_str);
}
+#ifdef HAVE_GDKX
if (timestamp == 0)
timestamp = gdk_x11_get_server_time (new_window->window);
gdk_x11_window_set_user_time (new_window->window, timestamp);
+#endif
gtk_window_present (GTK_WINDOW (new_window));
}
Modified: branches/gthumb-2-10/src/gth-fullscreen.c
==============================================================================
--- branches/gthumb-2-10/src/gth-fullscreen.c (original)
+++ branches/gthumb-2-10/src/gth-fullscreen.c Thu Nov 13 13:21:26 2008
@@ -74,7 +74,6 @@
GthDirectionType slideshow_direction;
int slideshow_delay;
gboolean slideshow_wrap_around;
- gboolean fading_activated;
guint slideshow_timeout;
guint slideshow_paused;
@@ -87,9 +86,12 @@
GtkWidget *viewer;
GtkWidget *toolbar_window;
+#ifdef HAVE_GDKX
TotemScrsaver *screensaver;
GSFade *fade;
gboolean use_fade;
+ gboolean fading_activated;
+#endif
/* comment */
@@ -133,11 +135,13 @@
priv->image = NULL;
}
+#ifdef HAVE_GDKX
g_object_unref (priv->screensaver);
if (priv->fading_activated)
gs_fade_reset (priv->fade);
g_object_unref (priv->fade);
+#endif
file_data_unref (priv->file);
file_data_list_free (priv->file_list);
@@ -178,7 +182,9 @@
}
if (!priv->slideshow_paused) {
+#ifdef HAVE_GDKX
priv->use_fade = TRUE;
+#endif
load_next_image (fullscreen);
}
@@ -208,6 +214,7 @@
{
GthFullscreenPrivateData *priv = fullscreen->priv;
+#ifdef HAVE_GDKX
if (priv->fading_activated) {
if (priv->use_fade) {
gs_fade_in (priv->fade);
@@ -215,6 +222,7 @@
}
gs_fade_reset (priv->fade);
}
+#endif
if (priv->slideshow)
continue_slideshow (fullscreen);
@@ -267,7 +275,9 @@
case GS_FADE_DIRECTION_IN:
if (fullscreen->priv->slideshow)
continue_slideshow (fullscreen);
+#ifdef HAVE_GDKX
fullscreen->priv->use_fade = FALSE;
+#endif
break;
}
}
@@ -292,6 +302,7 @@
G_CALLBACK (preloader_requested_error_cb),
fullscreen);
+#ifdef HAVE_GDKX
priv->screensaver = totem_scrsaver_new ();
priv->fade = gs_fade_new ();
@@ -300,6 +311,7 @@
G_CALLBACK (fade_faded_cb),
fullscreen);
priv->use_fade = FALSE;
+#endif
}
@@ -553,6 +565,7 @@
{
GthFullscreenPrivateData *priv = fullscreen->priv;
+#ifdef HAVE_GDKX
if (priv->fading_activated) {
if (priv->use_fade) {
gs_fade_out (fullscreen->priv->fade);
@@ -560,6 +573,7 @@
}
gs_fade_reset (fullscreen->priv->fade);
}
+#endif
real_load_current_image (fullscreen);
}
@@ -1712,15 +1726,18 @@
priv->slideshow_direction = pref_get_slideshow_direction ();
priv->slideshow_delay = eel_gconf_get_float (PREF_SLIDESHOW_DELAY, DEF_SLIDESHOW_DELAY);
priv->slideshow_wrap_around = eel_gconf_get_boolean (PREF_SLIDESHOW_WRAP_AROUND, FALSE);
+#ifdef HAVE_GDKX
priv->fading_activated = eel_gconf_get_boolean (PREF_SLIDESHOW_FADING, TRUE);
-
+#endif
image_viewer_hide_cursor (IMAGE_VIEWER (priv->viewer));
gtk_window_fullscreen (GTK_WINDOW (widget));
+#ifdef HAVE_GDKX
if (fullscreen->priv->slideshow)
totem_scrsaver_disable (fullscreen->priv->screensaver);
else
totem_scrsaver_enable (fullscreen->priv->screensaver);
+#endif
load_first_or_last_image (fullscreen, TRUE, TRUE);
}
@@ -1939,12 +1956,14 @@
{
fullscreen->priv->slideshow_paused = value;
+#ifdef HAVE_GDKX
if (fullscreen->priv->slideshow_paused)
totem_scrsaver_enable (fullscreen->priv->screensaver);
else {
totem_scrsaver_disable (fullscreen->priv->screensaver);
continue_slideshow (fullscreen);
}
+#endif
}
Modified: branches/gthumb-2-10/src/main.c
==============================================================================
--- branches/gthumb-2-10/src/main.c (original)
+++ branches/gthumb-2-10/src/main.c Thu Nov 13 13:21:26 2008
@@ -23,7 +23,6 @@
#include <config.h>
#include <gnome.h>
#include <glade/glade.h>
-#include <gdk/gdkx.h>
#include <libgnomevfs/gnome-vfs-init.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomeui/gnome-authentication-manager.h>
Modified: branches/gthumb-2-10/src/totem-scrsaver.c
==============================================================================
--- branches/gthumb-2-10/src/totem-scrsaver.c (original)
+++ branches/gthumb-2-10/src/totem-scrsaver.c Thu Nov 13 13:21:26 2008
@@ -19,6 +19,7 @@
Author: Bastien Nocera <hadess hadess net>
*/
+#ifdef HAVE_GDKX
#include "config.h"
#include "totem-scrsaver.h"
@@ -203,3 +204,4 @@
}
}
+#endif /* HAVE_GDKX */
Modified: branches/gthumb-2-10/src/totem-scrsaver.h
==============================================================================
--- branches/gthumb-2-10/src/totem-scrsaver.h (original)
+++ branches/gthumb-2-10/src/totem-scrsaver.h Thu Nov 13 13:21:26 2008
@@ -19,6 +19,8 @@
Author: Bastien Nocera <hadess hadess net>
*/
+#ifdef HAVE_GDKX
+
#include <glib.h>
#include <glib-object.h>
@@ -47,3 +49,4 @@
void totem_scrsaver_enable (TotemScrsaver *scr);
void totem_scrsaver_disable (TotemScrsaver *scr);
+#endif /* HAVE_GDKX */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]