+_create_main_button (TweakrProfileStatusPlugin *plugin)
+{
+ gchar *current;
+ GtkWidget *image;
+
+ plugin->priv->button = hildon_button_new
+ (HILDON_SIZE_AUTO | HILDON_SIZE_FINGER_HEIGHT,
+ HILDON_BUTTON_ARRANGEMENT_VERTICAL);
+ hildon_button_set_title (HILDON_BUTTON (plugin->priv->button),
+ _("Profile preset"));
+
+ current = gconf_client_get_string (plugin->priv->gconf,
+ GCONF_PATH "/current-preset",
+ NULL);
+
+ hildon_button_set_value (HILDON_BUTTON (plugin->priv->button), current);
+ g_free (current);
+ gtk_button_set_alignment (GTK_BUTTON (plugin->priv->button), 0.0f, 0.5f);
+
+ image = gtk_image_new_from_icon_name ("control_tweakr",
+ GTK_ICON_SIZE_BUTTON);
+ hildon_button_set_image (HILDON_BUTTON (plugin->priv->button), image);
+
+ g_signal_connect (G_OBJECT (plugin->priv->button), "clicked",
+ G_CALLBACK (_button_clicked), plugin);
+
+ gtk_container_add (GTK_CONTAINER (plugin), plugin->priv->button);
+ gtk_widget_show_all (plugin->priv->button);
+}
+
+static void
+_current_preset_changed_cb (GConfClient *client, guint notify_id,
+ GConfEntry *entry,
+ TweakrProfileStatusPlugin *plugin)
+{
+ if (plugin->priv->button == NULL)
+ {
+ _create_main_button (plugin);
+ gtk_widget_show (GTK_WIDGET (plugin));
+ }
+ else
+ {
+ hildon_button_set_value (HILDON_BUTTON (plugin->priv->button),
+ gconf_value_get_string (entry->value));
+ }
+}
+
+
+static void