aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGyörgy Balló <ballogy@freestart.hu>2011-11-23 22:58:41 +0100
committerGyörgy Balló <ballogy@freestart.hu>2011-11-23 22:58:41 +0100
commit5a3df0dde62593659e792f92236a8142087080f7 (patch)
tree52fd1d3c6d8072e8d21eecb8428c279c107e4dad /src
parentf2b3d4838b6a175458f903aeb8a8d04fe7a842a5 (diff)
downloadayatana-indicator-session-5a3df0dde62593659e792f92236a8142087080f7.tar.gz
ayatana-indicator-session-5a3df0dde62593659e792f92236a8142087080f7.tar.bz2
ayatana-indicator-session-5a3df0dde62593659e792f92236a8142087080f7.zip
Make GTK Logout Helper optional
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am8
-rw-r--r--src/device-menu-mgr.c9
2 files changed, 16 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index dba0a9e..5209869 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,11 @@
libexec_PROGRAMS = \
- indicator-session-service \
+ indicator-session-service
+
+if BUILD_GTKLOGOUTHELPER
+libexec_PROGRAMS += \
gtk-logout-helper
+endif
###################
# Indicator Stuff
@@ -124,6 +128,7 @@ indicator_session_service_LDADD = \
# GTK Logout Stuff
#################
+if BUILD_GTKLOGOUTHELPER
gtk_logout_helper_SOURCES = \
gtk-logout-helper.c \
settings-helper.c \
@@ -142,6 +147,7 @@ gtk_logout_helper_LDADD = \
$(SESSIONSERVICE_LIBS) \
$(GTKLOGOUTHELPER_LIBS) \
$(GCONF_LIBS)
+endif
###############
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index 5a63be3..926090f 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <libdbusmenu-glib/client.h>
#include <libdbusmenu-gtk3/menuitem.h>
@@ -410,7 +411,11 @@ static void
show_dialog (DbusmenuMenuitem * mi, guint timestamp, gchar * type)
{
+#ifdef HAVE_GTKLOGOUTHELPER
gchar * helper = g_build_filename(LIBEXECDIR, "gtk-logout-helper", NULL);
+#else
+ gchar * helper = g_build_filename("gnome-session-quit", NULL);
+#endif /* HAVE_GTKLOGOUTHELPER */
gchar * dialog_line = g_strdup_printf("%s --%s", helper, type);
g_free(helper);
@@ -726,7 +731,11 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self, gboolean greeter_mode)
dbusmenu_menuitem_child_append (self->root_item, shutdown_mi);
g_signal_connect (G_OBJECT(shutdown_mi),
DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
+#ifdef HAVE_GTKLOGOUTHELPER
G_CALLBACK(show_dialog), "shutdown");
+#else
+ G_CALLBACK(show_dialog), "power-off");
+#endif /* HAVE_GTKLOGOUTHELPER */
RestartShutdownLogoutMenuItems * restart_shutdown_logout_mi = g_new0 (RestartShutdownLogoutMenuItems, 1);
restart_shutdown_logout_mi->logout_mi = logout_mi;