Commit 98726a27 authored by Jonny Lamb's avatar Jonny Lamb
Browse files

shell: rename widgets to reflect project rename

parent 0fdc7d88
......@@ -8,10 +8,10 @@
#include "app-icon.h"
G_DEFINE_TYPE(WestonGtkAppIcon, weston_gtk_app_icon, GTK_TYPE_BUTTON)
G_DEFINE_TYPE(MaynardAppIcon, maynard_app_icon, GTK_TYPE_BUTTON)
static void
weston_gtk_app_icon_init (WestonGtkAppIcon *self)
maynard_app_icon_init (MaynardAppIcon *self)
{
gtk_style_context_add_class (
gtk_widget_get_style_context (GTK_WIDGET (self)),
......@@ -28,18 +28,18 @@ weston_gtk_app_icon_init (WestonGtkAppIcon *self)
}
static void
weston_gtk_app_icon_class_init (WestonGtkAppIconClass *klass)
maynard_app_icon_class_init (MaynardAppIconClass *klass)
{
}
GtkWidget *
weston_gtk_app_icon_new (const gchar *icon_name)
maynard_app_icon_new (const gchar *icon_name)
{
GtkWidget *widget;
GtkWidget *image;
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_DIALOG);
widget = g_object_new (WESTON_GTK_APP_ICON_TYPE,
widget = g_object_new (MAYNARD_APP_ICON_TYPE,
"image", image,
NULL);
......@@ -47,13 +47,13 @@ weston_gtk_app_icon_new (const gchar *icon_name)
}
GtkWidget *
weston_gtk_app_icon_new_from_gicon (GIcon *icon)
maynard_app_icon_new_from_gicon (GIcon *icon)
{
GtkWidget *widget, *image;
image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
widget = g_object_new (WESTON_GTK_APP_ICON_TYPE,
widget = g_object_new (MAYNARD_APP_ICON_TYPE,
"image", image,
NULL);
......
......@@ -4,36 +4,36 @@
* Author: Jonny Lamb <jonny.lamb@collabora.co.uk>
*/
#ifndef __WESTON_GTK_APP_ICON_H__
#define __WESTON_GTK_APP_ICON_H__
#ifndef __MAYNARD_APP_ICON_H__
#define __MAYNARD_APP_ICON_H__
#include <gtk/gtk.h>
#define WESTON_GTK_APP_ICON_TYPE (weston_gtk_app_icon_get_type ())
#define WESTON_GTK_APP_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WESTON_GTK_APP_ICON_TYPE, WestonGtkAppIcon))
#define WESTON_GTK_APP_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WESTON_GTK_APP_ICON_TYPE, WestonGtkAppIconClass))
#define WESTON_GTK_IS_APP_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WESTON_GTK_APP_ICON_TYPE))
#define WESTON_GTK_IS_APP_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WESTON_GTK_APP_ICON_TYPE))
#define WESTON_GTK_APP_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WESTON_GTK_APP_ICON_TYPE, WestonGtkAppIconClass))
#define MAYNARD_APP_ICON_TYPE (maynard_app_icon_get_type ())
#define MAYNARD_APP_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAYNARD_APP_ICON_TYPE, MaynardAppIcon))
#define MAYNARD_APP_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAYNARD_APP_ICON_TYPE, MaynardAppIconClass))
#define MAYNARD_IS_APP_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAYNARD_APP_ICON_TYPE))
#define MAYNARD_IS_APP_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAYNARD_APP_ICON_TYPE))
#define MAYNARD_APP_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAYNARD_APP_ICON_TYPE, MaynardAppIconClass))
typedef struct WestonGtkAppIcon WestonGtkAppIcon;
typedef struct WestonGtkAppIconClass WestonGtkAppIconClass;
typedef struct WestonGtkAppIconPrivate WestonGtkAppIconPrivate;
typedef struct MaynardAppIcon MaynardAppIcon;
typedef struct MaynardAppIconClass MaynardAppIconClass;
typedef struct MaynardAppIconPrivate MaynardAppIconPrivate;
struct WestonGtkAppIcon
struct MaynardAppIcon
{
GtkButton parent;
WestonGtkAppIconPrivate *priv;
MaynardAppIconPrivate *priv;
};
struct WestonGtkAppIconClass
struct MaynardAppIconClass
{
GtkButtonClass parent_class;
};
GType weston_gtk_app_icon_get_type (void) G_GNUC_CONST;
GtkWidget *weston_gtk_app_icon_new (const gchar *icon_name);
GtkWidget *weston_gtk_app_icon_new_from_gicon (GIcon *icon);
GType maynard_app_icon_get_type (void) G_GNUC_CONST;
GtkWidget *maynard_app_icon_new (const gchar *icon_name);
GtkWidget *maynard_app_icon_new_from_gicon (GIcon *icon);
#endif /* __WESTON_GTK_APP_ICON_H__ */
#endif /* __MAYNARD_APP_ICON_H__ */
......@@ -11,26 +11,26 @@
#define GNOME_DESKTOP_USE_UNSTABLE_API
#include <libgnome-desktop/gnome-wall-clock.h>
struct WestonGtkClockPrivate {
struct MaynardClockPrivate {
GtkWidget *label;
GnomeWallClock *wall_clock;
};
G_DEFINE_TYPE(WestonGtkClock, weston_gtk_clock, GTK_TYPE_WINDOW)
G_DEFINE_TYPE(MaynardClock, maynard_clock, GTK_TYPE_WINDOW)
static void
weston_gtk_clock_init (WestonGtkClock *self)
maynard_clock_init (MaynardClock *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
WESTON_GTK_CLOCK_TYPE,
WestonGtkClockPrivate);
MAYNARD_CLOCK_TYPE,
MaynardClockPrivate);
}
static void
wall_clock_notify_cb (GnomeWallClock *wall_clock,
GParamSpec *pspec,
WestonGtkClock *self)
MaynardClock *self)
{
GDateTime *datetime;
gchar *str;
......@@ -47,11 +47,11 @@ wall_clock_notify_cb (GnomeWallClock *wall_clock,
}
static void
weston_gtk_clock_constructed (GObject *object)
maynard_clock_constructed (GObject *object)
{
WestonGtkClock *self = WESTON_GTK_CLOCK (object);
MaynardClock *self = MAYNARD_CLOCK (object);
G_OBJECT_CLASS (weston_gtk_clock_parent_class)->constructed (object);
G_OBJECT_CLASS (maynard_clock_parent_class)->constructed (object);
self->priv->wall_clock = g_object_new (GNOME_TYPE_WALL_CLOCK, NULL);
g_signal_connect (self->priv->wall_clock, "notify::clock",
......@@ -73,31 +73,31 @@ weston_gtk_clock_constructed (GObject *object)
}
static void
weston_gtk_clock_dispose (GObject *object)
maynard_clock_dispose (GObject *object)
{
WestonGtkClock *self = WESTON_GTK_CLOCK (object);
MaynardClock *self = MAYNARD_CLOCK (object);
if (self->priv->wall_clock)
g_object_unref (self->priv->wall_clock);
self->priv->wall_clock = NULL;
G_OBJECT_CLASS (weston_gtk_clock_parent_class)->dispose (object);
G_OBJECT_CLASS (maynard_clock_parent_class)->dispose (object);
}
static void
weston_gtk_clock_class_init (WestonGtkClockClass *klass)
maynard_clock_class_init (MaynardClockClass *klass)
{
GObjectClass *object_class = (GObjectClass *)klass;
object_class->constructed = weston_gtk_clock_constructed;
object_class->dispose = weston_gtk_clock_dispose;
object_class->constructed = maynard_clock_constructed;
object_class->dispose = maynard_clock_dispose;
g_type_class_add_private (object_class, sizeof (WestonGtkClockPrivate));
g_type_class_add_private (object_class, sizeof (MaynardClockPrivate));
}
GtkWidget *
weston_gtk_clock_new (void)
maynard_clock_new (void)
{
return g_object_new (WESTON_GTK_CLOCK_TYPE,
return g_object_new (MAYNARD_CLOCK_TYPE,
NULL);
}
......@@ -4,41 +4,41 @@
* Author: Jonny Lamb <jonny.lamb@collabora.co.uk>
*/
#ifndef __WESTON_GTK_CLOCK_H__
#define __WESTON_GTK_CLOCK_H__
#ifndef __MAYNARD_CLOCK_H__
#define __MAYNARD_CLOCK_H__
#include <gtk/gtk.h>
#include "panel.h"
#define WESTON_GTK_CLOCK_TYPE (weston_gtk_clock_get_type ())
#define WESTON_GTK_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WESTON_GTK_CLOCK_TYPE, WestonGtkClock))
#define WESTON_GTK_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WESTON_GTK_CLOCK_TYPE, WestonGtkClockClass))
#define WESTON_GTK_IS_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WESTON_GTK_CLOCK_TYPE))
#define WESTON_GTK_IS_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WESTON_GTK_CLOCK_TYPE))
#define WESTON_GTK_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WESTON_GTK_CLOCK_TYPE, WestonGtkClockClass))
#define MAYNARD_CLOCK_TYPE (maynard_clock_get_type ())
#define MAYNARD_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAYNARD_CLOCK_TYPE, MaynardClock))
#define MAYNARD_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAYNARD_CLOCK_TYPE, MaynardClockClass))
#define MAYNARD_IS_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAYNARD_CLOCK_TYPE))
#define MAYNARD_IS_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAYNARD_CLOCK_TYPE))
#define MAYNARD_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAYNARD_CLOCK_TYPE, MaynardClockClass))
typedef struct WestonGtkClock WestonGtkClock;
typedef struct WestonGtkClockClass WestonGtkClockClass;
typedef struct WestonGtkClockPrivate WestonGtkClockPrivate;
typedef struct MaynardClock MaynardClock;
typedef struct MaynardClockClass MaynardClockClass;
typedef struct MaynardClockPrivate MaynardClockPrivate;
struct WestonGtkClock
struct MaynardClock
{
GtkWindow parent;
WestonGtkClockPrivate *priv;
MaynardClockPrivate *priv;
};
struct WestonGtkClockClass
struct MaynardClockClass
{
GtkWindowClass parent_class;
};
#define WESTON_GTK_CLOCK_WIDTH (WESTON_GTK_PANEL_WIDTH * 2.6)
#define WESTON_GTK_CLOCK_HEIGHT (WESTON_GTK_PANEL_WIDTH * 2)
#define MAYNARD_CLOCK_WIDTH (MAYNARD_PANEL_WIDTH * 2.6)
#define MAYNARD_CLOCK_HEIGHT (MAYNARD_PANEL_WIDTH * 2)
GType weston_gtk_clock_get_type (void) G_GNUC_CONST;
GType maynard_clock_get_type (void) G_GNUC_CONST;
GtkWidget * weston_gtk_clock_new (void);
GtkWidget * maynard_clock_new (void);
#endif /* __WESTON_GTK_CLOCK_H__ */
#endif /* __MAYNARD_CLOCK_H__ */
......@@ -18,15 +18,15 @@ enum {
PROP_0,
};
struct WestonGtkFavoritesPrivate {
struct MaynardFavoritesPrivate {
GSettings *settings;
};
G_DEFINE_TYPE(WestonGtkFavorites, weston_gtk_favorites, GTK_TYPE_BOX)
G_DEFINE_TYPE(MaynardFavorites, maynard_favorites, GTK_TYPE_BOX)
static void
favorite_clicked (GtkButton *button,
WestonGtkFavorites *self)
MaynardFavorites *self)
{
GAppInfo *info = g_object_get_data (G_OBJECT(button), "info");
GError *error = NULL;
......@@ -42,7 +42,7 @@ favorite_clicked (GtkButton *button,
}
static void
add_favorite (WestonGtkFavorites *self,
add_favorite (MaynardFavorites *self,
const gchar *favorite)
{
GDesktopAppInfo *info;
......@@ -56,7 +56,7 @@ add_favorite (WestonGtkFavorites *self,
icon = g_app_info_get_icon (G_APP_INFO (info));
button = weston_gtk_app_icon_new_from_gicon (icon);
button = maynard_app_icon_new_from_gicon (icon);
g_object_set_data_full (G_OBJECT (button), "info", info, g_object_unref);
......@@ -75,7 +75,7 @@ remove_favorite (GtkWidget *favorite,
static void
favorites_changed (GSettings *settings,
const gchar *key,
WestonGtkFavorites *self)
MaynardFavorites *self)
{
gchar **favorites = g_settings_get_strv (settings, key);
gint i;
......@@ -94,21 +94,21 @@ favorites_changed (GSettings *settings,
}
static void
weston_gtk_favorites_dispose (GObject *object)
maynard_favorites_dispose (GObject *object)
{
WestonGtkFavorites *self = WESTON_GTK_FAVORITES (object);
MaynardFavorites *self = MAYNARD_FAVORITES (object);
g_clear_object (&self->priv->settings);
G_OBJECT_CLASS (weston_gtk_favorites_parent_class)->dispose (object);
G_OBJECT_CLASS (maynard_favorites_parent_class)->dispose (object);
}
static void
weston_gtk_favorites_init (WestonGtkFavorites *self)
maynard_favorites_init (MaynardFavorites *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
WESTON_GTK_TYPE_FAVORITES,
WestonGtkFavoritesPrivate);
MAYNARD_TYPE_FAVORITES,
MaynardFavoritesPrivate);
self->priv->settings = g_settings_new ("org.raspberrypi.maynard");
g_signal_connect (self->priv->settings, "changed::favorites",
......@@ -119,19 +119,19 @@ weston_gtk_favorites_init (WestonGtkFavorites *self)
}
static void
weston_gtk_favorites_class_init (WestonGtkFavoritesClass *klass)
maynard_favorites_class_init (MaynardFavoritesClass *klass)
{
GObjectClass *object_class = (GObjectClass *)klass;
object_class->dispose = weston_gtk_favorites_dispose;
object_class->dispose = maynard_favorites_dispose;
g_type_class_add_private (object_class, sizeof (WestonGtkFavoritesPrivate));
g_type_class_add_private (object_class, sizeof (MaynardFavoritesPrivate));
}
GtkWidget *
weston_gtk_favorites_new (void)
maynard_favorites_new (void)
{
return g_object_new (WESTON_GTK_TYPE_FAVORITES,
return g_object_new (MAYNARD_TYPE_FAVORITES,
"orientation", GTK_ORIENTATION_VERTICAL,
NULL);
}
......@@ -4,35 +4,35 @@
* Author: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
*/
#ifndef __WESTON_GTK_FAVORITES_H__
#define __WESTON_GTK_FAVORITES_H__
#ifndef __MAYNARD_FAVORITES_H__
#define __MAYNARD_FAVORITES_H__
#include <gtk/gtk.h>
#define WESTON_GTK_TYPE_FAVORITES (weston_gtk_favorites_get_type ())
#define WESTON_GTK_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WESTON_GTK_TYPE_FAVORITES, WestonGtkFavorites))
#define WESTON_GTK_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WESTON_GTK_TYPE_FAVORITES, WestonGtkFavoritesClass))
#define WESTON_GTK_IS_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WESTON_GTK_TYPE_FAVORITES))
#define WESTON_GTK_IS_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WESTON_GTK_TYPE_FAVORITES))
#define WESTON_GTK_FAVORITES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WESTON_GTK_TYPE_FAVORITES, WestonGtkFavoritesClass))
#define MAYNARD_TYPE_FAVORITES (maynard_favorites_get_type ())
#define MAYNARD_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAYNARD_TYPE_FAVORITES, MaynardFavorites))
#define MAYNARD_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAYNARD_TYPE_FAVORITES, MaynardFavoritesClass))
#define MAYNARD_IS_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAYNARD_TYPE_FAVORITES))
#define MAYNARD_IS_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAYNARD_TYPE_FAVORITES))
#define MAYNARD_FAVORITES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAYNARD_TYPE_FAVORITES, MaynardFavoritesClass))
typedef struct WestonGtkFavorites WestonGtkFavorites;
typedef struct WestonGtkFavoritesClass WestonGtkFavoritesClass;
typedef struct WestonGtkFavoritesPrivate WestonGtkFavoritesPrivate;
typedef struct MaynardFavorites MaynardFavorites;
typedef struct MaynardFavoritesClass MaynardFavoritesClass;
typedef struct MaynardFavoritesPrivate MaynardFavoritesPrivate;
struct WestonGtkFavorites
struct MaynardFavorites
{
GtkBox parent;
WestonGtkFavoritesPrivate *priv;
MaynardFavoritesPrivate *priv;
};
struct WestonGtkFavoritesClass
struct MaynardFavoritesClass
{
GtkBoxClass parent_class;
};
GType weston_gtk_favorites_get_type (void) G_GNUC_CONST;
GtkWidget *weston_gtk_favorites_new (void);
GType maynard_favorites_get_type (void) G_GNUC_CONST;
GtkWidget *maynard_favorites_new (void);
#endif /* __WESTON_GTK_FAVORITES_H__ */
#endif /* __MAYNARD_FAVORITES_H__ */
......@@ -92,11 +92,11 @@ desktop_shell_configure(void *data,
width, height);
/* TODO: make this height a little nicer */
window_height = height * WESTON_GTK_PANEL_HEIGHT_RATIO;
window_height = height * MAYNARD_PANEL_HEIGHT_RATIO;
gtk_window_resize (GTK_WINDOW (desktop->panel->window),
WESTON_GTK_PANEL_WIDTH, window_height);
MAYNARD_PANEL_WIDTH, window_height);
weston_gtk_launcher_calculate (WESTON_GTK_LAUNCHER(desktop->launcher_grid->window),
maynard_launcher_calculate (MAYNARD_LAUNCHER(desktop->launcher_grid->window),
&grid_width, &grid_height, NULL);
gtk_widget_set_size_request (desktop->launcher_grid->window,
grid_width,
......@@ -107,18 +107,18 @@ desktop_shell_configure(void *data,
0, (height - window_height) / 2);
gtk_window_resize (GTK_WINDOW (desktop->clock->window),
WESTON_GTK_CLOCK_WIDTH,
WESTON_GTK_CLOCK_HEIGHT);
MAYNARD_CLOCK_WIDTH,
MAYNARD_CLOCK_HEIGHT);
shell_helper_move_surface(desktop->helper,
desktop->clock->surface,
WESTON_GTK_PANEL_WIDTH,
MAYNARD_PANEL_WIDTH,
(height - window_height) / 2);
shell_helper_move_surface(desktop->helper,
desktop->launcher_grid->surface,
- grid_width,
((height - window_height) / 2) + WESTON_GTK_CLOCK_HEIGHT);
((height - window_height) / 2) + MAYNARD_CLOCK_HEIGHT);
desktop_shell_desktop_ready(desktop->shell);
......@@ -161,7 +161,7 @@ launcher_grid_toggle (GtkWidget *widget, struct desktop *desktop)
shell_helper_slide_surface(desktop->helper,
desktop->launcher_grid->surface,
width + WESTON_GTK_PANEL_WIDTH, 0);
width + MAYNARD_PANEL_WIDTH, 0);
}
desktop->grid_visible = !desktop->grid_visible;
......@@ -176,7 +176,7 @@ launcher_grid_create (struct desktop *desktop)
launcher_grid = malloc (sizeof *launcher_grid);
memset (launcher_grid, 0, sizeof *launcher_grid);
launcher_grid->window = weston_gtk_launcher_new (desktop->background->window);
launcher_grid->window = maynard_launcher_new (desktop->background->window);
gdk_window = gtk_widget_get_window(launcher_grid->window);
launcher_grid->surface = gdk_wayland_window_get_wl_surface(gdk_window);
......@@ -197,7 +197,7 @@ clock_create (struct desktop *desktop)
clock = malloc(sizeof *clock);
memset(clock, 0, sizeof *clock);
clock->window = weston_gtk_clock_new();
clock->window = maynard_clock_new();
gdk_window = gtk_widget_get_window(clock->window);
clock->surface = gdk_wayland_window_get_wl_surface(gdk_window);
......@@ -228,7 +228,7 @@ panel_window_enter_cb (GtkWidget *widget,
shell_helper_slide_surface_back(desktop->helper,
desktop->clock->surface);
weston_gtk_panel_set_expand(WESTON_GTK_PANEL(desktop->panel->window),
maynard_panel_set_expand(MAYNARD_PANEL(desktop->panel->window),
TRUE);
return FALSE;
......@@ -247,12 +247,12 @@ leave_panel_idle_cb (gpointer data)
shell_helper_slide_surface(desktop->helper,
desktop->panel->surface,
WESTON_GTK_VERTICAL_CLOCK_WIDTH - WESTON_GTK_PANEL_WIDTH, 0);
MAYNARD_VERTICAL_CLOCK_WIDTH - MAYNARD_PANEL_WIDTH, 0);
shell_helper_slide_surface(desktop->helper,
desktop->clock->surface,
WESTON_GTK_VERTICAL_CLOCK_WIDTH - WESTON_GTK_PANEL_WIDTH - width, 0);
MAYNARD_VERTICAL_CLOCK_WIDTH - MAYNARD_PANEL_WIDTH - width, 0);
weston_gtk_panel_set_expand(WESTON_GTK_PANEL(desktop->panel->window),
maynard_panel_set_expand(MAYNARD_PANEL(desktop->panel->window),
FALSE);
return FALSE;
......@@ -296,7 +296,7 @@ panel_create(struct desktop *desktop)
panel = malloc(sizeof *panel);
memset(panel, 0, sizeof *panel);
panel->window = weston_gtk_panel_new();
panel->window = maynard_panel_new();
g_signal_connect(panel->window, "app-menu-toggled",
G_CALLBACK(launcher_grid_toggle), desktop);
......
......@@ -23,7 +23,7 @@ enum {
};
static guint signals[N_SIGNALS] = { 0 };
struct WestonGtkLauncherPrivate {
struct MaynardLauncherPrivate {
/* background widget so we know the output size */
GtkWidget *background;
ShellAppSystem *app_system;
......@@ -31,17 +31,17 @@ struct WestonGtkLauncherPrivate {
GtkWidget *grid;
};
G_DEFINE_TYPE(WestonGtkLauncher, weston_gtk_launcher, GTK_TYPE_WINDOW)
G_DEFINE_TYPE(MaynardLauncher, maynard_launcher, GTK_TYPE_WINDOW)
/* each grid item is 114x114 */
#define GRID_ITEM_WIDTH 114
static void
weston_gtk_launcher_init (WestonGtkLauncher *self)
maynard_launcher_init (MaynardLauncher *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
WESTON_GTK_LAUNCHER_TYPE,
WestonGtkLauncherPrivate);
MAYNARD_LAUNCHER_TYPE,
MaynardLauncherPrivate);
}
static gint
......@@ -87,7 +87,7 @@ get_child_position_cb (GtkOverlay *overlay,
static gboolean
app_launched_idle_cb (gpointer data)
{
WestonGtkLauncher *self = data;
MaynardLauncher *self = data;
GtkAdjustment *adjustment;
/* make the scrolled window go back to the top */
......@@ -104,7 +104,7 @@ static void
clicked_cb (GtkWidget *widget,
GDesktopAppInfo *info)
{
WestonGtkLauncher *self;
MaynardLauncher *self;
g_app_info_launch (G_APP_INFO (info), NULL, NULL, NULL);
......@@ -135,7 +135,7 @@ app_leave_cb (GtkWidget *widget,
}
static GtkWidget *
app_launcher_new_from_desktop_info (WestonGtkLauncher *self,
app_launcher_new_from_desktop_info (MaynardLauncher *self,
GDesktopAppInfo *info)
{
GIcon *icon;
......@@ -212,7 +212,7 @@ app_launcher_new_from_desktop_info (WestonGtkLauncher *self,
static void
installed_changed_cb (ShellAppSystem *app_system,
WestonGtkLauncher *self)
MaynardLauncher *self)
{
GHashTable *entries = shell_app_system_get_entries (app_system);
GList *l, *values;
......@@ -228,7 +228,7 @@ installed_changed_cb (ShellAppSystem *app_system,
values = g_hash_table_get_values (entries);
values = g_list_sort (values, sort_apps);
weston_gtk_launcher_calculate (self, NULL, NULL, &cols);
maynard_launcher_calculate (self, NULL, NULL, &cols);
cols--; /* because we start from zero here */
left = top = 0;
......@@ -254,17 +254,17 @@ installed_changed_cb (ShellAppSystem *app_system,
static void
background_size_allocate_cb (GtkWidget *widget,
GdkRectangle *allocation,
WestonGtkLauncher *self)
MaynardLauncher *self)
{
installed_changed_cb (self->priv->app_system, self);
}
static void
weston_gtk_launcher_constructed (GObject *object)
maynard_launcher_constructed (GObject *object)
{
WestonGtkLauncher *self = WESTON_GTK_LAUNCHER (object);
MaynardLauncher *self = MAYNARD_LAUNCHER (object);
G_OBJECT_CLASS (weston_gtk_launcher_parent_class)->constructed (object);
G_OBJECT_CLASS (maynard_launcher_parent_class)->constructed (object);
/* window properties */
gtk_window_set_title (GTK_WINDOW (self), "gtk shell");
......@@ -300,12 +300,12 @@ weston_gtk_launcher_constructed (GObject *object)
}
static void
weston_gtk_launcher_get_property (GObject *object,
maynard_launcher_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec)
{
WestonGtkLauncher *self = WESTON_GTK_LAUNCHER (object);
MaynardLauncher *self = MAYNARD_LAUNCHER (object);
switch (param_id)
{
......@@ -319,12 +319,12 @@ weston_gtk_launcher_get_property (GObject *object,
}
static void
weston_gtk_launcher_set_property (GObject *object,
maynard_launcher_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec)
{
WestonGtkLauncher *self = WESTON_GTK_LAUNCHER (object);
MaynardLauncher *self = MAYNARD_LAUNCHER (object);
switch (param_id)
{
......@@ -338,13 +338,13 @@ weston_gtk_launcher_set_property (GObject *object,
}
static void
weston_gtk_launcher_class_init (WestonGtkLauncherClass *klass)
maynard_launcher_class_init (MaynardLauncherClass *klass)