~ubuntu-branches/ubuntu/intrepid/gnome-system-tools/intrepid-updates

« back to all changes in this revision

Viewing changes to src/users/users-tool.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-09-17 15:18:26 UTC
  • mfrom: (1.1.25 upstream)
  • Revision ID: james.westby@ubuntu.com-20070917151826-1a6idiyzmnmx3p8y
Tags: 2.20.0-0ubuntu1
* New upstream version
  Users
  - Actually obbey the "show_all" gconf key (LP: #124993)
  Translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
static void  gst_users_tool_update_gui     (GstTool *tool);
33
33
static void  gst_users_tool_update_config  (GstTool *tool);
34
34
 
 
35
static GObject* gst_users_tool_constructor (GType                  type,
 
36
                                            guint                  n_construct_properties,
 
37
                                            GObjectConstructParam *construct_params);
 
38
 
35
39
G_DEFINE_TYPE (GstUsersTool, gst_users_tool, GST_TYPE_TOOL);
36
40
 
37
41
static void
39
43
{
40
44
        GObjectClass *object_class = G_OBJECT_CLASS (class);
41
45
        GstToolClass *tool_class = GST_TOOL_CLASS (class);
42
 
        
 
46
 
 
47
        object_class->constructor = gst_users_tool_constructor;
43
48
        object_class->finalize = gst_users_tool_finalize;
44
49
        tool_class->update_gui = gst_users_tool_update_gui;
45
50
        tool_class->update_config = gst_users_tool_update_config;
52
57
                    gpointer     data)
53
58
{
54
59
        GstTool *tool = GST_TOOL (data);
 
60
        GConfValue *value;
55
61
        GtkWidget *widget;
56
62
        GtkTreeModel *model;
57
63
 
58
 
        GST_USERS_TOOL (tool)->showall ^= 1;
 
64
        value = gconf_entry_get_value (entry);
 
65
        GST_USERS_TOOL (tool)->showall = gconf_value_get_bool (value);
59
66
 
60
67
        widget = gst_dialog_get_widget (tool->main_dialog, "users_table");
61
68
        model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
81
88
                      "maximum-gid", &tool->maximum_gid,
82
89
                      NULL);
83
90
 
84
 
        tool->showall = gst_conf_get_boolean (GST_TOOL (tool), "showall");
 
91
        tool->profiles = gst_user_profiles_get ();
 
92
}
 
93
 
 
94
static GObject*
 
95
gst_users_tool_constructor (GType                  type,
 
96
                            guint                  n_construct_properties,
 
97
                            GObjectConstructParam *construct_params)
 
98
{
 
99
        GObject *object;
 
100
        GstTool *tool;
 
101
 
 
102
        object = (* G_OBJECT_CLASS (gst_users_tool_parent_class)->constructor) (type,
 
103
                                                                                n_construct_properties,
 
104
                                                                                construct_params);
 
105
 
 
106
        tool = GST_TOOL (object);
 
107
        GST_USERS_TOOL (tool)->showall = gst_conf_get_boolean (GST_TOOL (tool), "showall");
85
108
 
86
109
        gst_conf_add_notify (GST_TOOL (tool), "showall",
87
110
                             on_showall_changed, tool);
88
111
 
89
 
        tool->profiles = gst_user_profiles_get ();
 
112
        return object;
90
113
}
91
114
 
92
115
static void