diff -dupr lxsession-0.5.2-old/configure.ac lxsession-0.5.2/configure.ac --- lxsession-0.5.2-old/configure.ac 2014-11-29 15:53:16.000000000 +0100 +++ lxsession-0.5.2/configure.ac 2015-02-01 20:08:49.012102084 +0100 @@ -53,11 +53,11 @@ PKG_CHECK_MODULES(GIO, [gio-unix-2.0]) AC_SUBST(GIO_CFLAGS) AC_SUBST(GIO_LIBS) -PKG_CHECK_MODULES(DBUSGLIB, [dbus-glib-1]) +#PKG_CHECK_MODULES(DBUSGLIB, [dbus-glib-1]) AC_SUBST(DBUSGLIB_CFLAGS) AC_SUBST(DBUSGLIB_LIBS) -PKG_CHECK_MODULES(DBUS, [dbus-1]) +#PKG_CHECK_MODULES(DBUS, [dbus-1]) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) diff -dupr lxsession-0.5.2-old/data/ui/lxpolkit.ui lxsession-0.5.2/data/ui/lxpolkit.ui --- lxsession-0.5.2-old/data/ui/lxpolkit.ui 2014-09-23 23:55:15.000000000 +0200 +++ lxsession-0.5.2/data/ui/lxpolkit.ui 2015-02-02 18:38:57.182964521 +0100 @@ -1 +1,181 @@ -5AuthenticationFalsecenternormalFalseTruevertical2True12vertical6TrueTruegtk-missing-imageFalse0True00True1False0True6TrueIdentity:False0True01False1TrueTrueFalse0TrueTrueTrueFalseTrue1False2True00False3False1Trueendgtk-cancelTrueTrueTrueTrueFalseFalse0gtk-okTrueTrueTrueTrueTrueTrueFalseFalse1Falseend0cancelok + + + + + 5 + Authentication + False + center + normal + + + True + vertical + 2 + + + True + 12 + vertical + 6 + + + True + + + True + gtk-missing-image + + + False + 0 + + + + + True + 0 + 0 + True + + + 1 + + + + + False + 0 + + + + + True + 6 + + + True + Identity: + + + False + 0 + + + + + True + + + + 0 + + + + + 1 + + + + + False + 1 + + + + + True + + + True + + + False + 0 + + + + + True + True + True + False + + True + + + 1 + + + + + False + 2 + + + + + True + 0 + 0 + + + False + 3 + + + + + False + 1 + + + + + True + end + + + gtk-cancel + True + True + True + True + + + False + False + 0 + + + + + gtk-ok + True + True + True + True + True + True + + + False + False + 1 + + + + + False + end + 0 + + + + + + cancel + ok + + + diff -dupr lxsession-0.5.2-old/data/ui/lxsession-edit.ui lxsession-0.5.2/data/ui/lxsession-edit.ui --- lxsession-0.5.2-old/data/ui/lxsession-edit.ui 2014-09-23 23:55:15.000000000 +0200 +++ lxsession-0.5.2/data/ui/lxsession-edit.ui 2015-02-02 18:39:08.814827620 +0100 @@ -10,7 +10,6 @@ 512 420 dialog - True True diff -dupr lxsession-0.5.2-old/lxsession/dbus-common.c lxsession-0.5.2/lxsession/dbus-common.c --- lxsession-0.5.2-old/lxsession/dbus-common.c 2014-11-29 15:54:16.000000000 +0100 +++ lxsession-0.5.2/lxsession/dbus-common.c 2015-02-01 20:32:02.356609535 +0100 @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include @@ -304,18 +302,13 @@ static gboolean lxsession_session_object _data_->_tmp2_ = FALSE; _data_->_tmp2_ = lxsession_console_kit_object_can_stop_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_); _data_->_tmp0_ = _data_->_tmp2_; - if (G_UNLIKELY (_data_->_inner_error_ != NULL)) { - if (_data_->_inner_error_->domain == DBUS_GERROR) { - goto __catch11_dbus_gerror; - } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code); - g_clear_error (&_data_->_inner_error_); - return FALSE; + if (G_UNLIKELY (_data_->_inner_error_ != NULL)) { + goto __catch11_g_error; } _data_->can_shutdown_available = _data_->_tmp0_; } goto __finally11; - __catch11_dbus_gerror: + __catch11_g_error: { _data_->err = _data_->_inner_error_; _data_->_inner_error_ = NULL; @@ -358,17 +351,12 @@ void lxsession_session_object_lxsession_ LxsessionConsoleKitObject* _tmp0_ = NULL; _tmp0_ = self->dbus_interface; lxsession_console_kit_object_stop (_tmp0_, &_inner_error_); - if (G_UNLIKELY (_inner_error_ != NULL)) { - if (_inner_error_->domain == DBUS_GERROR) { - goto __catch12_dbus_gerror; - } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + if (G_UNLIKELY (_inner_error_ != NULL)) { + goto __catch12_g_error; } } goto __finally12; - __catch12_dbus_gerror: + __catch12_g_error: { GError* err = NULL; GError* _tmp1_ = NULL; @@ -396,17 +384,12 @@ void lxsession_session_object_lxsession_ LxsessionConsoleKitObject* _tmp0_ = NULL; _tmp0_ = self->dbus_interface; lxsession_console_kit_object_restart (_tmp0_, &_inner_error_); - if (G_UNLIKELY (_inner_error_ != NULL)) { - if (_inner_error_->domain == DBUS_GERROR) { - goto __catch13_dbus_gerror; - } - g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); - g_clear_error (&_inner_error_); - return; + if (G_UNLIKELY (_inner_error_ != NULL)) { + goto __catch13_g_error; } } goto __finally13; - __catch13_dbus_gerror: + __catch13_g_error: { GError* err = NULL; GError* _tmp1_ = NULL; @@ -533,7 +515,6 @@ static void lxsession_console_kit_object GVariant *_arguments; GVariantBuilder _arguments_builder; GDBusMessage *_reply_message; - DBUS_GERROR; _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "Restart"); g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); _arguments = g_variant_builder_end (&_arguments_builder); @@ -556,7 +537,6 @@ static void lxsession_console_kit_object GVariant *_arguments; GVariantBuilder _arguments_builder; GDBusMessage *_reply_message; - DBUS_GERROR; _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "Stop"); g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); _arguments = g_variant_builder_end (&_arguments_builder); @@ -585,7 +565,6 @@ static void lxsession_console_kit_object GDBusMessage *_message; GVariant *_arguments; GVariantBuilder _arguments_builder; - DBUS_GERROR; _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "CanRestart"); g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); _arguments = g_variant_builder_end (&_arguments_builder); @@ -623,7 +602,6 @@ static void lxsession_console_kit_object GDBusMessage *_message; GVariant *_arguments; GVariantBuilder _arguments_builder; - DBUS_GERROR; _message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.ConsoleKit.Manager", "CanStop"); g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); _arguments = g_variant_builder_end (&_arguments_builder); diff -dupr lxsession-0.5.2-old/lxsession/dbus-common.vala lxsession-0.5.2/lxsession/dbus-common.vala --- lxsession-0.5.2-old/lxsession/dbus-common.vala 2014-10-05 01:49:49.000000000 +0200 +++ lxsession-0.5.2/lxsession/dbus-common.vala 2015-02-01 20:31:59.404642361 +0100 @@ -43,7 +43,7 @@ public class SessionObject: Object { try { can_shutdown_available = yield dbus_interface.can_stop (); } - catch (DBus.Error err) { + catch (Error err) { warning ("%s", err.message); can_shutdown_available = false; } @@ -55,7 +55,7 @@ public class SessionObject: Object { try { dbus_interface.stop (); } - catch (DBus.Error err) { + catch (Error err) { warning ("%s", err.message); } } @@ -64,7 +64,7 @@ public class SessionObject: Object { try { dbus_interface.restart (); } - catch (DBus.Error err) { + catch (Error err) { warning ("%s", err.message); } } @@ -77,10 +77,10 @@ public interface ConsoleKitObject: Objec public const string OBJECT_PATH = "/org/freedesktop/ConsoleKit/Manager"; public const string INTERFACE_NAME = "org.freedesktop.ConsoleKit.Manager"; - public abstract void restart () throws DBus.Error; - public abstract void stop () throws DBus.Error; - public abstract async bool can_restart () throws DBus.Error; - public abstract async bool can_stop () throws DBus.Error; + public abstract void restart () throws Error; + public abstract void stop () throws Error; + public abstract async bool can_restart () throws Error; + public abstract async bool can_stop () throws Error; } void on_bus_aquired (DBusConnection conn) { diff -dupr lxsession-0.5.2-old/lxsession-logout/lxsession-logout-dbus-interface.c lxsession-0.5.2/lxsession-logout/lxsession-logout-dbus-interface.c --- lxsession-0.5.2-old/lxsession-logout/lxsession-logout-dbus-interface.c 2014-11-29 15:43:14.000000000 +0100 +++ lxsession-0.5.2/lxsession-logout/lxsession-logout-dbus-interface.c 2015-02-01 20:15:34.983588101 +0100 @@ -15,7 +15,6 @@ #include #include #include -#include #include /*** Mechanism independent ***/ diff -dupr lxsession-0.5.2-old/Makefile.am lxsession-0.5.2/Makefile.am --- lxsession-0.5.2-old/Makefile.am 2014-11-29 15:50:05.000000000 +0100 +++ lxsession-0.5.2/Makefile.am 2015-02-02 13:18:36.162423066 +0100 @@ -83,8 +83,9 @@ $(NULL) if USE_GTK3 +lxclipboard_lxclipboard_VALAFLAGS += -D USE_GTK3 else -lxclipboard_lxclipboard_VALAFLAGS += --pkg unique-1.0 +lxclipboard_lxclipboard_VALAFLAGS += --pkg unique-1.0 -D USE_GTK2 lxclipboard_lxclipboard_CPPFLAGS += $(UNIQUE_CFLAGS) lxclipboard_lxclipboard_LDADD += $(UNIQUE_LIBS) endif @@ -128,8 +129,9 @@ $(NULL) if USE_GTK3 +lxpolkit_lxpolkit_VALAFLAGS += -D USE_GTK3 else -lxpolkit_lxpolkit_VALAFLAGS += --pkg unique-1.0 +lxpolkit_lxpolkit_VALAFLAGS += --pkg unique-1.0 -D USE_GTK2 lxpolkit_lxpolkit_CPPFLAGS += $(UNIQUE_CFLAGS) lxpolkit_lxpolkit_LDADD += $(UNIQUE_LIBS) endif @@ -215,7 +217,6 @@ lxsession_default_apps_lxsession_default_apps_VALAFLAGS = \ --vapidir=$(srcdir)/vapi \ --pkg @VALA_GTK_LIBS@ \ - --pkg dbus-glib-1 \ --pkg gio-2.0 \ --pkg posix \ --pkg lxsession-edit \ @@ -242,6 +243,12 @@ $(X11_LIBS) \ $(NULL) +if USE_GTK3 +lxsession_default_apps_lxsession_default_apps_VALAFLAGS += -D USE_GTK3 +else +lxsession_default_apps_lxsession_default_apps_VALAFLAGS += -D USE_GTK2 +endif + if USE_BUILDIN_CLIPBOARD buildinclip_SOURCES = \ lxclipboard/clipboard.c \ @@ -420,7 +427,6 @@ lxsession_lxsession_VALAFLAGS = \ --vapidir=$(srcdir)/vapi \ - --pkg dbus-glib-1 \ --pkg gio-2.0 \ --pkg posix \ --pkg lxsettings-daemon \ --- lxsession-0.5.2-old/lxsession-logout/lxsession-logout.c 2014-11-29 15:43:14.000000000 +0100 +++ lxsession-0.5.2/lxsession-logout/lxsession-logout.c 2015-02-02 01:07:12.039352533 +0100 @@ -419,6 +419,24 @@ } /* Handler for "expose_event" on background. */ +#if GTK_CHECK_VERSION(3,0,0) +gboolean draw(GtkWidget * widget, cairo_t * cr, GdkPixbuf * pixbuf) +{ + if (pixbuf != NULL) + { + /* Copy the appropriate rectangle of the root window pixmap to the drawing area. + * All drawing areas are immediate children of the toplevel window, so the allocation yields the source coordinates directly. */ + gdk_cairo_set_source_pixbuf ( + cr, + pixbuf, + 0, + 0); + + cairo_paint (cr); + } + return FALSE; +} +#else gboolean expose_event(GtkWidget * widget, GdkEventExpose * event, GdkPixbuf * pixbuf) { if (pixbuf != NULL) @@ -441,6 +459,7 @@ } return FALSE; } +#endif static char lockfile[PATH_MAX]; @@ -460,19 +479,6 @@ textdomain (GETTEXT_PACKAGE); #endif - /* Initialize GTK (via g_option_context_parse) and parse command line arguments. */ - GOptionContext * context = g_option_context_new(""); - g_option_context_add_main_entries(context, opt_entries, GETTEXT_PACKAGE); - g_option_context_add_group(context, gtk_get_option_group(TRUE)); - GError * err = NULL; - if ( ! g_option_context_parse(context, &argc, &argv, &err)) - { - g_print(_("Error: %s\n"), err->message); - g_error_free(err); - return 1; - } - g_option_context_free(context); - HandlerContext handler_context; memset(&handler_context, 0, sizeof(handler_context)); @@ -587,6 +593,19 @@ handler_context.lock_screen = TRUE; } + /* Initialize GTK (via g_option_context_parse) and parse command line arguments. */ + GOptionContext * context = g_option_context_new(""); + g_option_context_add_main_entries(context, opt_entries, GETTEXT_PACKAGE); + g_option_context_add_group(context, gtk_get_option_group(TRUE)); + GError * err = NULL; + if ( ! g_option_context_parse(context, &argc, &argv, &err)) + { + g_print(_("Error: %s\n"), err->message); + g_error_free(err); + return 1; + } + g_option_context_free(context); + /* Make the button images accessible. */ gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), PACKAGE_DATA_DIR "/lxsession/images"); @@ -600,7 +619,11 @@ GdkScreen* screen = gtk_widget_get_screen(window); gtk_window_set_default_size(GTK_WINDOW(window), gdk_screen_get_width(screen), gdk_screen_get_height(screen)); gtk_widget_set_app_paintable(window, TRUE); +#if GTK_CHECK_VERSION(3,0,0) + g_signal_connect(G_OBJECT(window), "draw", G_CALLBACK(draw), pixbuf); +#else g_signal_connect(G_OBJECT(window), "expose_event", G_CALLBACK(expose_event), pixbuf); +#endif g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL); /* Toplevel container */ --- lxsession-0.5.2-old/lxpolkit/main.vala 2014-11-29 15:43:14.000000000 +0100 +++ lxsession-0.5.2/lxpolkit/main.vala 2015-02-02 13:39:18.868041425 +0100 @@ -42,7 +42,7 @@ } #endif # if USE_GTK3 - Application app = new Application (); + GLib.Application app = new GLib.Application ("org.lxde.lxpolkit", 0); app.run (args); #endif --- lxsession-0.5.2-old/lxclipboard/main.vala 2014-11-29 15:43:14.000000000 +0100 +++ lxsession-0.5.2/lxclipboard/main.vala 2015-02-02 13:44:28.812489038 +0100 @@ -37,7 +37,7 @@ } #endif # if USE_GTK3 - Application app = new Application (); + GLib.Application app = new GLib.Application ("org.lxde.lxclipboard", 0); app.run (args); #endif --- lxsession-0.5.2-old/lxsession/app.vala 2014-10-05 01:49:49.000000000 +0200 +++ lxsession-0.5.2/lxsession/app.vala 2015-02-02 19:29:33.268533106 +0100 @@ -225,13 +225,18 @@ session = ""; extras = ""; } - else + else if (global_settings.get_item_string("Session", "windows_manager", "command") != null) { mode = "advanced"; wm_command = global_settings.get_item_string("Session", "windows_manager", "command"); session = global_settings.get_item_string("Session", "windows_manager", "session"); extras = global_settings.get_item_string("Session", "windows_manager", "extras"); } + else + { + mode = "simple"; + wm_command = "openbox"; + } string session_command; --- lxsession-0.5.2-old/lxsession/main.vala 2014-10-05 01:49:49.000000000 +0200 +++ lxsession-0.5.2/lxsession/main.vala 2015-02-02 19:41:04.384523450 +0100 @@ -233,6 +233,12 @@ global_windows_manager = windowsmanager; global_windows_manager.launch(); } + else + { + var windowsmanager = new WindowsManagerApp(); + global_windows_manager = windowsmanager; + global_windows_manager.launch(); + } /* Disable autostart if it's specified in the conf file. */ if (global_settings.get_item_string("Session", "disable_autostart", null) == "all")