[Xfce4-commits] <xfce4-settings:nick/accountsservice> Initial dialog with some basic reading.

Nick Schermer noreply at xfce.org
Thu Dec 8 22:04:02 CET 2011


Updating branch refs/heads/nick/accountsservice
         to 358d1c1411e59a95797b531337cb6ca7d08d628e (commit)
       from b4966f4a8ac9710124c4d1c927edea74c8dc7019 (commit)

commit 358d1c1411e59a95797b531337cb6ca7d08d628e
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Dec 8 22:02:41 2011 +0100

    Initial dialog with some basic reading.

 configure.ac.in                                    |   12 +
 dialogs/Makefile.am                                |    7 +-
 dialogs/user-settings/Makefile.am                  |   66 +++
 dialogs/user-settings/avatar-default.png           |  Bin 0 -> 4340 bytes
 dialogs/user-settings/main.c                       |  435 ++++++++++++++++++++
 dialogs/user-settings/user-dialog.glade            |  414 +++++++++++++++++++
 .../xfce4-user-settings.desktop.in}                |    8 +-
 7 files changed, 936 insertions(+), 6 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index ea6be47..047e455 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -122,6 +122,12 @@ dnl ***********************************
 XDT_CHECK_OPTIONAL_PACKAGE([XRANDR], [xrandr], [1.2.0],
                            [xrandr], [Xrandr support])
 
+dnl ********************************************
+dnl *** Optional support for accountsservice ***
+dnl ********************************************
+XDT_CHECK_OPTIONAL_PACKAGE([ACCOUNTSSERVICE], [accountsservice], [0.6.11],
+                           [accountsservice], [User editing support])
+
 dnl ***********************************
 dnl *** Optional support for hwdata ***
 dnl ***********************************
@@ -225,6 +231,7 @@ dialogs/accessibility-settings/Makefile
 dialogs/display-settings/Makefile
 dialogs/keyboard-settings/Makefile
 dialogs/mouse-settings/Makefile
+dialogs/user-settings/Makefile
 xfsettingsd/Makefile
 xfce4-settings-manager/Makefile
 xfce4-settings-editor/Makefile
@@ -243,6 +250,11 @@ echo "* Xrandr support:            yes"
 else
 echo "* Xrandr support:            no"
 fi
+if test x"$ACCOUNTSSERVICE_FOUND" = x"yes"; then
+echo "* User editing support:      yes"
+else
+echo "* User editing support:      no"
+fi
 if test x"$LIBNOTIFY_FOUND" = x"yes"; then
 echo "* Libnotify support:         yes"
 else
diff --git a/dialogs/Makefile.am b/dialogs/Makefile.am
index e5ecd12..7f2d7ec 100644
--- a/dialogs/Makefile.am
+++ b/dialogs/Makefile.am
@@ -7,6 +7,9 @@ SUBDIRS = \
 	mouse-settings
 
 if HAVE_XRANDR
-SUBDIRS += \
-	display-settings
+SUBDIRS += display-settings
+endif
+
+if HAVE_ACCOUNTSSERVICE
+SUBDIRS += user-settings
 endif
diff --git a/dialogs/user-settings/Makefile.am b/dialogs/user-settings/Makefile.am
new file mode 100644
index 0000000..cf64d2a
--- /dev/null
+++ b/dialogs/user-settings/Makefile.am
@@ -0,0 +1,66 @@
+
+INCLUDES = \
+	-I${top_srcdir} \
+	-DDATADIR=\"$(datadir)\" \
+	-DSRCDIR=\"$(top_srcdir)\" \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DG_LOG_DOMAIN=\"xfce4-user-settings\" \
+	$(PLATFORM_CPPFLAGS)
+
+bin_PROGRAMS = \
+	xfce4-user-settings
+
+xfce4_user_settings_SOURCES = \
+	avatar_default.h \
+	main.c \
+	user-dialog_ui.h
+
+xfce4_user_settings_CFLAGS = \
+	$(GTK_CFLAGS) \
+	$(EXO_CFLAGS) \
+	$(LIBXFCE4UI_CFLAGS) \
+	$(XFCONF_CFLAGS) \
+	$(ACCOUNTSSERVICE_CFLAGS) \
+	$(PLATFORM_CFLAGS)
+
+xfce4_user_settings_LDFLAGS = \
+	-no-undefined \
+	$(PLATFORM_LDFLAGS)
+
+xfce4_user_settings_LDADD = \
+	$(GTK_LIBS) \
+	$(EXO_LIBS) \
+	$(LIBXFCE4UI_LIBS) \
+	$(ACCOUNTSSERVICE_LIBS) \
+	$(XFCONF_LIBS)
+
+if MAINTAINER_MODE
+
+BUILT_SOURCES = \
+	user-dialog_ui.h \
+	avatar_default.h
+
+user-dialog_ui.h: user-dialog.glade
+	exo-csource --static --strip-comments --strip-content --name=user_dialog_ui $< >$@
+
+avatar_default.h: $(srcdir)/avatar-default.png
+	$(AM_V_GEN) gdk-pixbuf-csource --static --stream --name=avatar_default $< > $@
+
+endif
+
+desktopdir = $(datadir)/applications
+desktop_in_files = xfce4-user-settings.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+ at INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = \
+	$(desktop_in_files) \
+	avatar-default.png \
+	user-dialog.glade
+
+DISTCLEANFILES = \
+	$(desktop_DATA) \
+	$(BUILT_SOURCES)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/dialogs/user-settings/avatar-default.png b/dialogs/user-settings/avatar-default.png
new file mode 100644
index 0000000..a8e6a4d
Binary files /dev/null and b/dialogs/user-settings/avatar-default.png differ
diff --git a/dialogs/user-settings/main.c b/dialogs/user-settings/main.c
new file mode 100644
index 0000000..cca0efc
--- /dev/null
+++ b/dialogs/user-settings/main.c
@@ -0,0 +1,435 @@
+/*
+ *  Copyright (c) 2011 Nick Schermer <nick at xfce.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include <libxfce4ui/libxfce4ui.h>
+#include <libxfce4util/libxfce4util.h>
+#include <act/act-user-manager.h>
+#include <xfconf/xfconf.h>
+#include <exo/exo.h>
+
+#include "user-dialog_ui.h"
+#include "avatar_default.h"
+
+
+
+static GdkNativeWindow opt_socket_id = 0;
+static gboolean        opt_version = FALSE;
+
+static GQuark manager_quark;
+static GOptionEntry entries[] =
+{
+    { "socket-id", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &opt_socket_id, N_("Settings manager socket"), N_("SOCKET ID") },
+    { "version", 'v', 0, G_OPTION_ARG_NONE, &opt_version, N_("Version information"), NULL },
+    { NULL }
+};
+
+enum
+{
+    USERS_COL_ICON,
+    USERS_COL_NAME,
+    USERS_COL_ABSTRACT
+};
+
+
+
+static GdkPixbuf *
+user_settings_user_icon (ActUser *user,
+                         gint     size)
+{
+    const gchar *file;
+    GdkPixbuf   *icon = NULL;
+    GError      *error = NULL;
+    GdkPixbuf   *scaled;
+
+    g_return_val_if_fail (ACT_IS_USER (user), NULL);
+
+    file = act_user_get_icon_file (user);
+    if (file != NULL && g_file_test (file, G_FILE_TEST_EXISTS))
+    {
+        icon = gdk_pixbuf_new_from_file (file, &error);
+        if (icon == NULL)
+        {
+            g_warning ("Failed to load icon \"%s\": %s", file, error->message);
+            g_error_free (error);
+        }
+    }
+
+    /* Fallback icon */
+    if (icon == NULL)
+        icon = gdk_pixbuf_new_from_inline (-1, avatar_default, FALSE, NULL);
+
+    /* Scale to requested size */
+    if (icon != NULL)
+    {
+        scaled = exo_gdk_pixbuf_scale_ratio (icon, size);
+        g_object_unref (G_OBJECT (icon));
+        icon = scaled;
+    }
+
+    return icon;
+}
+
+
+
+static void
+user_settings_user_update (ActUserManager *manager,
+                           ActUser        *user,
+                           GtkBuilder     *builder)
+{
+    GObject     *object;
+    const gchar *name;
+    GdkPixbuf   *icon;
+
+    g_return_if_fail (ACT_IS_USER_MANAGER (manager));
+    g_return_if_fail (ACT_IS_USER (user));
+    g_return_if_fail (GTK_IS_BUILDER (builder));
+
+    name = act_user_get_real_name (user);
+    if (name == NULL || *name == '\0')
+      name = act_user_get_user_name (user);
+
+    object = gtk_builder_get_object (builder, "user-name");
+    g_return_if_fail (GTK_IS_ENTRY (object));
+    gtk_entry_set_text (GTK_ENTRY (object), name);
+
+    object = gtk_builder_get_object (builder, "user-type-combo");
+    g_return_if_fail (GTK_IS_COMBO_BOX (object));
+    gtk_combo_box_set_active (GTK_COMBO_BOX (object),
+        act_user_get_account_type (user));
+
+    object = gtk_builder_get_object (builder, "user-lang-combo");
+    g_return_if_fail (GTK_IS_COMBO_BOX (object));
+
+    object = gtk_builder_get_object (builder, "user-auto-login");
+    g_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (object),
+        act_user_get_automatic_login (user));
+
+    object = gtk_builder_get_object (builder, "user-icon");
+    g_return_if_fail (GTK_IS_IMAGE (object));
+    icon = user_settings_user_icon (user, 48);
+    gtk_image_set_from_pixbuf (GTK_IMAGE (object), icon);
+    if (icon != NULL)
+        g_object_unref (G_OBJECT (icon));
+}
+
+
+
+static void
+user_settings_user_added (ActUserManager *manager,
+                          ActUser        *user,
+                          GtkBuilder     *builder,
+                          GtkTreeIter    *iter_return)
+{
+    gchar       *abstract;
+    GObject     *model;
+    GtkTreeIter  iter;
+    const gchar *name;
+    const gchar *role;
+    GdkPixbuf   *icon;
+
+    g_return_if_fail (ACT_IS_USER_MANAGER (manager));
+    g_return_if_fail (ACT_IS_USER (user));
+    g_return_if_fail (GTK_IS_BUILDER (builder));
+
+    model = gtk_builder_get_object (builder, "users-model");
+    g_return_if_fail (GTK_IS_LIST_STORE (model));
+
+    name = act_user_get_real_name (user);
+    if (name == NULL || *name == '\0')
+      name = act_user_get_user_name (user);
+
+    if (act_user_get_account_type (user) == ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR)
+      role = _("Administrator");
+    else
+      role = _("Standard");
+
+    abstract = g_markup_printf_escaped ("%s\n<small>%s</small>", name, role);
+
+    icon = user_settings_user_icon (user, 32);
+
+    gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+    gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                        USERS_COL_ICON, icon,
+                        USERS_COL_NAME, act_user_get_user_name (user),
+                        USERS_COL_ABSTRACT, abstract,
+                        -1);
+
+    if (icon != NULL)
+        g_object_unref (G_OBJECT (icon));
+    g_free (abstract);
+
+    if (iter_return != NULL)
+        *iter_return = iter;
+}
+
+
+
+static void
+user_settings_user_removed (ActUserManager *manager,
+                            ActUser        *user,
+                            GtkBuilder     *builder)
+{
+    g_return_if_fail (ACT_IS_USER_MANAGER (manager));
+    g_return_if_fail (ACT_IS_USER (user));
+    g_return_if_fail (GTK_IS_BUILDER (builder));
+
+    g_message ("user %s removed", act_user_get_user_name (user));
+}
+
+
+
+static void
+user_settings_user_changed (ActUserManager *manager,
+                            ActUser        *user,
+                            GtkBuilder     *builder)
+{
+    g_return_if_fail (ACT_IS_USER_MANAGER (manager));
+    g_return_if_fail (ACT_IS_USER (user));
+    g_return_if_fail (GTK_IS_BUILDER (builder));
+
+    g_message ("user %s changed", act_user_get_user_name (user));
+}
+
+
+
+static void
+user_settings_user_selection_changed (GtkTreeSelection *selection,
+                                      GtkBuilder       *builder)
+{
+    gchar          *name = NULL;
+    GtkTreeModel   *model;
+    GtkTreeIter     iter;
+    ActUserManager *manager;
+    ActUser        *user;
+
+    g_return_if_fail (GTK_IS_TREE_SELECTION (selection));
+    g_return_if_fail (GTK_IS_BUILDER (builder));
+
+    /* Get the Username */
+    if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+        return;
+
+    gtk_tree_model_get (model, &iter, USERS_COL_NAME, &name, -1);
+    if (name == NULL)
+        return;
+
+    /* Get object from manager */
+    manager = g_object_get_qdata (G_OBJECT (builder), manager_quark);
+    user = act_user_manager_get_user (manager, name);
+    g_free (name);
+
+    /* Update widgets */
+    user_settings_user_update (manager, user, builder);
+}
+
+
+
+static void
+user_settings_manager_is_loaded (ActUserManager *manager,
+                                 GParamSpec     *pspec,
+                                 GtkBuilder     *builder)
+{
+    GSList           *users, *li;
+    GtkTreeIter       iter;
+    const gchar      *current;
+    GObject          *object;
+    GtkTreeSelection *selection;
+
+    g_return_if_fail (ACT_IS_USER_MANAGER (manager));
+    g_return_if_fail (GTK_IS_BUILDER (builder));
+
+    /* Disconnect this function */
+    g_signal_handlers_disconnect_by_func (G_OBJECT (manager),
+        G_CALLBACK (user_settings_manager_is_loaded), builder);
+
+    /* Watch manager changes */
+    g_signal_connect (G_OBJECT (manager), "user-added",
+        G_CALLBACK (user_settings_user_added), builder);
+    g_signal_connect (G_OBJECT (manager), "user-removed",
+        G_CALLBACK (user_settings_user_removed), builder);
+    g_signal_connect (G_OBJECT (manager), "user-changed",
+        G_CALLBACK (user_settings_user_changed), builder);
+
+    current = g_get_user_name ();
+
+    /* Add the known users */
+    users = act_user_manager_list_users (manager);
+    for (li = users; li != NULL; li = li->next)
+    {
+        user_settings_user_added (manager, li->data, builder, &iter);
+
+        /* Select current user */
+        if (g_strcmp0 (current, act_user_get_user_name (li->data)) == 0)
+        {
+            object = gtk_builder_get_object (builder, "users-treeview");
+            g_return_if_fail (GTK_IS_TREE_VIEW (object));
+
+            selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (object));
+            gtk_tree_selection_select_iter (selection, &iter);
+
+            current = NULL;
+        }
+    }
+    g_slist_free (users);
+}
+
+
+
+gint
+main (gint argc, gchar **argv)
+{
+    GObject          *dialog, *plug_child;
+    GtkWidget        *plug;
+    GtkBuilder       *builder;
+    GError           *error = NULL;
+    ActUserManager   *manager;
+    GObject          *object;
+    GtkTreeSelection *selection;
+
+    /* Init quark */
+    manager_quark = g_quark_from_static_string ("user-manager");
+
+    /* Setup translation domain */
+    xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
+
+    if(!gtk_init_with_args (&argc, &argv, "", entries, PACKAGE, &error))
+    {
+        if (G_LIKELY (error))
+        {
+            g_print ("%s: %s.\n", G_LOG_DOMAIN, error->message);
+            g_print (_("Type '%s --help' for usage."), G_LOG_DOMAIN);
+            g_print ("\n");
+
+            g_error_free (error);
+        }
+        else
+        {
+            g_error ("Unable to open display.");
+        }
+
+        return EXIT_FAILURE;
+    }
+
+    /* Check if we should print version information */
+    if (G_UNLIKELY (opt_version))
+    {
+        g_print ("%s %s (Xfce %s)\n\n", G_LOG_DOMAIN, PACKAGE_VERSION, xfce_version_string ());
+        g_print ("%s\n", "Copyright (c) 2008-2011");
+        g_print ("\t%s\n\n", _("The Xfce development team. All rights reserved."));
+        g_print (_("Please report bugs to <%s>."), PACKAGE_BUGREPORT);
+        g_print ("\n");
+
+        return EXIT_SUCCESS;
+    }
+
+    /* Initialize xfconf */
+    if (!xfconf_init (&error))
+    {
+        /* Print error and exit */
+        g_error ("Failed to connect to xfconf daemon: %s.", error->message);
+        g_error_free (error);
+
+        return EXIT_FAILURE;
+    }
+
+    /* Hook to make sure the libxfce4ui library is linked */
+    if (xfce_titled_dialog_get_type () == 0)
+        return EXIT_FAILURE;
+
+    /* Load the Gtk user-interface file */
+    builder = gtk_builder_new ();
+    if (gtk_builder_add_from_string (builder, user_dialog_ui,
+                                     user_dialog_ui_length, &error) != 0)
+    {
+        /* Wait for the manager to complete... */
+        manager = act_user_manager_get_default ();
+        g_object_set_qdata (G_OBJECT (builder), manager_quark, manager);
+        g_signal_connect (G_OBJECT (manager), "notify::is-loaded",
+            G_CALLBACK (user_settings_manager_is_loaded), builder);
+
+        object = gtk_builder_get_object (builder, "users-treeview");
+        g_return_val_if_fail (GTK_IS_TREE_VIEW (object), EXIT_FAILURE);
+        selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (object));
+        gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
+        g_signal_connect (G_OBJECT (selection), "changed",
+            G_CALLBACK (user_settings_user_selection_changed), builder);
+
+        if (G_UNLIKELY (opt_socket_id == 0))
+        {
+            /* Get the dialog widget */
+            dialog = gtk_builder_get_object (builder, "dialog");
+
+            gtk_widget_show (GTK_WIDGET (dialog));
+            g_signal_connect (dialog, "response", G_CALLBACK (gtk_main_quit), NULL);
+
+            /* To prevent the settings dialog to be saved in the session */
+            gdk_set_sm_client_id ("FAKE ID");
+
+            gtk_main ();
+
+            gtk_widget_destroy (GTK_WIDGET (dialog));
+        }
+        else
+        {
+            /* Create plug widget */
+            plug = gtk_plug_new (opt_socket_id);
+            g_signal_connect (plug, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
+            gtk_widget_show (plug);
+
+            /* Stop startup notification */
+            gdk_notify_startup_complete ();
+
+            /* Get plug child widget */
+            plug_child = gtk_builder_get_object (builder, "plug-child");
+            gtk_widget_reparent (GTK_WIDGET (plug_child), plug);
+            gtk_widget_show (GTK_WIDGET (plug_child));
+
+            /* To prevent the settings dialog to be saved in the session */
+            gdk_set_sm_client_id ("FAKE ID");
+
+            /* Enter main loop */
+            gtk_main ();
+        }
+
+        g_object_unref (G_OBJECT (manager));
+    }
+    else
+    {
+        g_error ("Failed to load the UI file: %s.", error->message);
+        g_error_free (error);
+    }
+
+    g_object_unref (G_OBJECT (builder));
+
+    /* Shutdown xfconf */
+    xfconf_shutdown();
+
+    return EXIT_SUCCESS;
+}
diff --git a/dialogs/user-settings/user-dialog.glade b/dialogs/user-settings/user-dialog.glade
new file mode 100644
index 0000000..c07cffa
--- /dev/null
+++ b/dialogs/user-settings/user-dialog.glade
@@ -0,0 +1,414 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="2.24"/>
+  <!-- interface-requires libxfce4ui 4.5 -->
+  <!-- interface-naming-policy project-wide -->
+  <object class="XfceTitledDialog" id="dialog">
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">User Accounts</property>
+    <property name="icon_name">system-users</property>
+    <property name="type_hint">dialog</property>
+    <property name="subtitle" translatable="yes">Modify, add or remove user accounts</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button-close">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button-unlock">
+                <property name="label" translatable="yes">_Unlock</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="image">image2</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHPaned" id="hpaned1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <object class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">6</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hscrollbar_policy">automatic</property>
+                    <property name="vscrollbar_policy">automatic</property>
+                    <property name="shadow_type">etched-in</property>
+                    <child>
+                      <object class="GtkTreeView" id="users-treeview">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="model">users-model</property>
+                        <child>
+                          <object class="GtkTreeViewColumn" id="column">
+                            <property name="title" translatable="yes">User Accounts</property>
+                            <child>
+                              <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
+                              <attributes>
+                                <attribute name="pixbuf">0</attribute>
+                              </attributes>
+                            </child>
+                            <child>
+                              <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                              <attributes>
+                                <attribute name="markup">2</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHButtonBox" id="hbuttonbox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkButton" id="button-add">
+                        <property name="label">gtk-add</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="button-delete">
+                        <property name="label">gtk-delete</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_stock">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="border_width">6</property>
+                <property name="n_rows">5</property>
+                <property name="n_columns">2</property>
+                <property name="column_spacing">12</property>
+                <property name="row_spacing">6</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">1</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkButton" id="user-icon-button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="relief">none</property>
+                        <child>
+                          <object class="GtkImage" id="user-icon">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="stock">gtk-missing-image</property>
+                            <property name="icon-size">6</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="user-auto-login">
+                    <property name="label" translatable="yes">Auto_matic login</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="user-lang-combo">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">user-lang-model</property>
+                    <child>
+                      <object class="GtkCellRendererText" id="cellrenderertext3"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="user-type-combo">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">user-type-model</property>
+                    <child>
+                      <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                      <attributes>
+                        <attribute name="text">0</attribute>
+                      </attributes>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">_Language:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">user-lang-combo</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">Account _Type:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">user-type-combo</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="user-name">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="shadow_type">out</property>
+                    <property name="invisible_char_set">True</property>
+                    <property name="primary_icon_activatable">False</property>
+                    <property name="secondary_icon_activatable">False</property>
+                    <property name="primary_icon_sensitive">True</property>
+                    <property name="secondary_icon_sensitive">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">1</property>
+                    <property name="label" translatable="yes">User _Name:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">user-name</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <object class="GtkButton" id="user-passs">
+                        <property name="label" translatable="yes">Change Pa_ssword...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">button-close</action-widget>
+      <action-widget response="0">button-unlock</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkImage" id="image2">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="stock">gtk-dialog-authentication</property>
+  </object>
+  <object class="GtkListStore" id="user-lang-model">
+    <columns>
+      <!-- column-name < -->
+      <column type="< define a new column >"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="user-type-model">
+    <columns>
+      <!-- column-name title -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Standard</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Administrator</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="users-model">
+    <columns>
+      <!-- column-name icon -->
+      <column type="GdkPixbuf"/>
+      <!-- column-name username -->
+      <column type="gchararray"/>
+      <!-- column-name abstract -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+</interface>
diff --git a/dialogs/display-settings/xfce-display-settings.desktop.in b/dialogs/user-settings/xfce4-user-settings.desktop.in
similarity index 66%
copy from dialogs/display-settings/xfce-display-settings.desktop.in
copy to dialogs/user-settings/xfce4-user-settings.desktop.in
index ccec807..8be01ed 100644
--- a/dialogs/display-settings/xfce-display-settings.desktop.in
+++ b/dialogs/user-settings/xfce4-user-settings.desktop.in
@@ -1,9 +1,9 @@
 [Desktop Entry]
 Version=1.0
-_Name=Display
-_Comment=Configure screen settings and layout
-Exec=xfce4-display-settings
-Icon=video-display
+_Name=User Accounts
+_Comment=Modify, add or remove user accounts
+Exec=xfce4-user-settings
+Icon=system-users
 Terminal=false
 Type=Application
 Categories=X-XFCE;Settings;DesktopSettings;X-XfceSettingsDialog;


More information about the Xfce4-commits mailing list