[evince] shell: Remove smclient
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Remove smclient
- Date: Sun, 23 Feb 2014 18:25:36 +0000 (UTC)
commit 3853ca5e6892f2fd6a30df7193823fd54e59101d
Author: Christian Persch <chpe gnome org>
Date: Wed Jun 13 14:59:57 2012 +0200
shell: Remove smclient
https://bugzilla.gnome.org/show_bug.cgi?id=677981
configure.ac | 42 -
cut-n-paste/Makefile.am | 2 +-
cut-n-paste/smclient/Makefile.am | 40 -
cut-n-paste/smclient/eggdesktopfile.c | 1528 ----------------------------
cut-n-paste/smclient/eggdesktopfile.h | 163 ---
cut-n-paste/smclient/eggsmclient-osx.c | 235 -----
cut-n-paste/smclient/eggsmclient-private.h | 59 --
cut-n-paste/smclient/eggsmclient-win32.c | 353 -------
cut-n-paste/smclient/eggsmclient-xsmp.c | 1380 -------------------------
cut-n-paste/smclient/eggsmclient.c | 604 -----------
cut-n-paste/smclient/eggsmclient.h | 117 ---
help/reference/shell/Makefile.am | 1 -
po/POTFILES.in | 2 -
shell/Makefile.am | 2 -
shell/ev-application.c | 75 --
shell/ev-application.h | 1 -
shell/main.c | 16 -
17 files changed, 1 insertions(+), 4619 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 13b0a07..08aab17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,46 +212,6 @@ if test -z "$GDBUS_CODEGEN"; then
AC_MSG_ERROR([gdbus-codegen not found])
fi
-# *********
-# SM client
-# *********
-
-GDK_TARGET="$($PKG_CONFIG --variable targets gdk-3.0)"
-
-AC_MSG_CHECKING([which smclient backend to use])
-AC_ARG_WITH([smclient],
- [AS_HELP_STRING([--with-smclient-backend=no|xsmp|win32|quartz],
- [Setting smclient backend (default:auto)])],
- [],
- [case "$GDK_TARGET" in
- x11*) case "$with_platform" in
- gnome) with_smclient=xsmp ;;
- *) with_smclient=no ;;
- esac ;;
- win32|quartz) with_smclient=$GDK_TARGET ;;
- *) with_smclient=no ;;
- esac])
-
-AC_MSG_RESULT([$with_smclient])
-
-if test "$with_smclient" != "no"; then
- AC_DEFINE([WITH_SMCLIENT],[1],[Define if smclient is enabled])
-
- case "$with_smclient" in
- xsmp) SMCLIENT_PKGS="sm >= 1.0.0 ice x11" ;;
- *) SMCLIENT_PKGS="" ;;
- esac
-
- PKG_CHECK_MODULES([SMCLIENT],[gtk+-3.0 gthread-2.0 $SMCLIENT_PKGS])
- AC_SUBST([SMCLIENT_CFLAGS])
- AC_SUBST([SMCLIENT_LIBS])
-fi
-
-AM_CONDITIONAL([WITH_SMCLIENT],[test "$with_smclient" != "no"])
-AM_CONDITIONAL([WITH_SMCLIENT_XSMP],[test "$with_smclient" = "xsmp"])
-AM_CONDITIONAL([WITH_SMCLIENT_WIN32],[test "$with_smclient" = "win32"])
-AM_CONDITIONAL([WITH_SMCLIENT_QUARTZ],[test "$with_smclient" = "quartz"])
-
# ***
BACKEND_LIBTOOL_FLAGS="-module -avoid-version -no-undefined -export-symbols
\$(top_srcdir)/backend/backend.symbols"
@@ -756,7 +716,6 @@ backend/tiff/Makefile
backend/xps/Makefile
cut-n-paste/Makefile
cut-n-paste/gimpcellrenderertoggle/Makefile
-cut-n-paste/smclient/Makefile
cut-n-paste/synctex/Makefile
data/evince.desktop.in
data/evince-previewer.desktop.in
@@ -846,7 +805,6 @@ GTK Doc reference ........: $enable_gtk_doc
GObject Introspection ....: $enable_introspection
DBUS communication .......: $enable_dbus
Keyring integration ......: $with_keyring
-Session Manager client ...: $with_smclient
GTK+ Unix Print ..........: $with_gtk_unix_print
])
diff --git a/cut-n-paste/Makefile.am b/cut-n-paste/Makefile.am
index 5c2cc87..7205394 100644
--- a/cut-n-paste/Makefile.am
+++ b/cut-n-paste/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = smclient gimpcellrenderertoggle synctex
+SUBDIRS = gimpcellrenderertoggle synctex
-include $(top_srcdir)/git.mk
diff --git a/help/reference/shell/Makefile.am b/help/reference/shell/Makefile.am
index 6834d40..e57a13c 100644
--- a/help/reference/shell/Makefile.am
+++ b/help/reference/shell/Makefile.am
@@ -113,7 +113,6 @@ FILTER_OUT = \
GTKDOC_LIBS = \
$(top_builddir)/cut-n-paste/gimpcellrenderertoggle/libgimpcellrenderertoggle.la \
- $(top_builddir)/cut-n-paste/smclient/libsmclient.la \
$(top_builddir)/properties/libevproperties.la \
$(top_builddir)/libdocument/libevdocument3.la \
$(top_builddir)/libview/libevview3.la \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4190ab8..ac41565 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -14,8 +14,6 @@ backend/ps/ev-spectre.c
backend/tiff/tiff-document.c
[type: gettext/ini]backend/tiff/tiffdocument.evince-backend.in
[type: gettext/ini]backend/xps/xpsdocument.evince-backend.in
-cut-n-paste/smclient/eggdesktopfile.c
-cut-n-paste/smclient/eggsmclient.c
data/evince.desktop.in.in
data/evince-previewer.desktop.in.in
data/org.gnome.Evince.gschema.xml.in
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 5106511..6266ce3 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -97,7 +97,6 @@ evince_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/cut-n-paste/gimpcellrenderertoggle \
- -I$(top_srcdir)/cut-n-paste/smclient \
-I$(top_srcdir)/libdocument \
-I$(top_builddir)/libdocument \
-I$(top_srcdir)/libview \
@@ -120,7 +119,6 @@ endif
evince_LDADD= \
$(top_builddir)/cut-n-paste/gimpcellrenderertoggle/libgimpcellrenderertoggle.la \
- $(top_builddir)/cut-n-paste/smclient/libsmclient.la \
$(top_builddir)/properties/libevproperties.la \
$(top_builddir)/libdocument/libevdocument3.la \
$(top_builddir)/libview/libevview3.la \
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 2115596..475dfaf 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -35,10 +35,6 @@
#endif
#include <unistd.h>
-#ifdef WITH_SMCLIENT
-#include "eggsmclient.h"
-#endif
-
#include "ev-application.h"
#include "ev-file-helpers.h"
#include "ev-stock-icons.h"
@@ -60,10 +56,6 @@ struct _EvApplication {
EvMediaPlayerKeys *keys;
gboolean doc_registered;
#endif
-
-#ifdef WITH_SMCLIENT
- EggSMClient *smclient;
-#endif
};
struct _EvApplicationClass {
@@ -115,71 +107,6 @@ ev_application_new (void)
NULL);
}
-/* Session */
-gboolean
-ev_application_load_session (EvApplication *application)
-{
- GKeyFile *state_file;
- gchar *uri;
-
-#ifdef WITH_SMCLIENT
- if (egg_sm_client_is_resumed (application->smclient)) {
- state_file = egg_sm_client_get_state_file (application->smclient);
- if (!state_file)
- return FALSE;
- } else
-#endif /* WITH_SMCLIENT */
- return FALSE;
-
- uri = g_key_file_get_string (state_file, "Evince", "uri", NULL);
- if (!uri)
- return FALSE;
-
- ev_application_open_uri_at_dest (application, uri,
- gdk_screen_get_default (),
- NULL, 0, NULL,
- GDK_CURRENT_TIME);
- g_free (uri);
- g_key_file_free (state_file);
-
- return TRUE;
-}
-
-#ifdef WITH_SMCLIENT
-
-static void
-smclient_save_state_cb (EggSMClient *client,
- GKeyFile *state_file,
- EvApplication *application)
-{
- if (!application->uri)
- return;
-
- g_key_file_set_string (state_file, "Evince", "uri", application->uri);
-}
-
-static void
-smclient_quit_cb (EggSMClient *client,
- GApplication *application)
-{
- g_application_quit (application);
-}
-#endif /* WITH_SMCLIENT */
-
-static void
-ev_application_init_session (EvApplication *application)
-{
-#ifdef WITH_SMCLIENT
- application->smclient = egg_sm_client_get ();
- g_signal_connect (application->smclient, "save_state",
- G_CALLBACK (smclient_save_state_cb),
- application);
- g_signal_connect (application->smclient, "quit",
- G_CALLBACK (smclient_quit_cb),
- application);
-#endif
-}
-
#ifdef ENABLE_DBUS
/**
* ev_display_open_if_needed:
@@ -1158,8 +1085,6 @@ ev_application_init (EvApplication *ev_application)
if (!g_file_test (ev_application->dot_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))
ev_application_migrate_config_dir (ev_application);
- ev_application_init_session (ev_application);
-
ev_application_accel_map_load (ev_application);
}
diff --git a/shell/ev-application.h b/shell/ev-application.h
index 5ec870e..cbc1fd4 100644
--- a/shell/ev-application.h
+++ b/shell/ev-application.h
@@ -49,7 +49,6 @@ typedef struct _EvApplicationClass EvApplicationClass;
GType ev_application_get_type (void) G_GNUC_CONST;
EvApplication *ev_application_new (void);
-gboolean ev_application_load_session (EvApplication *application);
void ev_application_open_window (EvApplication *application,
GdkScreen *screen,
guint32 timestamp);
diff --git a/shell/main.c b/shell/main.c
index c1e756b..7e6c04a 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -33,13 +33,6 @@
#include "ev-stock-icons.h"
#include "ev-metadata.h"
-#ifdef WITH_SMCLIENT
-#include "eggsmclient.h"
-#ifdef GDK_WINDOWING_X11
-#include "eggdesktopfile.h"
-#endif
-#endif /* WITH_SMCLIENT */
-
#ifdef G_OS_WIN32
#include <io.h>
#include <conio.h>
@@ -277,10 +270,6 @@ main (int argc, char *argv[])
g_option_context_set_translation_domain(context, GETTEXT_PACKAGE);
g_option_context_add_main_entries (context, goption_options, GETTEXT_PACKAGE);
-#ifdef WITH_SMCLIENT
- g_option_context_add_group (context, egg_sm_client_get_option_group ());
-#endif
-
g_option_context_add_group (context, gtk_get_option_group (TRUE));
if (!g_option_context_parse (context, &argc, &argv, &error)) {
@@ -305,13 +294,9 @@ main (int argc, char *argv[])
ev_stock_icons_init ();
-#if defined(WITH_SMCLIENT) && defined(GDK_WINDOWING_X11)
- egg_set_desktop_file (GNOMEDATADIR "/applications/evince.desktop");
-#else
/* Manually set name and icon */
g_set_application_name (_("Document Viewer"));
gtk_window_set_default_icon_name ("evince");
-#endif /* WITH_SMCLIENT && GDK_WINDOWING_X11 */
application = ev_application_new ();
if (!g_application_register (G_APPLICATION (application), NULL, &error)) {
@@ -321,7 +306,6 @@ main (int argc, char *argv[])
goto done;
}
- ev_application_load_session (application);
load_files (file_arguments);
/* Change directory so we don't prevent unmounting in case the initial cwd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]