[evince/wip/app: 1/2] shell: Remove smclient
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/app: 1/2] shell: Remove smclient
- Date: Mon, 1 Oct 2012 12:39:16 +0000 (UTC)
commit 2b62beac97cd1ae226581619df158fa60273ef5f
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 | 44 -
cut-n-paste/Makefile.am | 2 +-
cut-n-paste/smclient/Makefile.am | 42 -
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 ---
shell/Makefile.am | 3 -
shell/ev-application.c | 75 --
shell/ev-application.h | 1 -
shell/main.c | 16 -
15 files changed, 1 insertions(+), 4621 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3474c84..593a4ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,8 +167,6 @@ case "$with_platform" in
# the hicolor-icon-theme does not have a pkgconfig file, on gnome we
# require the gnome icon theme instead.
SHELL_PLATFORM_PKGS="gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED"
- # The totem-screensaver and egg_smclient code use x11 directly.
- SHELL_PLATFORM_PKGS="$SHELL_PLATFORM_PKGS x11"
;;
*)
# On all other platforms we issue a warning about the runtime
@@ -214,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" ;;
- *) 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"
@@ -745,7 +703,6 @@ backend/tiff/Makefile
backend/xps/Makefile
cut-n-paste/Makefile
cut-n-paste/gimpcellrenderertoggle/Makefile
-cut-n-paste/smclient/Makefile
cut-n-paste/toolbar-editor/Makefile
cut-n-paste/zoom-control/Makefile
cut-n-paste/synctex/Makefile
@@ -836,7 +793,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 98f134a..141976c 100644
--- a/cut-n-paste/Makefile.am
+++ b/cut-n-paste/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = zoom-control toolbar-editor smclient gimpcellrenderertoggle synctex
+SUBDIRS = zoom-control toolbar-editor gimpcellrenderertoggle synctex
-include $(top_srcdir)/git.mk
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 73c8499..1f476ef 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -1,13 +1,11 @@
NULL =
INCLUDES= \
- -DGNOMEDATADIR=\"$(datadir)\" \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_srcdir)/cut-n-paste/zoom-control/ \
-I$(top_srcdir)/cut-n-paste/toolbar-editor/ \
-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 \
@@ -114,7 +112,6 @@ evince_LDADD= \
$(top_builddir)/cut-n-paste/zoom-control/libephyzoom.la \
$(top_builddir)/cut-n-paste/toolbar-editor/libtoolbareditor.la \
$(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 0272477..9ab84c3 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:
@@ -1160,8 +1087,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]