[gedit/wip/gtkapp: 1/17] Die smclient die
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/gtkapp: 1/17] Die smclient die
- Date: Sat, 24 Nov 2012 13:41:27 +0000 (UTC)
commit 84771946d7a693a9d651e5214dbe4d9379221748
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Jul 29 16:07:43 2012 +0200
Die smclient die
configure.ac | 15 -
gedit/Makefile.am | 7 +-
gedit/gedit-app-x11.c | 2 -
gedit/gedit-app.c | 103 +--
gedit/gedit-app.h | 2 -
gedit/gedit-command-line.c | 2 -
gedit/gedit-session.c | 597 -------------
gedit/gedit-session.h | 49 --
gedit/gedit.c | 5 -
gedit/smclient/Makefile.am | 52 --
gedit/smclient/eggdesktopfile.c | 1528 ----------------------------------
gedit/smclient/eggdesktopfile.h | 163 ----
gedit/smclient/eggsmclient-osx.c | 235 ------
gedit/smclient/eggsmclient-private.h | 59 --
gedit/smclient/eggsmclient-win32.c | 353 --------
gedit/smclient/eggsmclient-xsmp.c | 1380 ------------------------------
gedit/smclient/eggsmclient.c | 604 --------------
gedit/smclient/eggsmclient.h | 117 ---
18 files changed, 32 insertions(+), 5241 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7317d26..92882ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -358,20 +358,6 @@ GEDIT_LIBS="$GEDIT_LIBS $X11_LIBS $UNIX_LIBS"
AC_SUBST(GEDIT_CFLAGS)
AC_SUBST(GEDIT_LIBS)
-if test "$os_osx" = "no" &&
- test "$os_win32" = "no"; then
- PKG_CHECK_MODULES(EGG_SMCLIENT, [
- sm >= 1.0.0
- ice
- ])
-else
- EGG_SMCLIENT_CFLAGS=
- EGG_SMCLIENT_LIBS=
-fi
-
-AC_SUBST(EGG_SMCLIENT_CFLAGS)
-AC_SUBST(EGG_SMCLIENT_LIBS)
-
dnl ================================================================
dnl GSettings stuff
dnl ================================================================
@@ -452,7 +438,6 @@ data/org.gnome.gedit.gschema.xml.in
data/Makefile
docs/Makefile
docs/reference/Makefile
-gedit/smclient/Makefile
gedit/theatrics/Makefile
gedit/Makefile
help/Makefile
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 54a7797..282c22b 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = smclient theatrics
+SUBDIRS = theatrics
bin_PROGRAMS = gedit
@@ -10,7 +10,6 @@ pkglib_LTLIBRARIES = libgedit-private.la
INCLUDES = \
-I$(top_srcdir) \
-I$(srcdir) \
- -I$(srcdir)/smclient \
$(GEDIT_CFLAGS) \
$(GTK_MAC_CFLAGS) \
$(WARN_CFLAGS) \
@@ -27,7 +26,6 @@ gedit_LDADD = \
libgedit-private.la \
$(GEDIT_LIBS) \
$(GTK_MAC_LIBS) \
- $(EGG_SMCLIENT_LIBS) \
$(INTROSPECTION_LIBS)
if PLATFORM_WIN32
@@ -39,7 +37,6 @@ endif
libgedit_la_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
libgedit_la_LIBADD = \
- smclient/libeggsmclient.la \
theatrics/libtheatrics.la
# GEDIT_LIBS must be the last to ensure correct order on some platforms
@@ -126,7 +123,6 @@ NOINST_H_FILES = \
gedit-print-job.h \
gedit-print-preview.h \
gedit-replace-dialog.h \
- gedit-session.h \
gedit-settings.h \
gedit-status-combo-box.h \
gedit-tab-label.h \
@@ -216,7 +212,6 @@ libgedit_c_files = \
gedit-print-preview.c \
gedit-progress-info-bar.c \
gedit-replace-dialog.c \
- gedit-session.c \
gedit-settings.c \
gedit-statusbar.c \
gedit-status-combo-box.c \
diff --git a/gedit/gedit-app-x11.c b/gedit/gedit-app-x11.c
index 215923d..4667b5e 100644
--- a/gedit/gedit-app-x11.c
+++ b/gedit/gedit-app-x11.c
@@ -21,7 +21,6 @@
*/
#include "gedit-app-x11.h"
-#include "eggdesktopfile.h"
#define GEDIT_APP_X11_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_APP_X11, GeditAppX11Private))
@@ -44,7 +43,6 @@ gedit_app_x11_class_init (GeditAppX11Class *klass)
static void
gedit_app_x11_init (GeditAppX11 *self)
{
- egg_set_desktop_file (DATADIR "/applications/gedit.desktop");
}
/* ex:set ts=8 noet: */
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 9f1967b..08c48be 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -797,64 +797,6 @@ gen_role (void)
g_get_host_name ());
}
-static GeditWindow *
-gedit_app_create_window_real (GeditApp *app,
- gboolean set_geometry,
- const gchar *role)
-{
- GeditWindow *window;
-
- window = GEDIT_APP_GET_CLASS (app)->create_window (app);
-
- if (role != NULL)
- {
- gtk_window_set_role (GTK_WINDOW (window), role);
- }
- else
- {
- gchar *newrole;
-
- newrole = gen_role ();
- gtk_window_set_role (GTK_WINDOW (window), newrole);
- g_free (newrole);
- }
-
- if (set_geometry)
- {
- GdkWindowState state;
- gint w, h;
-
- state = g_settings_get_int (app->priv->window_settings,
- GEDIT_SETTINGS_WINDOW_STATE);
-
- g_settings_get (app->priv->window_settings,
- GEDIT_SETTINGS_WINDOW_SIZE,
- "(ii)", &w, &h);
-
- gtk_window_set_default_size (GTK_WINDOW (window), w, h);
-
- if ((state & GDK_WINDOW_STATE_MAXIMIZED) != 0)
- {
- gtk_window_maximize (GTK_WINDOW (window));
- }
- else
- {
- gtk_window_unmaximize (GTK_WINDOW (window));
- }
-
- if ((state & GDK_WINDOW_STATE_STICKY ) != 0)
- {
- gtk_window_stick (GTK_WINDOW (window));
- }
- else
- {
- gtk_window_unstick (GTK_WINDOW (window));
- }
- }
-
- return window;
-}
-
/**
* gedit_app_create_window:
* @app: the #GeditApp
@@ -869,32 +811,49 @@ gedit_app_create_window (GeditApp *app,
GdkScreen *screen)
{
GeditWindow *window;
+ gchar *role;
+ GdkWindowState state;
+ gint w, h;
gedit_debug (DEBUG_APP);
- window = gedit_app_create_window_real (app, TRUE, NULL);
+ window = GEDIT_APP_GET_CLASS (app)->create_window (app);
if (screen != NULL)
{
gtk_window_set_screen (GTK_WINDOW (window), screen);
}
- return window;
-}
+ role = gen_role ();
+ gtk_window_set_role (GTK_WINDOW (window), role);
+ g_free (role);
-/*
- * Same as _create_window, but doesn't set the geometry.
- * The session manager takes care of it. Used in gnome-session.
- */
-GeditWindow *
-_gedit_app_restore_window (GeditApp *app,
- const gchar *role)
-{
- GeditWindow *window;
+ state = g_settings_get_int (app->priv->window_settings,
+ GEDIT_SETTINGS_WINDOW_STATE);
- gedit_debug (DEBUG_APP);
+ g_settings_get (app->priv->window_settings,
+ GEDIT_SETTINGS_WINDOW_SIZE,
+ "(ii)", &w, &h);
+
+ gtk_window_set_default_size (GTK_WINDOW (window), w, h);
- window = gedit_app_create_window_real (app, FALSE, role);
+ if ((state & GDK_WINDOW_STATE_MAXIMIZED) != 0)
+ {
+ gtk_window_maximize (GTK_WINDOW (window));
+ }
+ else
+ {
+ gtk_window_unmaximize (GTK_WINDOW (window));
+ }
+
+ if ((state & GDK_WINDOW_STATE_STICKY ) != 0)
+ {
+ gtk_window_stick (GTK_WINDOW (window));
+ }
+ else
+ {
+ gtk_window_unstick (GTK_WINDOW (window));
+ }
return window;
}
diff --git a/gedit/gedit-app.h b/gedit/gedit-app.h
index 68e57ef..907b713 100644
--- a/gedit/gedit-app.h
+++ b/gedit/gedit-app.h
@@ -132,8 +132,6 @@ gboolean gedit_app_process_window_event (GeditApp *app,
GdkEvent *event);
/* Non exported functions */
-GeditWindow *_gedit_app_restore_window (GeditApp *app,
- const gchar *role);
GeditWindow *_gedit_app_get_window_in_viewport (GeditApp *app,
GdkScreen *screen,
gint workspace,
diff --git a/gedit/gedit-command-line.c b/gedit/gedit-command-line.c
index 45d2515..e3e285e 100644
--- a/gedit/gedit-command-line.c
+++ b/gedit/gedit-command-line.c
@@ -37,7 +37,6 @@
#endif
#include "gedit-command-line.h"
-#include "eggsmclient.h"
#define GEDIT_COMMAND_LINE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_COMMAND_LINE, GeditCommandLinePrivate))
@@ -334,7 +333,6 @@ gedit_command_line_parse (GeditCommandLine *command_line,
context = g_option_context_new (_("- Edit text files"));
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
- g_option_context_add_group (context, egg_sm_client_get_option_group ());
#ifdef ENABLE_INTROSPECTION
g_option_context_add_group (context, g_irepository_get_option_group ());
diff --git a/gedit/gedit.c b/gedit/gedit.c
index 448f3cc..f240cdd 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -42,7 +42,6 @@
#include "gedit-debug.h"
#include "gedit-dirs.h"
#include "gedit-plugins-engine.h"
-#include "gedit-session.h"
#ifndef ENABLE_GVFS_METADATA
#include "gedit-metadata-manager.h"
@@ -110,10 +109,6 @@ main (int argc, char *argv[])
gedit_debug_message (DEBUG_APP, "Init plugins");
engine = gedit_plugins_engine_get_default ();
- /* Initialize session management */
- gedit_debug_message (DEBUG_APP, "Init session manager");
- gedit_session_init ();
-
gedit_debug_message (DEBUG_APP, "Run application");
app = gedit_app_get_default ();
status = g_application_run (G_APPLICATION (app), argc, argv);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]