[gnome-control-center] lib: Add a lock button
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] lib: Add a lock button
- Date: Wed, 23 Feb 2011 15:00:14 +0000 (UTC)
commit 3336eb9d8850bc64d8a5f4dd9511ddea155628c9
Author: Bastien Nocera <hadess hadess net>
Date: Wed Feb 23 14:59:21 2011 +0000
lib: Add a lock button
Instead of using a copy/pasted version, until GTK+ includes
such a button itself.
libgnome-control-center/Makefile.am | 3 +
panels/datetime/Makefile.am | 2 -
panels/datetime/cc-datetime-panel.c | 4 +-
panels/datetime/dt-lockbutton.c | 627 ----------------------------------
panels/datetime/dt-lockbutton.h | 68 ----
panels/printers/Makefile.am | 2 -
panels/printers/cc-printers-panel.c | 4 +-
panels/printers/pp-lockbutton.c | 627 ----------------------------------
panels/printers/pp-lockbutton.h | 68 ----
panels/user-accounts/Makefile.am | 2 -
panels/user-accounts/um-lockbutton.c | 627 ----------------------------------
panels/user-accounts/um-lockbutton.h | 68 ----
panels/user-accounts/um-user-panel.c | 4 +-
13 files changed, 9 insertions(+), 2097 deletions(-)
---
diff --git a/libgnome-control-center/Makefile.am b/libgnome-control-center/Makefile.am
index d44745a..0e3d851 100644
--- a/libgnome-control-center/Makefile.am
+++ b/libgnome-control-center/Makefile.am
@@ -15,6 +15,7 @@ libgnome_control_center_include_HEADERS = \
cc-panel.h \
cc-shell.h \
gconf-property-editor.h \
+ cc-lockbutton.h \
$(NULL)
libgnome_control_center_la_SOURCES = \
@@ -24,6 +25,8 @@ libgnome_control_center_la_SOURCES = \
cc-panel.h \
cc-shell.c \
cc-shell.h \
+ cc-lockbutton.c \
+ cc-lockbutton.h \
gconf-property-editor.c \
gconf-property-editor.h \
$(NULL)
diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
index bbf6334..f29d8e9 100644
--- a/panels/datetime/Makefile.am
+++ b/panels/datetime/Makefile.am
@@ -89,8 +89,6 @@ ccpanels_LTLIBRARIES = libdate_time.la
libdate_time_la_SOURCES = \
datetime-module.c \
- dt-lockbutton.c \
- dt-lockbutton.h \
cc-datetime-panel.c \
cc-datetime-panel.h \
cc-timezone-map.c \
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index 63f8723..52cdfc1 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -24,7 +24,7 @@
#include <sys/time.h>
#include "cc-timezone-map.h"
#include "set-timezone.h"
-#include "dt-lockbutton.h"
+#include "cc-lockbutton.h"
#include <gsettings-desktop-schemas/gdesktop-enums.h>
#include <string.h>
@@ -880,7 +880,7 @@ cc_date_time_panel_init (CcDateTimePanel *self)
}
/* DtLockButton takes ownership of the permission */
- lockbutton = dt_lock_button_new (permission);
+ lockbutton = cc_lock_button_new (permission);
gtk_widget_set_margin_top (lockbutton, 12);
gtk_widget_show (lockbutton);
gtk_box_pack_end ((GtkBox *) gtk_builder_get_object (priv->builder, "hbox"),
diff --git a/panels/printers/Makefile.am b/panels/printers/Makefile.am
index 637cf05..96caf47 100644
--- a/panels/printers/Makefile.am
+++ b/panels/printers/Makefile.am
@@ -16,8 +16,6 @@ ccpanelsdir = $(PANELS_DIR)
ccpanels_LTLIBRARIES = libprinters.la
libprinters_la_SOURCES = \
- pp-lockbutton.c \
- pp-lockbutton.h \
printers-module.c \
cc-printers-panel.c \
cc-printers-panel.h
diff --git a/panels/printers/cc-printers-panel.c b/panels/printers/cc-printers-panel.c
index 2081ae1..84bd7f7 100644
--- a/panels/printers/cc-printers-panel.c
+++ b/panels/printers/cc-printers-panel.c
@@ -32,7 +32,7 @@
#include <math.h>
-#include "pp-lockbutton.h"
+#include "cc-lockbutton.h"
G_DEFINE_DYNAMIC_TYPE (CcPrintersPanel, cc_printers_panel, CC_TYPE_PANEL)
@@ -2296,7 +2296,7 @@ cc_printers_panel_init (CcPrintersPanel *self)
"org.opensuse.cupspkhelper.mechanism.printeraddremove", NULL, NULL, NULL);
if (priv->permission != NULL)
{
- widget = pp_lock_button_new (priv->permission);
+ widget = cc_lock_button_new (priv->permission);
gtk_widget_set_margin_top (widget, 12);
gtk_widget_show (widget);
box = (GtkWidget*) gtk_builder_get_object (priv->builder, "main-vbox");
diff --git a/panels/user-accounts/Makefile.am b/panels/user-accounts/Makefile.am
index 8af36c7..af74b3a 100644
--- a/panels/user-accounts/Makefile.am
+++ b/panels/user-accounts/Makefile.am
@@ -38,8 +38,6 @@ libuser_accounts_la_SOURCES = \
um-account-dialog.c \
um-language-dialog.h \
um-language-dialog.c \
- um-lockbutton.h \
- um-lockbutton.c \
um-password-dialog.h \
um-password-dialog.c \
um-photo-dialog.h \
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index cb432ba..35b3de5 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -47,7 +47,7 @@
#include "um-editable-button.h"
#include "um-editable-entry.h"
#include "um-editable-combo.h"
-#include "um-lockbutton.h"
+#include "cc-lockbutton.h"
#include "um-account-dialog.h"
#include "um-language-dialog.h"
@@ -1169,7 +1169,7 @@ setup_main_window (UmUserPanelPrivate *d)
d->permission = (GPermission *)polkit_permission_new_sync ("org.freedesktop.accounts.user-administration", NULL, NULL, NULL);
if (d->permission != NULL) {
/* accounts service not available? */
- button = um_lock_button_new (d->permission);
+ button = cc_lock_button_new (d->permission);
gtk_widget_set_margin_top (button, 12);
gtk_widget_show (button);
box = get_widget (d, "accounts-vbox");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]