diff options
author | monsta <[email protected]> | 2015-08-25 16:00:41 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2015-09-08 13:39:20 +0200 |
commit | 80c5e88588752d4a856a43fe292569afa6c1c31d (patch) | |
tree | 9008690c45e474f619279daca2a57596eebfc67f /src/terminal-app.c | |
parent | 589ab9b7ce52f9b53dbea123c8fd2d9b3de1e53f (diff) | |
download | mate-terminal-80c5e88588752d4a856a43fe292569afa6c1c31d.tar.bz2 mate-terminal-80c5e88588752d4a856a43fe292569afa6c1c31d.tar.xz |
drop support for win32/osx
Diffstat (limited to 'src/terminal-app.c')
-rw-r--r-- | src/terminal-app.c | 69 |
1 files changed, 25 insertions, 44 deletions
diff --git a/src/terminal-app.c b/src/terminal-app.c index e97a9dd..3411296 100644 --- a/src/terminal-app.c +++ b/src/terminal-app.c @@ -42,12 +42,8 @@ #include <stdlib.h> #include <time.h> -#ifdef WITH_SMCLIENT #include "eggsmclient.h" -#ifdef GDK_WINDOWING_X11 #include "eggdesktopfile.h" -#endif -#endif #define FALLBACK_PROFILE_ID "default" @@ -1305,8 +1301,6 @@ terminal_app_manage_profiles (TerminalApp *app, gtk_window_present (GTK_WINDOW (app->manage_profiles_dialog)); } -#ifdef WITH_SMCLIENT - static void terminal_app_save_state_cb (EggSMClient *client, GKeyFile *key_file, @@ -1322,8 +1316,6 @@ terminal_app_client_quit_cb (EggSMClient *client, g_signal_emit (app, signals[QUIT], 0); } -#endif /* WITH_SMCLIENT */ - /* Class implementation */ G_DEFINE_TYPE (TerminalApp, terminal_app, G_TYPE_OBJECT) @@ -1403,27 +1395,21 @@ terminal_app_init (TerminalApp *app) terminal_accels_init (); -#ifdef WITH_SMCLIENT - { - EggSMClient *sm_client; -#ifdef GDK_WINDOWING_X11 - char *desktop_file; - - desktop_file = g_build_filename (TERM_DATADIR, - "applications", - PACKAGE ".desktop", - NULL); - egg_set_desktop_file_without_defaults (desktop_file); - g_free (desktop_file); -#endif /* GDK_WINDOWING_X11 */ - - sm_client = egg_sm_client_get (); - g_signal_connect (sm_client, "save-state", - G_CALLBACK (terminal_app_save_state_cb), app); - g_signal_connect (sm_client, "quit", - G_CALLBACK (terminal_app_client_quit_cb), app); - } -#endif + EggSMClient *sm_client; + char *desktop_file; + + desktop_file = g_build_filename (TERM_DATADIR, + "applications", + PACKAGE ".desktop", + NULL); + egg_set_desktop_file_without_defaults (desktop_file); + g_free (desktop_file); + + sm_client = egg_sm_client_get (); + g_signal_connect (sm_client, "save-state", + G_CALLBACK (terminal_app_save_state_cb), app); + g_signal_connect (sm_client, "quit", + G_CALLBACK (terminal_app_client_quit_cb), app); } static void @@ -1431,13 +1417,12 @@ terminal_app_finalize (GObject *object) { TerminalApp *app = TERMINAL_APP (object); -#ifdef WITH_SMCLIENT EggSMClient *sm_client; sm_client = egg_sm_client_get (); g_signal_handlers_disconnect_matched (sm_client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, app); -#endif + g_signal_handlers_disconnect_by_func (app->settings_global, G_CALLBACK(terminal_app_profile_list_notify_cb), app); @@ -1682,23 +1667,19 @@ terminal_app_handle_options (TerminalApp *app, /* fall-through on success */ } -#ifdef WITH_SMCLIENT - { - EggSMClient *sm_client; + EggSMClient *sm_client; - sm_client = egg_sm_client_get (); + sm_client = egg_sm_client_get (); - if (allow_resume && egg_sm_client_is_resumed (sm_client)) - { - GKeyFile *key_file; + if (allow_resume && egg_sm_client_is_resumed (sm_client)) + { + GKeyFile *key_file; - key_file = egg_sm_client_get_state_file (sm_client); - if (key_file != NULL && - !terminal_options_merge_config (options, key_file, SOURCE_SESSION, error)) - return FALSE; - } + key_file = egg_sm_client_get_state_file (sm_client); + if (key_file != NULL && + !terminal_options_merge_config (options, key_file, SOURCE_SESSION, error)) + return FALSE; } -#endif /* Make sure we open at least one window */ terminal_options_ensure_window (options); |