summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2014-05-12 18:55:20 -0700
committerMatt Watson <mattdangerw@gmail.com>2014-05-13 12:50:08 -0700
commit5322120ff20e7a14346352a80fe875a37715d75b (patch)
tree9105d6cbc9d3add054bd83185b01e67b245be514
parent742e9677579996cd4eff0f5c2aae0ab3446b6809 (diff)
Remove action button
Wasn't getting used in any apps so we are taking it out [endlessm/eos-sdk#985]
-rw-r--r--data/css/endless-widgets.css144
-rw-r--r--docs/reference/endless/endless-docs.xml1
-rw-r--r--docs/reference/endless/endless-sections.txt26
-rw-r--r--endless/Makefile.am2
-rw-r--r--endless/endless.h1
-rw-r--r--endless/eosactionbutton.c770
-rw-r--r--endless/eosactionbutton.h93
-rw-r--r--endless/eosenums.h19
-rw-r--r--test/endless/Makefile.am.inc1
-rw-r--r--test/endless/run-tests.c1
-rw-r--r--test/endless/test-action-button.c225
11 files changed, 0 insertions, 1283 deletions
diff --git a/data/css/endless-widgets.css b/data/css/endless-widgets.css
index c820fbc..fe1a6fd 100644
--- a/data/css/endless-widgets.css
+++ b/data/css/endless-widgets.css
@@ -73,147 +73,3 @@ EosWindow {
color-stop(0.95, rgb(71, 71, 71)),
color-stop(0, rgb(67, 67, 67)));
}
-
-/* Endless action button */
-
-EosActionButton {
- background-color: transparent;
- border-style: solid;
- border-image: none;
- margin: 10px;
-
- border-radius: 40px;
- border-width: 8px;
-}
-
-EosActionButton GtkLabel {
- font-weight: normal;
- font-size: 13px;
-}
-
-/* Endless action button: sizes */
-
-EosActionButton.primary {
- border-radius: 40px;
- border-width: 8px;
-}
-
-EosActionButton.secondary {
- border-radius: 30px;
- border-width: 6px;
-}
-
-EosActionButton.tertiary {
- border-radius: 23px;
- border-width: 5px;
-}
-
-EosActionButton.quaternary {
- border-radius: 17px;
- border-width: 4px;
-}
-
-/* Endless action button: light background */
-
-/* normal */
-EosActionButton,
-EosActionButton:selected,
-EosActionButton:focused {
- border-color: alpha(#323232, 0.5);
- box-shadow: 1px 1px 1px alpha(black, 0.8) inset,
- 0px -1px 1px alpha(white, 0.65);
-}
-
-EosActionButton GtkImage,
-EosActionButton GtkImage:selected,
-EosActionButton GtkImage:focused {
- color: alpha(#323232, 0.5);
-}
-
-EosActionButton GtkLabel,
-EosActionButton GtkLabel:selected,
-EosActionButton GtkLabel:focused {
- color: alpha(#323232, 0.65);
-}
-
-/* hover */
-EosActionButton:hover {
- border-color: alpha(#323232, 0.8);
- box-shadow: 1px 1px 1px alpha(black, 0.8) inset;
-}
-
-EosActionButton GtkImage:hover {
- color: alpha(#282828, 0.8);
-}
-
-EosActionButton GtkLabel:hover {
- color: alpha(#1E1E1E, 0.8);
-}
-
-/* pressed */
-EosActionButton:active {
- border-color: alpha(#323232, 0.65);
- box-shadow: 1px 1px 1px alpha(black, 0.8) inset;
-}
-
-EosActionButton GtkImage:active {
- color: alpha(#282828, 0.65);
-}
-
-EosActionButton GtkLabel:active {
- color: alpha(#1E1E1E, 0.8);
-}
-
-/* insensitive, just in case */
-EosActionButton:insensitive,
-EosActionButton:inconsistent {
- border-color: alpha(#888888, 0.50);
- box-shadow: none;
-}
-
-/* Endless action button: dark background */
-
-/* normal */
-.dark EosActionButton,
-.dark EosActionButton:selected,
-.dark EosActionButton:focused {
- border-color: alpha(#E6E6E6, 0.5);
- box-shadow: 1px 1px 1px alpha(black, 0.95) inset,
- 0px -1px 1px alpha(white, 0.5) inset;
-}
-
-.dark EosActionButton GtkImage,
-.dark EosActionButton GtkImage:selected,
-.dark EosActionButton GtkImage:selected,
-.dark EosActionButton GtkLabel,
-.dark EosActionButton GtkLabel:selected,
-.dark EosActionButton GtkLabel:focused {
- color: alpha(#E6E6E6, 0.5);
-}
-
-/* hover */
-.dark EosActionButton:hover {
- border-color: alpha(white, 0.8);
- box-shadow: 1px 1px 1px alpha(black, 0.95) inset,
- 0px -1px 1px alpha(white, 0.85) inset;
-}
-
-.dark EosActionButton GtkImage:hover,
-.dark EosActionButton GtkLabel:hover {
- color: alpha(white, 0.8);
-}
-
-/* pressed */
-.dark EosActionButton:active {
- border-color: alpha(white, 0.65);
- box-shadow: 1px 1px 1px alpha(black, 0.95) inset,
- 0px -1px 1px alpha(white, 0.7) inset;
-}
-
-.dark EosActionButton GtkImage:active {
- color: alpha(white, 0.65);
-}
-
-.dark EosActionButton GtkLabel:active {
- color: alpha(white, 0.8);
-}
diff --git a/docs/reference/endless/endless-docs.xml b/docs/reference/endless/endless-docs.xml
index 354bd18..bf70d99 100644
--- a/docs/reference/endless/endless-docs.xml
+++ b/docs/reference/endless/endless-docs.xml
@@ -20,7 +20,6 @@
<xi:include href="xml/application.xml"/>
<xi:include href="xml/window.xml"/>
<xi:include href="xml/page-manager.xml"/>
- <xi:include href="xml/action-button.xml"/>
<xi:include href="xml/flexy-grid.xml"/>
<xi:include href="xml/custom-container.xml"/>
<!--<xi:include href="xml/hello.xml"/>-->
diff --git a/docs/reference/endless/endless-sections.txt b/docs/reference/endless/endless-sections.txt
index 7d1baa6..e838adb 100644
--- a/docs/reference/endless/endless-sections.txt
+++ b/docs/reference/endless/endless-sections.txt
@@ -85,32 +85,6 @@ EosPageManagerPrivate
</SECTION>
<SECTION>
-<FILE>action-button</FILE>
-EosActionButton
-eos_action_button_new
-eos_action_button_get_icon_id
-eos_action_button_set_icon_id
-eos_action_button_get_label
-eos_action_button_set_label
-eos_action_button_get_size
-eos_action_button_set_size
-eos_action_button_get_label_position
-eos_action_button_set_label_position
-EosActionButtonSize
-<SUBSECTION Standard>
-EOS_ACTION_BUTTON
-EOS_ACTION_BUTTON_CLASS
-EOS_ACTION_BUTTON_GET_CLASS
-EOS_IS_ACTION_BUTTON
-EOS_IS_ACTION_BUTTON_CLASS
-EOS_TYPE_ACTION_BUTTON
-EosActionButtonClass
-eos_action_button_get_type
-<SUBSECTION Private>
-EosActionButtonPrivate
-</SECTION>
-
-<SECTION>
<FILE>flexy-grid</FILE>
EosFlexyGrid
EosFlexyGridCell
diff --git a/endless/Makefile.am b/endless/Makefile.am
index f26b8e4..35e31d0 100644
--- a/endless/Makefile.am
+++ b/endless/Makefile.am
@@ -26,7 +26,6 @@ endless_public_installed_headers = endless/endless.h
endless_private_installed_headers = \
endless/eosversion.h \
- endless/eosactionbutton.h \
endless/eosapplication.h \
endless/eoscustomcontainer.h \
endless/eosenums.h \
@@ -44,7 +43,6 @@ endless_library_sources = \
endless/eospagemanager.c \
endless/eosresource.c endless/eosresource-private.h \
endless/eostopbar.c endless/eostopbar-private.h \
- endless/eosactionbutton.c \
endless/eoswindow.c \
endless/eosflexygrid.c endless/eosflexygridcell.c endless/eosflexygrid-private.h
diff --git a/endless/endless.h b/endless/endless.h
index 6404dee..c2b4f6d 100644
--- a/endless/endless.h
+++ b/endless/endless.h
@@ -12,7 +12,6 @@ G_BEGIN_DECLS
/* Pull in other header files */
#include "eostypes.h"
-#include "eosactionbutton.h"
#include "eosapplication.h"
#include "eosflexygrid.h"
#include "eospagemanager.h"
diff --git a/endless/eosactionbutton.c b/endless/eosactionbutton.c
deleted file mode 100644
index db28312..0000000
--- a/endless/eosactionbutton.c
+++ /dev/null
@@ -1,770 +0,0 @@
-/* Copyright 2013 Endless Mobile, Inc. */
-
-#include "config.h"
-#include "eosactionbutton.h"
-
-#include <glib-object.h>
-#include <gtk/gtk.h>
-#include <math.h>
-
-/**
- * SECTION:action-button
- * @short_description: Buttons that the user recognizes as performing actions
- * @title: Action buttons
- *
- * Any time you want to inform your user which actions are available, use an
- * action button.
- * For example, suppose you had a page in your application where the user could
- * draw a picture.
- * After finishing the picture, the user could save it or share it on Facebook.
- * In that case, you would use two action buttons, labeled for example
- * <quote>SAVE</quote> and <quote>SHARE</quote>, and containing icons
- * representing saving and sharing.
- *
- * The buttons have a recognizable style and round border, so that it is
- * instantly clear to the user that they represent actions.
- *
- * Generally, you should set the #EosPageManager:actions property on the page
- * that you want to use action buttons on; this neatly arranges the actions
- * in an action area on the right-hand side of the screen, placing the main
- * action in a prominent place, and actions such as <quote>cancel</quote> on the
- * bottom.
- * However, you can also manually place action buttons anywhere on a page.
- */
-
-#define _EOS_STYLE_CLASS_ACTION_BUTTON "action-button"
-
-typedef struct {
- /* properties */
- EosActionButtonSize size;
- gchar *label;
- gchar *icon_id;
- GtkPositionType label_pos;
-
- /* internal */
- GtkWidget *grid;
- GtkWidget *icon_image;
- GtkWidget *label_widget;
-} EosActionButtonPrivate;
-
-G_DEFINE_TYPE_WITH_PRIVATE (EosActionButton, eos_action_button, GTK_TYPE_BUTTON)
-
-typedef struct _EosActionButtonSizeDefinition EosActionButtonSizeDefinition;
-
-struct _EosActionButtonSizeDefinition
-{
- EosActionButtonSize size;
- gchar *name;
-
- gint width;
- gint height;
- gint icon_size;
- gint border_width;
-};
-
-static EosActionButtonSizeDefinition *icon_sizes = NULL;
-
-
-enum {
- PROP_0,
- PROP_SIZE,
- PROP_LABEL,
- PROP_LABEL_POS,
- PROP_ICON_ID
-};
-
-static void
-eos_action_button_dispose (GObject *object);
-
-static void
-eos_action_button_finalize (GObject *object);
-
-static void
-eos_action_button_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void
-eos_action_button_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-
-static void
-eos_action_button_get_preferred_width (GtkWidget *widget,
- gint *minimum_size,
- gint *natural_size);
-
-static void
-eos_action_button_get_preferred_height (GtkWidget *widget,
- gint *minimum_size,
- gint *natural_size);
-
-static gboolean
-eos_action_button_draw (GtkWidget *widget,
- cairo_t *cr);
-
-/* ******* INIT ******* */
-
-static void
-eos_action_button_class_init (EosActionButtonClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- object_class->get_property = eos_action_button_get_property;
- object_class->set_property = eos_action_button_set_property;
- object_class->dispose = eos_action_button_dispose;
- object_class->finalize = eos_action_button_finalize;
-
- widget_class->draw = eos_action_button_draw;
- widget_class->get_preferred_width = eos_action_button_get_preferred_width;
- widget_class->get_preferred_height = eos_action_button_get_preferred_height;
-
- /**
- * EosActionButton:size:
- *
- * Size for the action button; use #EosActionButtonSize to specify that the
- * button represents a primary action, secondary, tertiary, or quaternary.
- * #EOS_ACTION_BUTTON_SIZE_PRIMARY is the largest, and
- * #EOS_ACTION_BUTTON_SIZE_QUATERNARY is the smallest (seldom used.)
- */
- g_object_class_install_property (object_class,
- PROP_SIZE,
- g_param_spec_int ("size",
- "Size",
- "Size of the button",
- EOS_ACTION_BUTTON_SIZE_PRIMARY,
- EOS_ACTION_BUTTON_SIZE_QUATERNARY,
- EOS_ACTION_BUTTON_SIZE_SECONDARY,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- /**
- * EosActionButton:label:
- *
- * Text for the label that is placed below or to the side of the button.
- */
- g_object_class_install_property (object_class,
- PROP_LABEL,
- g_param_spec_string ("label",
- "Label",
- "Text of the label widget beneath the button",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- /**
- * EosActionButton:label-position:
- *
- * Position of the label in the button.
- */
- g_object_class_install_property (object_class,
- PROP_LABEL_POS,
- g_param_spec_enum ("label-position",
- "Label position",
- "Position of the label inside the button",
- GTK_TYPE_POSITION_TYPE,
- GTK_POS_BOTTOM,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- /**
- * EosActionButton:icon-id:
- *
- * Icon name for the icon that is drawn within the circular button.
- */
- g_object_class_install_property (object_class,
- PROP_ICON_ID,
- g_param_spec_string ("icon-id",
- "Icon id",
- "ID used to pick an icon for the button",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- // init icon sizes, inspired by gtkiconfactory.c
- if (icon_sizes == NULL)
- {
- icon_sizes = g_new (EosActionButtonSizeDefinition, EOS_ACTION_BUTTON_SIZE_NUM_SIZES);
-
- icon_sizes[EOS_ACTION_BUTTON_SIZE_PRIMARY].size = EOS_ACTION_BUTTON_SIZE_PRIMARY;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_PRIMARY].name = "primary";
- icon_sizes[EOS_ACTION_BUTTON_SIZE_PRIMARY].width = 64;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_PRIMARY].height = 64;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_PRIMARY].icon_size = 36;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_PRIMARY].border_width = 8;
-
- icon_sizes[EOS_ACTION_BUTTON_SIZE_SECONDARY].size = EOS_ACTION_BUTTON_SIZE_SECONDARY;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_SECONDARY].name = "secondary";
- icon_sizes[EOS_ACTION_BUTTON_SIZE_SECONDARY].width = 48;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_SECONDARY].height = 48;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_SECONDARY].icon_size = 26;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_SECONDARY].border_width = 6;
-
- icon_sizes[EOS_ACTION_BUTTON_SIZE_TERTIARY].size = EOS_ACTION_BUTTON_SIZE_TERTIARY;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_TERTIARY].name = "tertiary";
- icon_sizes[EOS_ACTION_BUTTON_SIZE_TERTIARY].width = 36;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_TERTIARY].height = 36;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_TERTIARY].icon_size = 18;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_TERTIARY].border_width = 5;
-
- icon_sizes[EOS_ACTION_BUTTON_SIZE_QUATERNARY].size = EOS_ACTION_BUTTON_SIZE_QUATERNARY;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_QUATERNARY].name = "quaternary";
- icon_sizes[EOS_ACTION_BUTTON_SIZE_QUATERNARY].width = 26;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_QUATERNARY].height = 26;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_QUATERNARY].icon_size = 12;
- icon_sizes[EOS_ACTION_BUTTON_SIZE_QUATERNARY].border_width = 4;
- }
-}
-
-static void
-eos_action_button_init (EosActionButton *self)
-{
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (self);
- GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (self));
-
- gtk_style_context_add_class (context, _EOS_STYLE_CLASS_ACTION_BUTTON);
-
- priv->icon_image = gtk_image_new();
- priv->label_widget = GTK_WIDGET (gtk_label_new (""));
-
- priv->grid = gtk_grid_new ();
- gtk_grid_attach(GTK_GRID (priv->grid), priv->icon_image, 0, 0, 1, 1);
-
- // TODO positioning is not really working right, it will be done manually in draw ()
- // which means that this will not work as intended:
- gtk_grid_attach_next_to (GTK_GRID (priv->grid),
- priv->label_widget, priv->icon_image,
- priv->label_pos, 1, 1);
-
- gtk_container_add (GTK_CONTAINER (self),
- GTK_WIDGET (priv->grid));
-
- gtk_widget_set_hexpand (GTK_WIDGET(self), FALSE);
- gtk_widget_set_halign (GTK_WIDGET(self), GTK_ALIGN_CENTER);
- gtk_widget_set_vexpand (GTK_WIDGET(self), FALSE);
- gtk_widget_set_valign (GTK_WIDGET(self), GTK_ALIGN_CENTER);
-}
-
-/* ******* LIFECYCLE ******* */
-
-/**
- * eos_action_button_new:
- * @size: size for the button: primary, secondary, et cetera
- * @label: text to place under or beside the action button
- * @icon_id: icon name for the icon inside the action button
- *
- * Convenience function for creating an action button with the size, label, and
- * icon already set.
- *
- * Returns: a pointer to the newly-created widget.
- */
-GtkWidget *
-eos_action_button_new (EosActionButtonSize size,
- const gchar *label,
- const gchar *icon_id)
-{
- return g_object_new (EOS_TYPE_ACTION_BUTTON,
- "size", size,
- "label", label,
- "icon-id", icon_id,
- NULL);
-}
-
-static void
-eos_action_button_dispose (GObject *object)
-{
- G_OBJECT_CLASS (eos_action_button_parent_class)->dispose (object);
-}
-
-static void
-eos_action_button_finalize (GObject *object)
-{
- G_OBJECT_CLASS (eos_action_button_parent_class)->finalize (object);
-}
-
-/* ******* PROPERTIES ******* */
-
-static void
-eos_action_button_load_icon (EosActionButton *button)
-{
- g_return_if_fail (EOS_IS_ACTION_BUTTON (button));
-
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
-
- if (priv->icon_id != NULL)
- {
- gtk_image_set_from_icon_name (GTK_IMAGE (priv->icon_image),
- priv->icon_id,
- GTK_ICON_SIZE_BUTTON);
-
- gtk_image_set_pixel_size (GTK_IMAGE (priv->icon_image),
- icon_sizes[priv->size].icon_size);
- }
- else
- {
- gtk_image_clear (GTK_IMAGE (priv->icon_image));
- }
-}
-
-/**
- * eos_action_button_set_size:
- * @button: the button
- * @size: a value from #EosActionButtonSize
- *
- * Sets the size of the button (e.g. secondary).
- * See #EosActionButton:size for more information.
- */
-void
-eos_action_button_set_size (EosActionButton *button,
- EosActionButtonSize size)
-{
- g_return_if_fail (EOS_IS_ACTION_BUTTON (button));
-
- int old_size;
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
-
- old_size = priv->size;
- priv->size = size;
-
- // remove the old style class and set the new one
- GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (button));
- gtk_style_context_remove_class (context, icon_sizes[old_size].name);
- gtk_style_context_add_class (context, icon_sizes[priv->size].name);
-
- if (old_size != priv->size)
- {
- eos_action_button_load_icon (button);
-
- g_object_notify (G_OBJECT (button), "size");
- gtk_widget_queue_resize(GTK_WIDGET (button));
- }
-}
-
-/**
- * eos_action_button_get_size:
- * @button: the button
- *
- * Gets the size of the button (e.g. secondary).
- * See #EosActionButton:size for more information.
- *
- * Returns: the size as a value from #EosActionButtonSize
- */
-EosActionButtonSize
-eos_action_button_get_size (EosActionButton *button)
-{
- g_return_val_if_fail (EOS_IS_ACTION_BUTTON (button), -1);
-
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
- return priv->size;
-}
-
-/**
- * eos_action_button_set_label:
- * @button: the button
- * @label: text for the label
- *
- * Sets the text showing below or beside the button.
- * See #EosActionButton:label for more information.
- */
-void
-eos_action_button_set_label (EosActionButton *button, const gchar *label)
-{
- g_return_if_fail (EOS_IS_ACTION_BUTTON (button));
-
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
- gchar *new_label = g_strdup (label);
- g_free (priv->label);
- priv->label = new_label;
-
- gtk_label_set_text (GTK_LABEL (priv->label_widget), priv->label);
-
- g_object_notify (G_OBJECT (button), "label");
-}
-
-/**
- * eos_action_button_get_label:
- * @button: the button
- *
- * Gets the text showing below or beside the button.
- * See #EosActionButton:label for more information.
- *
- * Returns: the label text
- */
-const gchar *
-eos_action_button_get_label (EosActionButton *button)
-{
- g_return_val_if_fail (EOS_IS_ACTION_BUTTON (button), NULL);
-
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
- return priv->label;
-}
-
-/**
- * eos_action_button_set_label_position:
- * @button: the button
- * @position: position of the label: top, bottom, left or right
- *
- * Changes the position of the label to be above, below, or to one side of the
- * action button.
- * See #EosActionButton:label-position for more information.
- */
-void
-eos_action_button_set_label_position (EosActionButton *button,
- GtkPositionType position)
-{
- g_return_if_fail (EOS_IS_ACTION_BUTTON (button));
-
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
-
- if (priv->label_pos != position)
- {
- g_object_ref (G_OBJECT (priv->label_widget));
- gtk_container_remove (GTK_CONTAINER (priv->grid), priv->label_widget);
- gtk_grid_attach_next_to (GTK_GRID (priv->grid),
- priv->label_widget, priv->icon_image,
- position, 1, 1);
- g_object_unref (G_OBJECT (priv->label_widget));
-
- priv->label_pos = position;
-
- // we need to keep the buttons aligned
- if (priv->label_pos == GTK_POS_LEFT)
- {
- gtk_widget_set_halign (GTK_WIDGET(button), GTK_ALIGN_END);
- }
- else if (priv->label_pos == GTK_POS_RIGHT)
- {
- gtk_widget_set_halign (GTK_WIDGET(button), GTK_ALIGN_START);
- }
- else
- {
- gtk_widget_set_halign (GTK_WIDGET(button), GTK_ALIGN_CENTER);
- }
- }
-}
-
-/**
- * eos_action_button_get_label_position:
- * @button: the button
- *
- * Gets the position of the label respective to the button.
- * See #EosActionButton:label-position for more information.
- *
- * Returns: the position of the label: top, bottom, left, or right
- */
-GtkPositionType
-eos_action_button_get_label_position (EosActionButton *button)
-{
- g_return_val_if_fail (EOS_IS_ACTION_BUTTON (button), -1);
-
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
- return priv->label_pos;
-}
-
-/**
- * eos_action_button_set_icon_id:
- * @button: the button
- * @icon_id: an icon name
- *
- * Sets a new icon showing in the button, specified by icon name.
- * See #EosActionButton:icon-id for more information.
- */
-void
-eos_action_button_set_icon_id (EosActionButton *button,
- const gchar* icon_id)
-{
- g_return_if_fail (EOS_IS_ACTION_BUTTON (button));
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
-
- if (g_strcmp0 (icon_id, priv->icon_id) != 0)
- {
- g_free (priv->icon_id);
- priv->icon_id = g_strdup (icon_id);
-
- eos_action_button_load_icon (button);
- g_object_notify (G_OBJECT (button), "icon-id");
- }
-}
-
-/**
- * eos_action_button_get_icon_id:
- * @button: the button
- *
- * Gets the icon name for the icon showing in the button.
- * See #EosActionButton:icon-id for more information.
- *
- * Returns: an icon name
- */
-const gchar *
-eos_action_button_get_icon_id (EosActionButton *button)
-{
- g_return_val_if_fail (EOS_IS_ACTION_BUTTON (button), NULL);
-
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
- return priv->icon_id;
-}
-
-static void
-eos_action_button_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- EosActionButton *button = EOS_ACTION_BUTTON (object);
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
-
- switch (property_id)
- {
- case PROP_SIZE:
- g_value_set_int (value, priv->size);
- break;
- case PROP_LABEL:
- g_value_set_string (value, priv->label);
- break;
- case PROP_LABEL_POS :
- g_value_set_enum (value, priv->label_pos);
- break;
- case PROP_ICON_ID:
- g_value_set_string (value, priv->icon_id);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- }
-}
-
-static void
-eos_action_button_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- EosActionButton *button = EOS_ACTION_BUTTON (object);
-
- switch (property_id)
- {
- case PROP_SIZE :
- eos_action_button_set_size (button, g_value_get_int (value));
- break;
- case PROP_LABEL :
- eos_action_button_set_label (button, g_value_get_string (value));
- break;
- case PROP_LABEL_POS :
- eos_action_button_set_label_position (button, g_value_get_enum (value));
- break;
- case PROP_ICON_ID :
- eos_action_button_set_icon_id (button, g_value_get_string (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- }
-}
-
-/* ******* EXTENDED METHODS ******* */
-
-static void
-eos_action_button_get_real_size (GtkWidget *widget,
- GtkOrientation orientation,
- gint *minimum_size,
- gint *natural_size)
-{
- EosActionButton *button = EOS_ACTION_BUTTON (widget);
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
- GtkBorder margin;
- GtkAllocation label_allocation;
- GtkStyleContext *context = gtk_widget_get_style_context (widget);
-
- gtk_style_context_get_margin(context,
- gtk_style_context_get_state (context),
- &margin);
-
- gtk_widget_get_allocation (priv->label_widget, &label_allocation);
-
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- {
- gint hsize = 0;
-
- if (priv->label_pos == GTK_POS_LEFT || priv->label_pos == GTK_POS_RIGHT)
- {
- hsize = margin.left + label_allocation.width
- + margin.left + icon_sizes[priv->size].width + margin.right;
- }
- else if (priv->label_pos == GTK_POS_TOP || priv->label_pos == GTK_POS_BOTTOM)
- {
- hsize = margin.left + margin.right + MAX (icon_sizes[priv->size].width,
- label_allocation.width);
- }
-
- if (minimum_size)
- *minimum_size = hsize;
-
- if (natural_size)
- *natural_size = hsize;
- }
- else if (orientation == GTK_ORIENTATION_VERTICAL)
- {
- gint vsize = 0;
-
- if (priv->label_pos == GTK_POS_LEFT || priv->label_pos == GTK_POS_RIGHT)
- {
- vsize = margin.top + margin.bottom + MAX (icon_sizes[priv->size].height,
- label_allocation.height);
- }
- else if (priv->label_pos == GTK_POS_TOP || priv->label_pos == GTK_POS_BOTTOM)
- {
- vsize = margin.top + icon_sizes[priv->size].height + margin.bottom
- + label_allocation.height + margin.bottom;
- }
-
- if (minimum_size)
- *minimum_size = vsize;
-
- if (natural_size)
- *natural_size = vsize;
-
- }
-}
-
-static void
-eos_action_button_get_preferred_width (GtkWidget *widget,
- gint *minimum_size,
- gint *natural_size)
-{
- eos_action_button_get_real_size (widget, GTK_ORIENTATION_HORIZONTAL,
- minimum_size, natural_size);
-}
-
-static void
-eos_action_button_get_preferred_height (GtkWidget *widget,
- gint *minimum_size,
- gint *natural_size)
-{
- eos_action_button_get_real_size (widget, GTK_ORIENTATION_VERTICAL,
- minimum_size, natural_size);
-}
-
-static gboolean
-eos_action_button_draw (GtkWidget *widget,
- cairo_t *cr)
-{
- EosActionButton *button = EOS_ACTION_BUTTON (widget);
- EosActionButtonPrivate *priv = eos_action_button_get_instance_private (button);
-
- gint x, y;
- gint frame_x = 0, frame_y = 0, bg_x = 0, bg_y = 0, icon_x = 0, icon_y = 0, label_x = 0, label_y = 0;
- gint width, height, border_width, border_height, border_thickness;
- GtkBorder margin;
- GtkAllocation allocation, icon_allocation, label_allocation;
- GtkStyleContext *context;
- GtkStateFlags state;
-
- context = gtk_widget_get_style_context (widget);
- state = gtk_style_context_get_state (context);
-
- gtk_style_context_get_margin(context, state, &margin);
-
- gtk_widget_get_allocation (widget, &allocation);
-
- x = 0;
- y = 0;
- width = allocation.width;
- height = allocation.height;
-
- border_width = icon_sizes[priv->size].width;
- border_height = icon_sizes[priv->size].height;
- border_thickness = icon_sizes[priv->size].border_width;
-
- // calculate the location of background frame, icon and text label
- gtk_widget_get_allocation (priv->icon_image, &icon_allocation);
- gtk_widget_get_allocation (priv->label_widget, &label_allocation);
-
- if (priv->label_pos == GTK_POS_BOTTOM)
- {
- frame_x = x + (width - border_width)/2;
- frame_y = y + margin.top;
-
- bg_x = frame_x - border_thickness;
- bg_y = frame_y - border_thickness;
-
- icon_x = x + (width - icon_allocation.width) / 2;
- icon_y = frame_y + (icon_sizes[priv->size].height - icon_allocation.height) / 2;
-
- label_x = x + (width - label_allocation.width)/2;
- label_y = frame_y + icon_sizes[priv->size].height + margin.bottom;
- }
- else if (priv->label_pos == GTK_POS_TOP)
- {
- frame_x = x + (width - border_width)/2;
- frame_y = y + margin.top + label_allocation.height + margin.bottom;
-
- bg_x = frame_x - border_thickness;
- bg_y = frame_y - border_thickness;
-
- icon_x = x + (width - icon_allocation.width) / 2;
- icon_y = frame_y + (icon_sizes[priv->size].height - icon_allocation.height) / 2;
-
- label_x = x + (width - label_allocation.width)/2;
- label_y = y + margin.top;
- }
- else if (priv->label_pos == GTK_POS_LEFT)
- {
- frame_x = x + margin.left + label_allocation.width + margin.left;
- frame_y = y + (height - border_height)/2;
-
- bg_x = frame_x - border_thickness;
- bg_y = frame_y - border_thickness;
-
- icon_x = frame_x + (icon_sizes[priv->size].width - icon_allocation.width) / 2;
- icon_y = y + (height - icon_allocation.height) / 2;;
-
- label_x = x + margin.left;
- label_y = y + (height - label_allocation.height)/2;;
- }
- else if (priv->label_pos == GTK_POS_RIGHT)
- {
- frame_x = x + margin.left;
- frame_y = y + (height - border_height)/2;
-
- bg_x = frame_x - border_thickness;
- bg_y = frame_y - border_thickness;
-
- icon_x = frame_x + (icon_sizes[priv->size].width - icon_allocation.width) / 2;
- icon_y = y + (height - icon_allocation.height) / 2;;
-
- label_x = x + margin.left + icon_sizes[priv->size].width + margin.left;
- label_y = y + (height - label_allocation.height)/2;;
- }
-
- cairo_save (cr);
-
- gtk_render_frame (context, cr, frame_x, frame_y, border_width, border_height);
-
- cairo_restore (cr);
- cairo_save (cr);
-
- // GTK+ tries to paint the background inside the border, we work around this
- //because we want to draw the inset shadow over the border itself
- gtk_render_background (context, cr, bg_x, bg_y,
- border_width + 2*border_thickness,
- border_height + 2*border_thickness);
-
- cairo_restore (cr);
- cairo_save (cr);
-
- // *** image
-
- cairo_translate (cr, icon_x, icon_y);
-
- gtk_widget_draw (GTK_WIDGET (priv->icon_image), cr);
-
- cairo_restore (cr);
- cairo_save (cr);
-
- // *** label
-
- cairo_translate (cr, label_x, label_y);
-
- gtk_widget_draw (GTK_WIDGET (priv->label_widget), cr);
-
- cairo_restore (cr);
-
- return FALSE;
-}
diff --git a/endless/eosactionbutton.h b/endless/eosactionbutton.h
deleted file mode 100644
index c5276a1..0000000
--- a/endless/eosactionbutton.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright 2013 Endless Mobile, Inc. */
-
-#ifndef EOS_ACTION_BUTTON_H
-#define EOS_ACTION_BUTTON_H
-
-#include "eostypes.h"
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-#define EOS_TYPE_ACTION_BUTTON eos_action_button_get_type()
-
-#define EOS_ACTION_BUTTON(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- EOS_TYPE_ACTION_BUTTON, EosActionButton))
-
-#define EOS_ACTION_BUTTON_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), \
- EOS_TYPE_ACTION_BUTTON, EosActionButtonClass))
-
-#define EOS_IS_ACTION_BUTTON(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- EOS_TYPE_ACTION_BUTTON))
-
-#define EOS_IS_ACTION_BUTTON_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), \
- EOS_TYPE_ACTION_BUTTON))
-
-#define EOS_ACTION_BUTTON_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), \
- EOS_TYPE_ACTION_BUTTON, EosActionButtonClass))
-
-typedef struct _EosActionButton EosActionButton;
-typedef struct _EosActionButtonClass EosActionButtonClass;
-
-/**
- * EosActionButton:
- *
- * This class structure contains no public members.
- */
-struct _EosActionButton
-{
- GtkButton parent;
-};
-
-struct _EosActionButtonClass
-{
- GtkButtonClass parent_class;
-
- /* For further expansion */
- gpointer _padding[8];
-};
-
-EOS_SDK_ALL_API_VERSIONS
-GType eos_action_button_get_type (void) G_GNUC_CONST;
-
-EOS_SDK_ALL_API_VERSIONS
-GtkWidget *eos_action_button_new (EosActionButtonSize size,
- const gchar *label,
- const gchar *icon_id);
-
-EOS_SDK_ALL_API_VERSIONS
-void eos_action_button_set_size (EosActionButton *button,
- EosActionButtonSize size);
-
-EOS_SDK_ALL_API_VERSIONS
-EosActionButtonSize eos_action_button_get_size (EosActionButton *button);
-
-EOS_SDK_ALL_API_VERSIONS
-void eos_action_button_set_label (EosActionButton *button,
- const gchar *label);
-
-EOS_SDK_ALL_API_VERSIONS
-const gchar *eos_action_button_get_label (EosActionButton *button);
-
-EOS_SDK_ALL_API_VERSIONS
-void eos_action_button_set_label_position (EosActionButton *button,
- GtkPositionType position);
-
-EOS_SDK_ALL_API_VERSIONS
-GtkPositionType eos_action_button_get_label_position (EosActionButton *button);
-
-EOS_SDK_ALL_API_VERSIONS
-void eos_action_button_set_icon_id (EosActionButton *button,
- const gchar *icon_id);
-
-EOS_SDK_ALL_API_VERSIONS
-const gchar *eos_action_button_get_icon_id (EosActionButton *button);
-
-G_END_DECLS
-
-#endif /* EOS_ACTION_BUTTON_H */
diff --git a/endless/eosenums.h b/endless/eosenums.h
index d9b396a..fda9819 100644
--- a/endless/eosenums.h
+++ b/endless/eosenums.h
@@ -21,25 +21,6 @@ G_BEGIN_DECLS
* Public enumerated types used throughout the Endless SDK.
*/
-/**
- * EosActionButtonSize:
- * @EOS_ACTION_BUTTON_SIZE_PRIMARY: size for primary buttons
- * @EOS_ACTION_BUTTON_SIZE_SECONDARY: size for secondary buttons
- * @EOS_ACTION_BUTTON_SIZE_TERTIARY: size for tertiary buttons
- * @EOS_ACTION_BUTTON_SIZE_QUATERNARY: size for quaternary buttons
- * @EOS_ACTION_BUTTON_SIZE_NUM_SIZES: total number of sizes
- *
- * Built-in sizes for internal action buttons.
- */
-typedef enum
-{
- EOS_ACTION_BUTTON_SIZE_PRIMARY = 0,
- EOS_ACTION_BUTTON_SIZE_SECONDARY,
- EOS_ACTION_BUTTON_SIZE_TERTIARY,
- EOS_ACTION_BUTTON_SIZE_QUATERNARY,
- EOS_ACTION_BUTTON_SIZE_NUM_SIZES
-} EosActionButtonSize;
-
#define EOS_TYPE_FLEXY_SHAPE (eos_flexy_shape_get_type ())
/**
diff --git a/test/endless/Makefile.am.inc b/test/endless/Makefile.am.inc
index 87a1db6..536a878 100644
--- a/test/endless/Makefile.am.inc
+++ b/test/endless/Makefile.am.inc
@@ -8,7 +8,6 @@ test_endless_run_tests_SOURCES = \
$(ENDLESS_TESTS_DIRECTORY)/endless/test-application.c \
$(ENDLESS_TESTS_DIRECTORY)/endless/test-page-manager.c \
$(ENDLESS_TESTS_DIRECTORY)/endless/test-window.c \
- $(ENDLESS_TESTS_DIRECTORY)/endless/test-action-button.c \
$(ENDLESS_TESTS_DIRECTORY)/endless/test-flexy-grid.c \
$(ENDLESS_TESTS_DIRECTORY)/endless/test-custom-container.c \
$(NULL)
diff --git a/test/endless/run-tests.c b/test/endless/run-tests.c
index 81823ad..09b466a 100644
--- a/test/endless/run-tests.c
+++ b/test/endless/run-tests.c
@@ -107,7 +107,6 @@ main (int argc,
add_application_tests ();
add_window_tests ();
add_page_manager_tests ();
- add_action_button_tests ();
add_flexy_grid_test ();
add_custom_container_tests ();
diff --git a/test/endless/test-action-button.c b/test/endless/test-action-button.c
deleted file mode 100644
index 7e4ad15..0000000
--- a/test/endless/test-action-button.c
+++ /dev/null
@@ -1,225 +0,0 @@
-#include <gtk/gtk.h>
-#include <endless/endless.h>
-
-#include "run-tests.h"
-
-#define ADD_ACTION_BUTTON_TEST(path, test_func) \
- g_test_add ((path), ActionButtonFixture, NULL, \
- ab_fixture_setup, (test_func), ab_fixture_teardown)
-
-#define EXPECTED_DEFAULT_SIZE EOS_ACTION_BUTTON_SIZE_SECONDARY
-#define EXPECTED_DEFAULT_LABEL NULL
-#define EXPECTED_DEFAULT_ICON_NAME NULL
-
-#define INITIAL_SIZE EOS_ACTION_BUTTON_SIZE_PRIMARY
-#define INITIAL_LABEL "add"
-#define INITIAL_ICON_NAME "list-add-symbolic"
-
-/* When testing setters and getters, set values to these; should be different
-from INITIAL_x */
-#define EXPECTED_SIZE EOS_ACTION_BUTTON_SIZE_SECONDARY
-#define EXPECTED_LABEL "remove"
-#define EXPECTED_ICON_NAME "list-remove-symbolic"
-
-typedef struct
-{
- GtkWidget *window;
- EosActionButton *button;
-} ActionButtonFixture;
-
-static void
-ab_fixture_setup (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- fixture->button = EOS_ACTION_BUTTON (eos_action_button_new (INITIAL_SIZE,
- INITIAL_LABEL,
- INITIAL_ICON_NAME));
-
- /* Place it in an offscreen window so that we can test the size */
- fixture->window = gtk_offscreen_window_new ();
- gtk_container_add (GTK_CONTAINER (fixture->window),
- GTK_WIDGET (fixture->button));
-
- gtk_widget_show_all (GTK_WIDGET (fixture->window));
-}
-
-static void
-ab_fixture_teardown (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- gtk_widget_destroy (GTK_WIDGET (fixture->window));
-}
-
-/* TESTS */
-
-static void
-test_ab_default_properties (void)
-{
- /* Create it using g_object_new() so that the properties are not explicitly
- set */
- EosActionButton *button = EOS_ACTION_BUTTON (g_object_new (EOS_TYPE_ACTION_BUTTON,
- NULL));
- EosActionButtonSize size = eos_action_button_get_size (button);
- const gchar *label = eos_action_button_get_label (button);
- const gchar *icon_name = eos_action_button_get_icon_id (button);
-
- g_assert_cmpint (size, ==, EXPECTED_DEFAULT_SIZE);
- g_assert_cmpstr (label, ==, EXPECTED_DEFAULT_LABEL);
- g_assert_cmpstr (icon_name, ==, EXPECTED_DEFAULT_ICON_NAME);
-}
-
-static void
-test_ab_get_set_size (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- EosActionButtonSize size;
-
- size = eos_action_button_get_size (fixture->button);
- g_assert_cmpint (size, ==, INITIAL_SIZE);
-
- eos_action_button_set_size (fixture->button, EXPECTED_SIZE);
- size = eos_action_button_get_size (fixture->button);
- g_assert_cmpint (size, ==, EXPECTED_SIZE);
-}
-
-static void
-test_ab_prop_size (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- EosActionButtonSize size;
-
- g_object_get (fixture->button, "size", &size, NULL);
- g_assert_cmpint (size, ==, INITIAL_SIZE);
-
- g_object_set (fixture->button, "size", EXPECTED_SIZE, NULL);
- g_object_get (fixture->button, "size", &size, NULL);
- g_assert_cmpint (size, ==, EXPECTED_SIZE);
-}
-
-static void
-test_ab_get_set_label (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- const gchar *label;
-
- label = eos_action_button_get_label (fixture->button);
- g_assert_cmpstr (label, ==, INITIAL_LABEL);
-
- eos_action_button_set_label (fixture->button, EXPECTED_LABEL);
- label = eos_action_button_get_label (fixture->button);
- g_assert_cmpstr (label, ==, EXPECTED_LABEL);
-}
-
-static void
-test_ab_prop_label (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- gchar *label;
-
- g_object_get (fixture->button, "label", &label, NULL);
- g_assert_cmpstr (label, ==, INITIAL_LABEL);
- g_free (label);
-
- g_object_set (fixture->button, "label", EXPECTED_LABEL, NULL);
- g_object_get (fixture->button, "label", &label, NULL);
- g_assert_cmpstr (label, ==, EXPECTED_LABEL);
- g_free (label);
-}
-
-static void
-test_ab_get_set_icon_name (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- const gchar *icon_name;
-
- icon_name = eos_action_button_get_icon_id (fixture->button);
- g_assert_cmpstr (icon_name, ==, INITIAL_ICON_NAME);
-
- eos_action_button_set_icon_id (fixture->button, EXPECTED_ICON_NAME);
- icon_name = eos_action_button_get_icon_id (fixture->button);
- g_assert_cmpstr (icon_name, ==, EXPECTED_ICON_NAME);
-}
-
-static void
-test_ab_prop_icon_name (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- gchar *icon_name;
-
- g_object_get (fixture->button, "icon-id", &icon_name, NULL);
- g_assert_cmpstr (icon_name, ==, INITIAL_ICON_NAME);
- g_free (icon_name);
-
- g_object_set (fixture->button, "icon-id", EXPECTED_ICON_NAME, NULL);
- g_object_get (fixture->button, "icon-id", &icon_name, NULL);
- g_assert_cmpstr (icon_name, ==, EXPECTED_ICON_NAME);
- g_free (icon_name);
-}
-
-static void
-test_ab_get_set_label_position (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- GtkPositionType label_pos;
-
- label_pos = eos_action_button_get_label_position (fixture->button);
- g_assert (label_pos == GTK_POS_BOTTOM);
-
- eos_action_button_set_label_position (fixture->button, GTK_POS_TOP);
- label_pos = eos_action_button_get_label_position (fixture->button);
- g_assert (label_pos == GTK_POS_TOP);
-}
-
-static void
-test_ab_prop_label_position (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- GtkPositionType label_pos;
-
- g_object_get (fixture->button, "label-position", &label_pos, NULL);
- g_assert (label_pos == GTK_POS_BOTTOM);
-
- g_object_set (fixture->button, "label-position", GTK_POS_TOP, NULL);
- g_object_get (fixture->button, "label-position", &label_pos, NULL);
- g_assert (label_pos == GTK_POS_TOP);
-}
-
-static void
-test_ab_label_agrees (ActionButtonFixture *fixture,
- gconstpointer unused)
-{
- GtkWidget *inner_label;
- const gchar *label_text;
-
- inner_label = container_find_descendant_with_type (GTK_CONTAINER (fixture->button),
- GTK_TYPE_LABEL);
- g_assert (inner_label);
-
- label_text = gtk_label_get_text (GTK_LABEL (inner_label));
- g_assert_cmpstr (label_text, ==, INITIAL_LABEL);
-
- eos_action_button_set_label (fixture->button, EXPECTED_LABEL);
- label_text = gtk_label_get_text (GTK_LABEL (inner_label));
- g_assert_cmpstr (label_text, ==, EXPECTED_LABEL);
-}
-
-void
-add_action_button_tests (void)
-{
- g_test_add_func ("/action-button/default-properties",
- test_ab_default_properties);
- ADD_ACTION_BUTTON_TEST ("/action-button/get-set-size", test_ab_get_set_size);
- ADD_ACTION_BUTTON_TEST ("/action-button/prop-size", test_ab_prop_size);
- ADD_ACTION_BUTTON_TEST ("/action-button/get-set-label",
- test_ab_get_set_label);
- ADD_ACTION_BUTTON_TEST ("/action-button/prop-label", test_ab_prop_label);
- ADD_ACTION_BUTTON_TEST ("/action-button/get-set-icon-name",
- test_ab_get_set_icon_name);
- ADD_ACTION_BUTTON_TEST ("/action-button/prop-icon-name",
- test_ab_prop_icon_name);
- ADD_ACTION_BUTTON_TEST ("/action-button/get-set-label-position",
- test_ab_get_set_label_position);
- ADD_ACTION_BUTTON_TEST ("/action-button/prop-label-position",
- test_ab_prop_label_position);
- ADD_ACTION_BUTTON_TEST ("/action-button/label-agrees", test_ab_label_agrees);
-}