[gnome-control-center] user-accounts: Rename UmUserImage to CcUserImage
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Rename UmUserImage to CcUserImage
- Date: Tue, 13 Nov 2018 21:15:52 +0000 (UTC)
commit 4767a094bdb3fb77ce31c321d6d08c0945b4d372
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Nov 7 16:24:37 2018 +1300
user-accounts: Rename UmUserImage to CcUserImage
Um is a naming hangover from before this was part of g-c-c.
.../{um-user-image.c => cc-user-image.c} | 26 +++++++++++-----------
.../{um-user-image.h => cc-user-image.h} | 8 +++----
panels/user-accounts/cc-user-panel.c | 17 +++++++-------
panels/user-accounts/cc-user-panel.ui | 4 ++--
panels/user-accounts/meson.build | 2 +-
5 files changed, 28 insertions(+), 29 deletions(-)
---
diff --git a/panels/user-accounts/um-user-image.c b/panels/user-accounts/cc-user-image.c
similarity index 78%
rename from panels/user-accounts/um-user-image.c
rename to panels/user-accounts/cc-user-image.c
index f930039cb..68b5455ad 100644
--- a/panels/user-accounts/um-user-image.c
+++ b/panels/user-accounts/cc-user-image.c
@@ -16,23 +16,23 @@
* (C) Copyright 2015 Red Hat, Inc.
*/
-#include "um-user-image.h"
+#include "cc-user-image.h"
#include <gtk/gtk.h>
#include <act/act.h>
#include "um-utils.h"
-struct _UmUserImage {
+struct _CcUserImage {
GtkImage parent_instance;
ActUser *user;
};
-G_DEFINE_TYPE (UmUserImage, um_user_image, GTK_TYPE_IMAGE)
+G_DEFINE_TYPE (CcUserImage, cc_user_image, GTK_TYPE_IMAGE)
static void
-render_image (UmUserImage *image)
+render_image (CcUserImage *image)
{
cairo_surface_t *surface;
gint scale, pixel_size;
@@ -51,7 +51,7 @@ render_image (UmUserImage *image)
}
void
-um_user_image_set_user (UmUserImage *image,
+cc_user_image_set_user (CcUserImage *image,
ActUser *user)
{
g_clear_object (&image->user);
@@ -61,32 +61,32 @@ um_user_image_set_user (UmUserImage *image,
}
static void
-um_user_image_finalize (GObject *object)
+cc_user_image_finalize (GObject *object)
{
- UmUserImage *image = UM_USER_IMAGE (object);
+ CcUserImage *image = CC_USER_IMAGE (object);
g_clear_object (&image->user);
- G_OBJECT_CLASS (um_user_image_parent_class)->finalize (object);
+ G_OBJECT_CLASS (cc_user_image_parent_class)->finalize (object);
}
static void
-um_user_image_class_init (UmUserImageClass *class)
+cc_user_image_class_init (CcUserImageClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
- object_class->finalize = um_user_image_finalize;
+ object_class->finalize = cc_user_image_finalize;
}
static void
-um_user_image_init (UmUserImage *image)
+cc_user_image_init (CcUserImage *image)
{
g_signal_connect_swapped (image, "notify::scale-factor", G_CALLBACK (render_image), image);
g_signal_connect_swapped (image, "notify::pixel-size", G_CALLBACK (render_image), image);
}
GtkWidget *
-um_user_image_new (void)
+cc_user_image_new (void)
{
- return g_object_new (UM_TYPE_USER_IMAGE, NULL);
+ return g_object_new (CC_TYPE_USER_IMAGE, NULL);
}
diff --git a/panels/user-accounts/um-user-image.h b/panels/user-accounts/cc-user-image.h
similarity index 79%
rename from panels/user-accounts/um-user-image.h
rename to panels/user-accounts/cc-user-image.h
index 9239fb968..a7f69a8b2 100644
--- a/panels/user-accounts/um-user-image.h
+++ b/panels/user-accounts/cc-user-image.h
@@ -23,10 +23,10 @@
G_BEGIN_DECLS
-#define UM_TYPE_USER_IMAGE (um_user_image_get_type ())
-G_DECLARE_FINAL_TYPE (UmUserImage, um_user_image, UM, USER_IMAGE, GtkImage)
+#define CC_TYPE_USER_IMAGE (cc_user_image_get_type ())
+G_DECLARE_FINAL_TYPE (CcUserImage, cc_user_image, CC, USER_IMAGE, GtkImage)
-GtkWidget *um_user_image_new (void);
-void um_user_image_set_user (UmUserImage *image, ActUser *user);
+GtkWidget *cc_user_image_new (void);
+void cc_user_image_set_user (CcUserImage *image, ActUser *user);
G_END_DECLS
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index c810ca163..b5f2ba13d 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -38,13 +38,12 @@
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include <libgnome-desktop/gnome-languages.h>
-#include "um-user-image.h"
-
#include "cc-add-user-dialog.h"
#include "cc-language-chooser.h"
#include "cc-login-history-dialog.h"
#include "cc-password-dialog.h"
#include "cc-user-accounts-resources.h"
+#include "cc-user-image.h"
#include "um-carousel.h"
#include "um-photo-dialog.h"
#include "um-fingerprint-dialog.h"
@@ -91,8 +90,8 @@ struct _CcUserPanel {
GtkButton *remove_user_button;
GtkStack *stack;
GtkToggleButton *user_icon_button;
- UmUserImage *user_icon_image;
- UmUserImage *user_icon_image2;
+ CcUserImage *user_icon_image;
+ CcUserImage *user_icon_image2;
GtkStack *user_icon_stack;
ActUser *selected_user;
@@ -198,8 +197,8 @@ create_carousel_entry (CcUserPanel *self, ActUser *user)
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- widget = um_user_image_new ();
- um_user_image_set_user (UM_USER_IMAGE (widget), user);
+ widget = cc_user_image_new ();
+ cc_user_image_set_user (CC_USER_IMAGE (widget), user);
gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
label = g_strdup_printf ("<b>%s</b>",
@@ -805,8 +804,8 @@ show_user (ActUser *user, CcUserPanel *self)
self->selected_user = user;
- um_user_image_set_user (self->user_icon_image, user);
- um_user_image_set_user (self->user_icon_image2, user);
+ cc_user_image_set_user (self->user_icon_image, user);
+ cc_user_image_set_user (self->user_icon_image2, user);
um_photo_dialog_set_user (self->photo_dialog, user);
@@ -1358,7 +1357,7 @@ cc_user_panel_init (CcUserPanel *self)
g_resources_register (cc_user_accounts_get_resource ());
/* register types that the builder might need */
- type = um_user_image_get_type ();
+ type = cc_user_image_get_type ();
type = um_carousel_get_type ();
gtk_widget_init_template (GTK_WIDGET (self));
diff --git a/panels/user-accounts/cc-user-panel.ui b/panels/user-accounts/cc-user-panel.ui
index f910e4ed2..6eaac6aec 100644
--- a/panels/user-accounts/cc-user-panel.ui
+++ b/panels/user-accounts/cc-user-panel.ui
@@ -311,7 +311,7 @@
<property name="visible">True</property>
<property name="halign">GTK_ALIGN_END</property>
<child>
- <object class="UmUserImage" id="user_icon_image">
+ <object class="CcUserImage" id="user_icon_image">
<property name="visible">True</property>
<property name="icon_name">avatar-default</property>
<property name="pixel_size">96</property>
@@ -335,7 +335,7 @@
</object>
</child>
<child>
- <object class="UmUserImage" id="user_icon_image2">
+ <object class="CcUserImage" id="user_icon_image2">
<property name="visible">True</property>
<property name="icon_name">avatar-default</property>
<property name="pixel_size">96</property>
diff --git a/panels/user-accounts/meson.build b/panels/user-accounts/meson.build
index caa215837..479fea6ce 100644
--- a/panels/user-accounts/meson.build
+++ b/panels/user-accounts/meson.build
@@ -147,12 +147,12 @@ sources = common_sources + files(
'cc-crop-area.c',
'cc-login-history-dialog.c',
'cc-password-dialog.c',
+ 'cc-user-image.c',
'cc-user-panel.c',
'run-passwd.c',
'um-carousel.c',
'um-fingerprint-dialog.c',
'um-photo-dialog.c',
- 'um-user-image.c',
)
# Kerberos support
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]