Commit 79d53342 authored by Heather Ellsworth's avatar Heather Ellsworth Committed by Gogs

Merge branch 'cleanups' of guido.gunther/phosh into master

parents 2efee352 fb8817c3
......@@ -14,19 +14,18 @@ enum {
};
static guint signals[N_SIGNALS] = { 0 };
struct PhoshLockscreenPrivate {
gint _dummy;
};
G_DEFINE_TYPE(PhoshLockscreen, phosh_lockscreen, GTK_TYPE_WINDOW)
static void
phosh_lockscreen_init (PhoshLockscreen *self)
typedef struct _PhoshLockscreen
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
PHOSH_LOCKSCREEN_TYPE,
PhoshLockscreenPrivate);
}
GtkWindow parent;
} PhoshLockscreen;
typedef struct PhoshLockscreen {
gint _dummy;
} PhoshLockscreenPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (PhoshLockscreen, phosh_lockscreen, GTK_TYPE_WINDOW)
/* FIXME: Temporarily add a button until we interface with pam */
......@@ -89,10 +88,15 @@ phosh_lockscreen_class_init (PhoshLockscreenClass *klass)
signals[LOCKSCREEN_UNLOCK] = g_signal_new ("lockscreen-unlock",
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL,
NULL, G_TYPE_NONE, 0);
}
g_type_class_add_private (object_class, sizeof (PhoshLockscreenPrivate));
static void
phosh_lockscreen_init (PhoshLockscreen *self)
{
}
GtkWidget *
phosh_lockscreen_new (void)
{
......
......@@ -10,29 +10,8 @@
#include <gtk/gtk.h>
#define PHOSH_LOCKSCREEN_TYPE (phosh_lockscreen_get_type ())
#define PHOSH_LOCKSCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOSH_LOCKSCREEN_TYPE, PhoshLockscreen))
#define PHOSH_LOCKSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOSH_LOCKSCREEN_TYPE, PhoshLockscreenClass))
#define PHOSH_IS_LOCKSCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOSH_LOCKSCREEN_TYPE))
#define PHOSH_IS_LOCKSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOSH_LOCKSCREEN_TYPE))
#define PHOSH_LOCKSCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOSH_LOCKSCREEN_TYPE, PhoshLockscreenClass))
typedef struct PhoshLockscreen PhoshLockscreen;
typedef struct PhoshLockscreenClass PhoshLockscreenClass;
typedef struct PhoshLockscreenPrivate PhoshLockscreenPrivate;
struct PhoshLockscreen
{
GtkWindow parent;
PhoshLockscreenPrivate *priv;
};
struct PhoshLockscreenClass
{
GtkWindowClass parent_class;
};
GType phosh_lockscreen_get_type (void) G_GNUC_CONST;
G_DECLARE_FINAL_TYPE (PhoshLockscreen, phosh_lockscreen, PHOSH, LOCKSCREEN, GtkWindow)
GtkWidget * phosh_lockscreen_new (void);
......
......@@ -24,13 +24,18 @@ enum {
};
static guint signals[N_SIGNALS] = { 0 };
struct PhoshPanelPrivate {
typedef struct {
GtkWidget *btn_favorites;
GtkWidget *btn_settings;
gint height;
GnomeWallClock *wall_clock;
};
} PhoshPanelPrivate;
typedef struct _PhoshPanel
{
GtkWindow parent;
} PhoshPanel;
G_DEFINE_TYPE_WITH_PRIVATE (PhoshPanel, phosh_panel, GTK_TYPE_WINDOW)
......
......@@ -10,30 +10,11 @@
#include <gtk/gtk.h>
#define PHOSH_PANEL_TYPE (phosh_panel_get_type ())
#define PHOSH_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PHOSH_PANEL_TYPE, PhoshPanel))
#define PHOSH_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PHOSH_PANEL_TYPE, PhoshPanelClass))
#define PHOSH_IS_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PHOSH_PANEL_TYPE))
#define PHOSH_IS_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PHOSH_PANEL_TYPE))
#define PHOSH_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PHOSH_PANEL_TYPE, PhoshPanelClass))
typedef struct PhoshPanel PhoshPanel;
typedef struct PhoshPanelClass PhoshPanelClass;
typedef struct PhoshPanelPrivate PhoshPanelPrivate;
struct PhoshPanel
{
GtkWindow parent;
};
struct PhoshPanelClass
{
GtkWindowClass parent_class;
};
G_DECLARE_FINAL_TYPE (PhoshPanel, phosh_panel, PHOSH, PANEL, GtkWindow)
#define PHOSH_PANEL_HEIGHT 32
GType phosh_panel_get_type (void) G_GNUC_CONST;
GtkWidget * phosh_panel_new (void);
gint phosh_panel_get_height (PhoshPanel *self);
......
......@@ -83,8 +83,6 @@ lockscreen_unlock_cb (PhoshShell *self, PhoshLockscreen *window)
{
PhoshShellPrivate *priv = phosh_shell_get_instance_private (self);
phosh_mobile_shell_unlock (priv->mshell);
g_signal_handler_disconnect (window, priv->unlock_handler_id);
gtk_widget_destroy (GTK_WIDGET (window));
g_free (priv->lockscreen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment