aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apt-watcher.h4
-rw-r--r--src/device-menu-mgr.c1
-rw-r--r--src/indicator-session.c8
-rw-r--r--src/session-service.c4
-rw-r--r--src/udev-mgr.h4
-rw-r--r--src/user-menu-mgr.c35
-rw-r--r--src/user-menu-mgr.h2
-rw-r--r--src/user-widget.c4
-rw-r--r--src/user-widget.h4
9 files changed, 8 insertions, 58 deletions
diff --git a/src/apt-watcher.h b/src/apt-watcher.h
index 7b98a44..6b7d5e1 100644
--- a/src/apt-watcher.h
+++ b/src/apt-watcher.h
@@ -25,11 +25,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libdbusmenu-glib/client.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
#include "session-dbus.h"
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index d3734a2..f8f0696 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -19,7 +19,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <config.h>
#include <libdbusmenu-glib/client.h>
-#include <libdbusmenu-gtk3/menuitem.h>
#include "device-menu-mgr.h"
#include "settings-helper.h"
diff --git a/src/indicator-session.c b/src/indicator-session.c
index ec49f0e..e748825 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -31,11 +31,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <gtk/gtk.h>
#include <gio/gio.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menu.h>
-#else
#include <libdbusmenu-gtk/menu.h>
-#endif
#include <libindicator/indicator.h>
#include <libindicator/indicator-object.h>
@@ -280,10 +276,10 @@ indicator_session_get_location (IndicatorObject * io,
{
IndicatorSession * self = INDICATOR_SESSION (io);
if (entry == &self->users){
- return 1;
+ return 0;
}
else if (entry == &self->devices){
- return 0;
+ return 1;
}
g_warning ("IOEntry handed to us to position but we don't own it!");
return 0;
diff --git a/src/session-service.c b/src/session-service.c
index 753e304..6ee18e9 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -39,11 +39,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libdbusmenu-glib/client.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
#include <libindicator/indicator-service.h>
diff --git a/src/udev-mgr.h b/src/udev-mgr.h
index 5119803..2e57cff 100644
--- a/src/udev-mgr.h
+++ b/src/udev-mgr.h
@@ -24,11 +24,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libdbusmenu-glib/client.h>
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
G_BEGIN_DECLS
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c
index 54e718f..3f4bdc4 100644
--- a/src/user-menu-mgr.c
+++ b/src/user-menu-mgr.c
@@ -48,9 +48,6 @@ static void activate_user_accounts (DbusmenuMenuitem *mi,
gpointer user_data);
static gint compare_users_by_username (const gchar *a,
const gchar *b);
-static void activate_online_accounts (DbusmenuMenuitem *mi,
- guint timestamp,
- gpointer user_data);
static void activate_user_accounts (DbusmenuMenuitem *mi,
guint timestamp,
gpointer user_data);
@@ -255,26 +252,12 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
}
g_list_free(users);
}
- // Add the online accounts and separator
+ // Add the user accounts and separator
DbusmenuMenuitem * separator1 = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (separator1,
DBUSMENU_MENUITEM_PROP_TYPE,
DBUSMENU_CLIENT_TYPES_SEPARATOR);
dbusmenu_menuitem_child_append (self->root_item, separator1);
- DbusmenuMenuitem * online_accounts_item = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set (online_accounts_item,
- DBUSMENU_MENUITEM_PROP_TYPE,
- DBUSMENU_CLIENT_TYPES_DEFAULT);
- dbusmenu_menuitem_property_set (online_accounts_item,
- DBUSMENU_MENUITEM_PROP_LABEL,
- _("Online Accounts…"));
-
- g_signal_connect (G_OBJECT (online_accounts_item),
- DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
- G_CALLBACK (activate_online_accounts),
- NULL);
-
- dbusmenu_menuitem_child_append (self->root_item, online_accounts_item);
DbusmenuMenuitem * user_accounts_item = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (user_accounts_item,
@@ -359,22 +342,6 @@ compare_users_by_username (const gchar *a,
return retval;
}
-// TODO
-// Wait until dialog is complete to find out name to pass
-// to the control centre.
-static void
-activate_online_accounts (DbusmenuMenuitem *mi,
- guint timestamp,
- gpointer user_data)
-{
- GError * error = NULL;
- if (!g_spawn_command_line_async("gnome-control-center online-accounts", &error))
- {
- g_warning("Unable to show control centre: %s", error->message);
- g_error_free(error);
- }
-}
-
static void
activate_user_accounts (DbusmenuMenuitem *mi,
guint timestamp,
diff --git a/src/user-menu-mgr.h b/src/user-menu-mgr.h
index 01823e7..40f7b18 100644
--- a/src/user-menu-mgr.h
+++ b/src/user-menu-mgr.h
@@ -23,7 +23,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib-object.h>
-#include <libdbusmenu-gtk3/menuitem.h>
+#include <libdbusmenu-gtk/menuitem.h>
#include "session-dbus.h"
diff --git a/src/user-widget.c b/src/user-widget.c
index 937a9eb..88ac11c 100644
--- a/src/user-widget.c
+++ b/src/user-widget.c
@@ -136,7 +136,11 @@ user_widget_init (UserWidget *self)
gtk_misc_set_padding (GTK_MISC(priv->user_image),0, 4.0);
priv->user_name = gtk_label_new ("");
+#if HAVE_GTK3
+ priv->container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
priv->container = gtk_hbox_new (FALSE, 0);
+#endif
priv->tick_icon = gtk_image_new_from_icon_name ("account-logged-in",
GTK_ICON_SIZE_MENU);
gtk_misc_set_alignment(GTK_MISC(priv->tick_icon), 1.0, 0.5);
diff --git a/src/user-widget.h b/src/user-widget.h
index e1f6d1a..52a5e34 100644
--- a/src/user-widget.h
+++ b/src/user-widget.h
@@ -20,11 +20,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#define __USER_WIDGET_H__
#include <gtk/gtk.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
-#include <libdbusmenu-gtk3/menuitem.h>
-#else
#include <libdbusmenu-gtk/menuitem.h>
-#endif
G_BEGIN_DECLS