[epiphany/wip/sync-rebase: 62/86] ephy-sync: Fix ephy-password-notification
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/sync-rebase: 62/86] ephy-sync: Fix ephy-password-notification
- Date: Fri, 7 Oct 2016 22:53:56 +0000 (UTC)
commit b084860c60fd69887652c93983ce4537608f6650
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date: Sun Aug 28 22:20:41 2016 +0300
ephy-sync: Fix ephy-password-notification
lib/widgets/ephy-password-notification.c | 20 +++++++++-----------
lib/widgets/ephy-password-notification.h | 18 ++++--------------
2 files changed, 13 insertions(+), 25 deletions(-)
---
diff --git a/lib/widgets/ephy-password-notification.c b/lib/widgets/ephy-password-notification.c
index d725f51..091c94f 100644
--- a/lib/widgets/ephy-password-notification.c
+++ b/lib/widgets/ephy-password-notification.c
@@ -24,12 +24,12 @@
#include <glib/gi18n.h>
struct _EphyPasswordNotification {
- GtkGrid parent_instance;
+ GtkGrid parent_instance;
- GtkWidget *note;
- GtkWidget *suggestion;
+ GtkWidget *note;
+ GtkWidget *suggestion;
- const char *user;
+ char *user;
};
struct _EphyPasswordNotificationClass {
@@ -67,13 +67,13 @@ ephy_password_notification_constructed (GObject *object)
}
static void
-ephy_password_notification_dispose (GObject *object)
+ephy_password_notification_finalize (GObject *object)
{
EphyPasswordNotification *self = EPHY_PASSWORD_NOTIFICATION (object);
- g_clear_pointer (&self->user, g_free);
+ g_free (self->user);
- G_OBJECT_CLASS (ephy_password_notification_parent_class)->dispose (object);
+ G_OBJECT_CLASS (ephy_password_notification_parent_class)->finalize (object);
}
static void
@@ -115,8 +115,6 @@ ephy_password_notification_get_property (GObject *object,
static void
ephy_password_notification_init (EphyPasswordNotification *self)
{
- g_return_if_fail (EPHY_IS_PASSWORD_NOTIFICATION (self));
-
self->note = gtk_label_new (NULL);
gtk_widget_set_halign (self->note, GTK_ALIGN_CENTER);
gtk_widget_set_hexpand (self->note, TRUE);
@@ -134,7 +132,7 @@ ephy_password_notification_class_init (EphyPasswordNotificationClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructed = ephy_password_notification_constructed;
- object_class->dispose = ephy_password_notification_dispose;
+ object_class->finalize = ephy_password_notification_finalize;
object_class->set_property = ephy_password_notification_set_property;
object_class->get_property = ephy_password_notification_get_property;
@@ -144,7 +142,7 @@ ephy_password_notification_class_init (EphyPasswordNotificationClass *klass)
"User",
"The email of the signed in user",
"",
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+ G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_WRITABLE));
}
EphyPasswordNotification *
diff --git a/lib/widgets/ephy-password-notification.h b/lib/widgets/ephy-password-notification.h
index 460ecf5..152a595 100644
--- a/lib/widgets/ephy-password-notification.h
+++ b/lib/widgets/ephy-password-notification.h
@@ -19,28 +19,18 @@
#ifndef EPHY_PASSWORD_NOTIFICATION_H
#define EPHY_PASSWORD_NOTIFICATION_H
+#include <glib-object.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define EPHY_TYPE_PASSWORD_NOTIFICATION (ephy_password_notification_get_type ())
-#define EPHY_PASSWORD_NOTIFICATION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- EPHY_TYPE_PASSWORD_NOTIFICATION, EphyPasswordNotification))
+G_DECLARE_FINAL_TYPE (EphyPasswordNotification, ephy_password_notification, EPHY, PASSWORD_NOTIFICATION,
GtkGrid)
-#define EPHY_IS_PASSWORD_NOTIFICATION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- EPHY_TYPE_PASSWORD_NOTIFICATION))
+EphyPasswordNotification *ephy_password_notification_new (const char *user);
-typedef struct _EphyPasswordNotification EphyPasswordNotification;
-typedef struct _EphyPasswordNotificationClass EphyPasswordNotificationClass;
-
-GType ephy_password_notification_get_type (void) G_GNUC_CONST;
-
-EphyPasswordNotification *ephy_password_notification_new (const char *user);
-
-void ephy_password_notification_show (EphyPasswordNotification *self);
+void ephy_password_notification_show (EphyPasswordNotification *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]