aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in67
-rw-r--r--src/apt-watcher.c3
-rw-r--r--src/device-menu-mgr.c30
-rw-r--r--src/dialog.c2
-rw-r--r--src/udev-mgr.c109
-rw-r--r--src/user-menu-mgr.c50
-rw-r--r--src/user-widget.c28
-rw-r--r--src/users-service-dbus.h2
8 files changed, 199 insertions, 92 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index ae051cb..693b442 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -85,11 +85,11 @@ libsession_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
PROGRAMS = $(libexec_PROGRAMS)
am_gtk_logout_helper_OBJECTS = \
gtk_logout_helper-gtk-logout-helper.$(OBJEXT) \
- gtk_logout_helper-gconf-helper.$(OBJEXT) \
+ gtk_logout_helper-settings-helper.$(OBJEXT) \
gtk_logout_helper-dialog.$(OBJEXT)
gtk_logout_helper_OBJECTS = $(am_gtk_logout_helper_OBJECTS)
gtk_logout_helper_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+ $(am__DEPENDENCIES_1)
gtk_logout_helper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(gtk_logout_helper_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
@@ -99,7 +99,7 @@ am_indicator_session_service_OBJECTS = \
indicator_session_service-session-service.$(OBJEXT) \
indicator_session_service-session-dbus.$(OBJEXT) \
indicator_session_service-gen-session-dbus.xml.$(OBJEXT) \
- indicator_session_service-gconf-helper.$(OBJEXT) \
+ indicator_session_service-settings-helper.$(OBJEXT) \
indicator_session_service-users-service-dbus.$(OBJEXT) \
indicator_session_service-user-menu-mgr.$(OBJEXT) \
indicator_session_service-device-menu-mgr.$(OBJEXT) \
@@ -108,8 +108,7 @@ am_indicator_session_service_OBJECTS = \
indicator_session_service-udev-mgr.$(OBJEXT)
indicator_session_service_OBJECTS = \
$(am_indicator_session_service_OBJECTS)
-indicator_session_service_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+indicator_session_service_DEPENDENCIES = $(am__DEPENDENCIES_1)
indicator_session_service_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(indicator_session_service_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
@@ -179,16 +178,13 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
-GCONFTOOL = @GCONFTOOL@
-GCONF_CFLAGS = @GCONF_CFLAGS@
-GCONF_LIBS = @GCONF_LIBS@
-GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
-GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_COMPILE_SCHEMAS = @GLIB_COMPILE_SCHEMAS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOMELOCALEDIR = @GNOMELOCALEDIR@
GREP = @GREP@
+GSETTINGS_DISABLE_SCHEMAS_COMPILE = @GSETTINGS_DISABLE_SCHEMAS_COMPILE@
GTKLOGOUTHELPER_CFLAGS = @GTKLOGOUTHELPER_CFLAGS@
GTKLOGOUTHELPER_LIBS = @GTKLOGOUTHELPER_LIBS@
INDICATORDIR = @INDICATORDIR@
@@ -277,6 +273,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gsettingsschemadir = @gsettingsschemadir@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -340,7 +337,7 @@ indicator_session_service_SOURCES = \
session-dbus.h \
gen-session-dbus.xml.c \
dbusmenu-shared.h \
- gconf-helper.c \
+ settings-helper.c \
users-service-dbus.h \
users-service-dbus.c \
user-menu-mgr.h \
@@ -372,8 +369,8 @@ indicator_session_service_LDADD = \
#################
gtk_logout_helper_SOURCES = \
gtk-logout-helper.c \
- gconf-helper.c \
- gconf-helper.h \
+ settings-helper.c \
+ settings-helper.h \
dialog.c \
dialog.h
@@ -542,16 +539,16 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_logout_helper-dialog.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_logout_helper-gconf-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_logout_helper-gtk-logout-helper.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk_logout_helper-settings-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-apt-transaction.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-apt-watcher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-device-menu-mgr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-gconf-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-gen-session-dbus.xml.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-lock-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-session-dbus.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-session-service.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-settings-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-udev-mgr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-user-menu-mgr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indicator_session_service-users-service-dbus.Po@am__quote@
@@ -614,21 +611,21 @@ gtk_logout_helper-gtk-logout-helper.obj: gtk-logout-helper.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-gtk-logout-helper.obj `if test -f 'gtk-logout-helper.c'; then $(CYGPATH_W) 'gtk-logout-helper.c'; else $(CYGPATH_W) '$(srcdir)/gtk-logout-helper.c'; fi`
-gtk_logout_helper-gconf-helper.o: gconf-helper.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-gconf-helper.o -MD -MP -MF $(DEPDIR)/gtk_logout_helper-gconf-helper.Tpo -c -o gtk_logout_helper-gconf-helper.o `test -f 'gconf-helper.c' || echo '$(srcdir)/'`gconf-helper.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-gconf-helper.Tpo $(DEPDIR)/gtk_logout_helper-gconf-helper.Po
+gtk_logout_helper-settings-helper.o: settings-helper.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-settings-helper.o -MD -MP -MF $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo -c -o gtk_logout_helper-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo $(DEPDIR)/gtk_logout_helper-settings-helper.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gconf-helper.c' object='gtk_logout_helper-gconf-helper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='settings-helper.c' object='gtk_logout_helper-settings-helper.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-gconf-helper.o `test -f 'gconf-helper.c' || echo '$(srcdir)/'`gconf-helper.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c
-gtk_logout_helper-gconf-helper.obj: gconf-helper.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-gconf-helper.obj -MD -MP -MF $(DEPDIR)/gtk_logout_helper-gconf-helper.Tpo -c -o gtk_logout_helper-gconf-helper.obj `if test -f 'gconf-helper.c'; then $(CYGPATH_W) 'gconf-helper.c'; else $(CYGPATH_W) '$(srcdir)/gconf-helper.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-gconf-helper.Tpo $(DEPDIR)/gtk_logout_helper-gconf-helper.Po
+gtk_logout_helper-settings-helper.obj: settings-helper.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-settings-helper.obj -MD -MP -MF $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo -c -o gtk_logout_helper-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-helper.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtk_logout_helper-settings-helper.Tpo $(DEPDIR)/gtk_logout_helper-settings-helper.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gconf-helper.c' object='gtk_logout_helper-gconf-helper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='settings-helper.c' object='gtk_logout_helper-settings-helper.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-gconf-helper.obj `if test -f 'gconf-helper.c'; then $(CYGPATH_W) 'gconf-helper.c'; else $(CYGPATH_W) '$(srcdir)/gconf-helper.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -c -o gtk_logout_helper-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-helper.c'; fi`
gtk_logout_helper-dialog.o: dialog.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtk_logout_helper_CFLAGS) $(CFLAGS) -MT gtk_logout_helper-dialog.o -MD -MP -MF $(DEPDIR)/gtk_logout_helper-dialog.Tpo -c -o gtk_logout_helper-dialog.o `test -f 'dialog.c' || echo '$(srcdir)/'`dialog.c
@@ -710,21 +707,21 @@ indicator_session_service-gen-session-dbus.xml.obj: gen-session-dbus.xml.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-gen-session-dbus.xml.obj `if test -f 'gen-session-dbus.xml.c'; then $(CYGPATH_W) 'gen-session-dbus.xml.c'; else $(CYGPATH_W) '$(srcdir)/gen-session-dbus.xml.c'; fi`
-indicator_session_service-gconf-helper.o: gconf-helper.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-gconf-helper.o -MD -MP -MF $(DEPDIR)/indicator_session_service-gconf-helper.Tpo -c -o indicator_session_service-gconf-helper.o `test -f 'gconf-helper.c' || echo '$(srcdir)/'`gconf-helper.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-gconf-helper.Tpo $(DEPDIR)/indicator_session_service-gconf-helper.Po
+indicator_session_service-settings-helper.o: settings-helper.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-settings-helper.o -MD -MP -MF $(DEPDIR)/indicator_session_service-settings-helper.Tpo -c -o indicator_session_service-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-settings-helper.Tpo $(DEPDIR)/indicator_session_service-settings-helper.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gconf-helper.c' object='indicator_session_service-gconf-helper.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='settings-helper.c' object='indicator_session_service-settings-helper.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-gconf-helper.o `test -f 'gconf-helper.c' || echo '$(srcdir)/'`gconf-helper.c
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-settings-helper.o `test -f 'settings-helper.c' || echo '$(srcdir)/'`settings-helper.c
-indicator_session_service-gconf-helper.obj: gconf-helper.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-gconf-helper.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-gconf-helper.Tpo -c -o indicator_session_service-gconf-helper.obj `if test -f 'gconf-helper.c'; then $(CYGPATH_W) 'gconf-helper.c'; else $(CYGPATH_W) '$(srcdir)/gconf-helper.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-gconf-helper.Tpo $(DEPDIR)/indicator_session_service-gconf-helper.Po
+indicator_session_service-settings-helper.obj: settings-helper.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-settings-helper.obj -MD -MP -MF $(DEPDIR)/indicator_session_service-settings-helper.Tpo -c -o indicator_session_service-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-helper.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/indicator_session_service-settings-helper.Tpo $(DEPDIR)/indicator_session_service-settings-helper.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gconf-helper.c' object='indicator_session_service-gconf-helper.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='settings-helper.c' object='indicator_session_service-settings-helper.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-gconf-helper.obj `if test -f 'gconf-helper.c'; then $(CYGPATH_W) 'gconf-helper.c'; else $(CYGPATH_W) '$(srcdir)/gconf-helper.c'; fi`
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -c -o indicator_session_service-settings-helper.obj `if test -f 'settings-helper.c'; then $(CYGPATH_W) 'settings-helper.c'; else $(CYGPATH_W) '$(srcdir)/settings-helper.c'; fi`
indicator_session_service-users-service-dbus.o: users-service-dbus.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(indicator_session_service_CFLAGS) $(CFLAGS) -MT indicator_session_service-users-service-dbus.o -MD -MP -MF $(DEPDIR)/indicator_session_service-users-service-dbus.Tpo -c -o indicator_session_service-users-service-dbus.o `test -f 'users-service-dbus.c' || echo '$(srcdir)/'`users-service-dbus.c
diff --git a/src/apt-watcher.c b/src/apt-watcher.c
index 7d706a0..a4298a8 100644
--- a/src/apt-watcher.c
+++ b/src/apt-watcher.c
@@ -279,6 +279,9 @@ apt_watcher_transaction_state_update_cb (AptTransaction* trans,
dbusmenu_menuitem_property_set (self->apt_item,
DBUSMENU_MENUITEM_PROP_LABEL,
_("Reboot Required"));
+ dbusmenu_menuitem_property_set (self->apt_item,
+ DBUSMENU_MENUITEM_PROP_DISPOSITION,
+ DBUSMENU_MENUITEM_DISPOSITION_ALERT);
session_dbus_restart_required (self->session_dbus_interface);
}
g_debug ("Finished with a reboot value of %i", reboot);
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index c298682..523ea8d 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -49,7 +49,6 @@ static GSettings *keybinding_settings = NULL;
static DbusmenuMenuitem *lock_menuitem = NULL;
static DbusmenuMenuitem *system_settings_menuitem = NULL;
static DbusmenuMenuitem *display_settings_menuitem = NULL;
-static DbusmenuMenuitem *bluetooth_settings_menuitem = NULL;
static DbusmenuMenuitem *login_settings_menuitem = NULL;
static DbusmenuMenuitem *software_updates_menuitem = NULL;
static DbusmenuMenuitem *printers_menuitem = NULL;
@@ -535,17 +534,6 @@ device_menu_mgr_build_settings_items (DeviceMenuMgr* self)
dbusmenu_menuitem_child_add_position(self->root_item,
display_settings_menuitem,
1);
- bluetooth_settings_menuitem = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set (bluetooth_settings_menuitem,
- DBUSMENU_MENUITEM_PROP_LABEL,
- _("Bluetooth…"));
- g_signal_connect (G_OBJECT(bluetooth_settings_menuitem),
- DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
- G_CALLBACK(show_system_settings_with_context), "bluetooth");
- dbusmenu_menuitem_child_add_position(self->root_item,
- bluetooth_settings_menuitem,
- 2);
-
login_settings_menuitem = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (login_settings_menuitem,
DBUSMENU_MENUITEM_PROP_LABEL,
@@ -556,20 +544,20 @@ device_menu_mgr_build_settings_items (DeviceMenuMgr* self)
"login");
dbusmenu_menuitem_child_add_position(self->root_item,
login_settings_menuitem,
- 3);
+ 2);
software_updates_menuitem = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (software_updates_menuitem,
DBUSMENU_MENUITEM_PROP_LABEL,
_("Software Up to Date"));
dbusmenu_menuitem_child_add_position(self->root_item,
software_updates_menuitem,
- 4);
+ 3);
DbusmenuMenuitem * separator1 = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (separator1,
DBUSMENU_MENUITEM_PROP_TYPE,
DBUSMENU_CLIENT_TYPES_SEPARATOR);
- dbusmenu_menuitem_child_add_position (self->root_item, separator1, 5);
+ dbusmenu_menuitem_child_add_position (self->root_item, separator1, 4);
}
static void
@@ -584,7 +572,7 @@ device_menu_mgr_build_devices_items (DeviceMenuMgr* self)
FALSE);
dbusmenu_menuitem_child_add_position (self->root_item,
device_heading,
- 6);
+ 5);
printers_menuitem = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (printers_menuitem,
@@ -596,7 +584,7 @@ device_menu_mgr_build_devices_items (DeviceMenuMgr* self)
"printers");
dbusmenu_menuitem_child_add_position(self->root_item,
printers_menuitem,
- 7);
+ 6);
scanners_menuitem = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (scanners_menuitem,
DBUSMENU_MENUITEM_PROP_LABEL,
@@ -607,7 +595,7 @@ device_menu_mgr_build_devices_items (DeviceMenuMgr* self)
NULL);
dbusmenu_menuitem_child_add_position (self->root_item,
scanners_menuitem,
- 8);
+ 7);
dbusmenu_menuitem_property_set_bool (scanners_menuitem,
DBUSMENU_MENUITEM_PROP_VISIBLE,
FALSE);
@@ -622,7 +610,7 @@ device_menu_mgr_build_devices_items (DeviceMenuMgr* self)
NULL);
dbusmenu_menuitem_child_add_position (self->root_item,
webcam_menuitem,
- 10);
+ 8);
dbusmenu_menuitem_property_set_bool (webcam_menuitem,
DBUSMENU_MENUITEM_PROP_VISIBLE,
FALSE);
@@ -631,7 +619,7 @@ device_menu_mgr_build_devices_items (DeviceMenuMgr* self)
dbusmenu_menuitem_property_set (separator3,
DBUSMENU_MENUITEM_PROP_TYPE,
DBUSMENU_CLIENT_TYPES_SEPARATOR);
- dbusmenu_menuitem_child_add_position (self->root_item, separator3, 11);
+ dbusmenu_menuitem_child_add_position (self->root_item, separator3, 9);
}
static void
@@ -752,7 +740,6 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self, gboolean greeter_mode)
self->udev_mgr = udev_mgr_new (scanners_menuitem, webcam_menuitem);
}
-
static void
device_menu_mgr_rebuild_items (DeviceMenuMgr* self)
{
@@ -833,7 +820,6 @@ device_menu_mgr_ensure_settings_client (DeviceMenuMgr* self)
keybinding_settings = g_settings_new (KEYBINDING_SCHEMA);
g_signal_connect(lockdown_settings, "changed::" KEY_LOCK_SCREEN, G_CALLBACK(keybinding_changed), self);
}
-
return;
}
diff --git a/src/dialog.c b/src/dialog.c
index 45cfdcb..4b139ca 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -62,7 +62,7 @@ static const gchar * button_auth_strings[LOGOUT_DIALOG_TYPE_CNT] = {
in place of a log out. */
static const gchar * restart_updates = N_("Restart Instead");
static const gchar * restart_auth = N_("Restart Instead…");
-static const gchar * body_logout_update = N_("Some software updates won't apply until the computer next restarts.");
+static const gchar * body_logout_update = N_("Some software updates won’t apply until the computer next restarts.");
static const gchar * icon_strings[LOGOUT_DIALOG_TYPE_CNT] = {
/* LOGOUT_DIALOG_LOGOUT, */ "system-log-out",
diff --git a/src/udev-mgr.c b/src/udev-mgr.c
index f66d862..edc2262 100644
--- a/src/udev-mgr.c
+++ b/src/udev-mgr.c
@@ -19,11 +19,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <gudev/gudev.h>
-// TEMP
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
+#include <glib/gi18n.h>
#include "udev-mgr.h"
#include "sane-rules.h"
@@ -53,7 +49,10 @@ static void debug_device (UdevMgr* self,
GUdevDevice* device,
UdevMgrDeviceAction action);
-
+static gchar* format_device_name (UdevMgr* self,
+ const gchar* brand,
+ const gchar* generic,
+ const gchar* branded) G_GNUC_WARN_UNUSED_RESULT;
struct _UdevMgr
{
GObject parent_instance;
@@ -235,13 +234,27 @@ udev_mgr_handle_webcam (UdevMgr* self,
}
g_hash_table_remove (self->webcams_present,
product);
-
+ dbusmenu_menuitem_property_set (self->webcam_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Webcam"));
}
else {
if (g_hash_table_lookup (self->webcams_present, product) != NULL){
g_warning ("Got an ADD event on a webcam device but we already have that device in our webcam cache");
return;
}
+
+ const gchar* manufacturer = NULL;
+ manufacturer = g_udev_device_get_property (device, "ID_VENDOR");
+
+ if (manufacturer != NULL){
+ gchar * label = format_device_name(self, manufacturer, _("Webcam"), _("%s Webcam"));
+ dbusmenu_menuitem_property_set (self->webcam_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ label);
+ g_free(label);
+ }
+
g_hash_table_insert (self->webcams_present,
g_strdup (product),
g_strdup (vendor));
@@ -254,23 +267,26 @@ debug_device (UdevMgr* self,
GUdevDevice* device,
UdevMgrDeviceAction action)
{
- /*const gchar* vendor;
+ const gchar* vendor;
const gchar* product;
const gchar* number;
const gchar* name;
+ const gchar* manufacturer;
vendor = g_udev_device_get_property (device, "ID_VENDOR_ID");
+ manufacturer = g_udev_device_get_property (device, "ID_VENDOR");
product = g_udev_device_get_property (device, "ID_MODEL_ID");
number = g_udev_device_get_number (device);
name = g_udev_device_get_name (device);
- g_debug ("device vendor id %s , product id of %s , number of %s and name of %s",
+ g_debug ("%s device vendor id %s , product id of %s , number of %s and name of %s",
+ g_strdup(manufacturer),
g_strdup(vendor),
g_strdup(product),
g_strdup(number),
g_strdup(name));
- const gchar *const *list;
+ /*const gchar *const *list;
const gchar *const *iter;
char propstr[500];
guint32 namelen = 0, i;
@@ -290,9 +306,10 @@ debug_device (UdevMgr* self,
strcat(propstr, " ");
strcat(propstr, g_udev_device_get_property(device, *iter));
g_debug("%s", propstr);
- }*/
+ }*/
}
-
+// TODO SCSI is not dynamic right ?
+// i.e. just need to handle startup scan.
static void udev_mgr_handle_scsi_device (UdevMgr* self,
GUdevDevice* device,
UdevMgrDeviceAction action)
@@ -300,7 +317,19 @@ static void udev_mgr_handle_scsi_device (UdevMgr* self,
const gchar* type = NULL;
type = g_udev_device_get_property (device, "TYPE");
// apparently anything thats type 3 and SCSI is a Scanner
- if (g_strcmp0 (type, "6") == 0){
+ if (g_strcmp0 (type, "6") == 0 && action == ADD){
+
+ const gchar* manufacturer = NULL;
+ manufacturer = g_udev_device_get_property (device, "ID_VENDOR");
+
+ if (manufacturer != NULL){
+ gchar * label = format_device_name(self, manufacturer, _("Scanner"), _("%s Scanner"));
+ dbusmenu_menuitem_property_set (self->scanner_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ label);
+ g_free(label);
+ }
+
gchar* random_scanner_name = g_strdup_printf("%p--scanner", self);
g_hash_table_insert (self->scanners_present,
random_scanner_name,
@@ -344,6 +373,10 @@ static void udev_mgr_handle_scsi_device (UdevMgr* self,
}
else{
g_hash_table_remove (self->scanners_present, vendor);
+ dbusmenu_menuitem_property_set (self->scanner_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Scanner"));
+
}
}
else{
@@ -351,6 +384,16 @@ static void udev_mgr_handle_scsi_device (UdevMgr* self,
g_warning ("Got an ADD event on a scanner device but we already have that device in our scanners cache");
}
else{
+ const gchar* manufacturer = NULL;
+ manufacturer = g_udev_device_get_property (device, "ID_VENDOR");
+
+ if (manufacturer != NULL){
+ gchar * label = format_device_name(self, manufacturer, _("Scanner"), _("%s Scanner"));
+ dbusmenu_menuitem_property_set (self->scanner_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ label);
+ g_free(label);
+ }
g_hash_table_insert (self->scanners_present,
g_strdup(vendor),
g_strdup(model_id));
@@ -366,7 +409,7 @@ udev_mgr_check_if_usb_device_is_supported (UdevMgr* self,
UdevMgrDeviceAction action)
{
const gchar* vendor = NULL;
- debug_device (self, device, action);
+ //debug_device (self, device, action);
vendor = g_udev_device_get_property (device, "ID_VENDOR_ID");
@@ -397,6 +440,9 @@ udev_mgr_check_if_usb_device_is_supported (UdevMgr* self,
}
else{
g_hash_table_remove (self->scanners_present, vendor);
+ dbusmenu_menuitem_property_set (self->scanner_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Scanner"));
}
}
else{
@@ -404,6 +450,17 @@ udev_mgr_check_if_usb_device_is_supported (UdevMgr* self,
g_warning ("Got an ADD event on a scanner device but we already have that device in our scanners cache");
}
else{
+ const gchar* manufacturer = NULL;
+
+ manufacturer = g_udev_device_get_property (device, "ID_VENDOR");
+ if (manufacturer != NULL){
+ gchar * label = format_device_name(self, manufacturer, _("Scanner"), _("%s Scanner"));
+ dbusmenu_menuitem_property_set (self->scanner_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ label);
+ g_free(label);
+ }
+
g_hash_table_insert (self->scanners_present,
g_strdup(vendor),
g_strdup(model_id));
@@ -454,3 +511,27 @@ UdevMgr* udev_mgr_new (DbusmenuMenuitem* scanner,
}
return mgr;
}
+
+static gchar* format_device_name (UdevMgr* self,
+ const gchar* brand,
+ const gchar* generic,
+ const gchar* branded)
+{
+ // We don't want to accommodate long names
+ if (strlen(brand) > 7)
+ return g_strdup(generic);
+
+ gint i = 0;
+
+ // If it contains something other than an alphabetic entry ignore it.
+ for(i = 0; i < sizeof(brand); i++){
+ if ( !g_ascii_isalpha (brand[i]) )
+ return g_strdup(generic);
+ }
+
+ gchar* lowered = g_ascii_strdown (brand, -1);
+ lowered[0] = g_ascii_toupper (lowered[0]);
+ gchar* label = g_strdup_printf(branded, lowered);
+ g_free (lowered);
+ return label;
+}
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c
index 5ac1c63..1b404d3 100644
--- a/src/user-menu-mgr.c
+++ b/src/user-menu-mgr.c
@@ -52,6 +52,10 @@ static gint compare_users_by_username (const gchar *a,
static void activate_online_accounts (DbusmenuMenuitem *mi,
guint timestamp,
gpointer user_data);
+static void activate_user_accounts (DbusmenuMenuitem *mi,
+ guint timestamp,
+ gpointer user_data);
+
static void user_menu_mgr_rebuild_items (UserMenuMgr *self,
gboolean greeter_mode);
static gboolean check_new_session ();
@@ -172,7 +176,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
gboolean user_menu_is_visible = FALSE;
if (!greeter_mode){
- user_menu_is_visible = self->user_count > 1;
+ user_menu_is_visible = self->user_count > 1 || check_guest_session();
}
session_dbus_set_user_menu_visibility (self->session_dbus_interface,
@@ -184,17 +188,29 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
for (u = users; u != NULL; u = g_list_next (u)) {
user = u->data;
- g_debug ("%p: %s", user, user->real_name);
+ //g_debug ("%p: %s", user, user->real_name);
user->service = self->users_dbus_interface;
-
+ gboolean current_user = g_strcmp0 (user->user_name, g_get_user_name()) == 0;
+ if (current_user == TRUE){
+ if (check_guest_session()){
+ g_debug ("about to set the users real name to %s for user %s",
+ user->real_name, user->user_name);
+ session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name);
+ }
+ else{
+ g_debug ("about to set the users real name to GUEST");
+ session_dbus_set_users_real_name (self->session_dbus_interface,
+ _("Guest"));
+ }
+ }
+
+
if (g_strcmp0(user->user_name, "guest") == 0) {
/* Check to see if the guest has sessions and so therefore should
get a check mark. */
- if (user->sessions != NULL) {
- dbusmenu_menuitem_property_set_bool (guest_mi,
- USER_ITEM_PROP_LOGGED_IN,
- TRUE);
- }
+ dbusmenu_menuitem_property_set_bool (guest_mi,
+ USER_ITEM_PROP_LOGGED_IN,
+ user->sessions != NULL);
/* If we're showing user accounts, keep going through the list */
if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) {
continue;
@@ -213,7 +229,7 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, conflictedname);
g_free(conflictedname);
} else {
- g_debug ("%p: %s", user, user->real_name);
+ //g_debug ("%p: %s", user, user->real_name);
dbusmenu_menuitem_property_set (mi,
USER_ITEM_PROP_NAME,
user->real_name);
@@ -234,16 +250,14 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self, gboolean greeter_mode)
USER_ITEM_ICON_DEFAULT);
}
- gboolean logged_in = g_strcmp0 (user->user_name, g_get_user_name()) == 0;
+
+ /*g_debug ("user name = %s and g user name = %s",
+ user->user_name,
+ g_get_user_name());*/
+
dbusmenu_menuitem_property_set_bool (mi,
USER_ITEM_PROP_IS_CURRENT_USER,
- logged_in);
- if (logged_in == TRUE){
- g_debug ("about to set the users real name to %s for user %s",
- user->real_name, user->user_name);
- session_dbus_set_users_real_name (self->session_dbus_interface, user->real_name);
- }
-
+ current_user);
dbusmenu_menuitem_child_append (self->root_item, mi);
g_signal_connect (G_OBJECT (mi),
DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
@@ -422,7 +436,7 @@ static gboolean
check_guest_session (void)
{
if (geteuid() < 500) {
- /* System users shouldn't have guest account shown. Mosly
+ /* System users shouldn't have guest account shown. Mostly
this would be the case of the guest user itself. */
return FALSE;
}
diff --git a/src/user-widget.c b/src/user-widget.c
index a3ad1e4..937a9eb 100644
--- a/src/user-widget.c
+++ b/src/user-widget.c
@@ -90,6 +90,10 @@ static gboolean user_widget_draw_usericon_gtk_3 (GtkWidget *widget,
static gboolean user_widget_primitive_draw_cb (GtkWidget *image,
GdkEventExpose *event,
gpointer user_data);
+static gboolean user_widget_draw_usericon_gtk_2 (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data);
+
#endif
G_DEFINE_TYPE (UserWidget, user_widget, GTK_TYPE_MENU_ITEM);
@@ -174,6 +178,9 @@ user_widget_init (UserWidget *self)
g_signal_connect_after (GTK_WIDGET(self), "expose-event",
G_CALLBACK(user_widget_primitive_draw_cb),
GTK_WIDGET(self));
+ g_signal_connect_after (GTK_WIDGET(priv->user_image), "expose-event",
+ G_CALLBACK(user_widget_draw_usericon_gtk_2),
+ GTK_WIDGET(self));
#endif
}
@@ -252,6 +259,23 @@ user_widget_draw_usericon_gtk_3 (GtkWidget *widget,
*/
// GTK 2 Expose handler
#else
+
+static gboolean
+user_widget_draw_usericon_gtk_2 (GtkWidget *widget,
+ GdkEventExpose *event,
+ gpointer user_data)
+{
+ g_return_val_if_fail(IS_USER_WIDGET(user_data), FALSE);
+ UserWidget* meta = USER_WIDGET(user_data);
+ UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(meta);
+
+ if (priv->using_personal_icon == FALSE)
+ return FALSE;
+
+ draw_album_border (widget, FALSE);
+ return FALSE;
+}
+
static gboolean
user_widget_primitive_draw_cb (GtkWidget *widget,
GdkEventExpose *event,
@@ -273,10 +297,12 @@ user_widget_primitive_draw_cb (GtkWidget *widget,
gdouble x, y;
style = gtk_widget_get_style (widget);
+
+ GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
x = allocation.x + 13;
- y = allocation.height / 2;
+ y = allocation.y + allocation.height/2;
cairo_arc (cr, x, y, 3.0, 0.0, 2 * G_PI);;
diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h
index c3f0171..4dbf2a4 100644
--- a/src/users-service-dbus.h
+++ b/src/users-service-dbus.h
@@ -57,7 +57,7 @@ struct _UserData
/* XXX - MAXIMUM_USERS should be set to 7 once we've
* got some gdm issues worked out.
*/
-#define MINIMUM_USERS 1
+#define MINIMUM_USERS 0
#define MAXIMUM_USERS 7
struct _UsersServiceDbus {