Beispiel #1
0
static void
create_search_entry (MnbPeoplePanel *self)
{
  MnbPeoplePanelPrivate *priv = GET_PRIVATE (self);

  priv->search_entry = mx_entry_new ();
  mx_entry_set_hint_text (MX_ENTRY (priv->search_entry), _("Search"));

  g_signal_connect (priv->search_entry,
                    "notify::text",
                    G_CALLBACK (search_entry_text_changed_cb),
                    self);
}
Beispiel #2
0
static void
mpl_entry_init (MplEntry *self)
{
  MplEntryPrivate *priv;
  ClutterActor    *text;

  self->priv = priv = MPL_ENTRY_GET_PRIVATE (self);

  priv->entry = mx_entry_new ();
  clutter_actor_add_child (CLUTTER_ACTOR (self), priv->entry);
  mx_stylable_set_style_class (MX_STYLABLE (priv->entry),
                               "MplEntryEntry");
  text = mx_entry_get_clutter_text (MX_ENTRY (priv->entry));
  clutter_text_set_single_line_mode (CLUTTER_TEXT (text), TRUE);
  g_signal_connect (text, "text-changed",
                    G_CALLBACK (text_changed_cb),
                    self);

  priv->table = CLUTTER_ACTOR (mx_table_new ());
  clutter_actor_add_child (CLUTTER_ACTOR (self), priv->table);

  priv->clear_button = CLUTTER_ACTOR (mx_button_new ());
  clutter_actor_hide (priv->clear_button);
  mx_table_insert_actor (MX_TABLE (priv->table), priv->clear_button, 0, 0);
  mx_stylable_set_style_class (MX_STYLABLE (priv->clear_button),
                               "MplEntryClearButton");
  set_clear_button_size (priv->clear_button);
  g_signal_connect (priv->clear_button, "clicked",
                    G_CALLBACK (clear_button_clicked_cb),
                    self);

  priv->search_button = CLUTTER_ACTOR (mx_button_new ());
  mx_table_insert_actor (MX_TABLE (priv->table), priv->search_button, 0, 1);
  mx_stylable_set_style_class (MX_STYLABLE (priv->search_button),
                               "MplEntryButton");
  g_signal_connect (priv->search_button, "clicked",
                    G_CALLBACK (search_button_clicked_cb),
                    self);
}
Beispiel #3
0
static ClutterActor *
create_property_editor (GObject    *object,
                        GParamSpec *pspec)
{
  ClutterActor *box, *label, *value;
  gint i;

  /* skip properties that are not writable */
  if (!(pspec->flags & G_PARAM_WRITABLE))
    return NULL;

  /* skip other properties */
  for (i = 0; i < G_N_ELEMENTS (skip_properties); i++)
    {
      if (g_str_equal (pspec->name, skip_properties[i]))
        return NULL;
    }


  box = mx_box_layout_new ();

  label = mx_label_new_with_text (pspec->name);
  clutter_actor_set_width (label, 150);
  clutter_actor_add_child (box, label);

  if (pspec->value_type == G_TYPE_BOOLEAN)
    {
      value = mx_toggle_new ();

      g_object_bind_property (object, pspec->name, value, "active",
                              G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
    }
  else if (pspec->value_type == G_TYPE_STRING)
    {
      value = mx_entry_new ();

      g_object_bind_property (object, pspec->name, value, "text",
                              G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
    }
  else if (pspec->value_type == G_TYPE_INT || pspec->value_type == G_TYPE_UINT
           || pspec->value_type == G_TYPE_FLOAT
           || pspec->value_type == G_TYPE_DOUBLE)
    {
      value = mx_entry_new ();

      g_object_bind_property_full (object, pspec->name, value, "text",
                                   G_BINDING_BIDIRECTIONAL
                                   | G_BINDING_SYNC_CREATE,
                                   num_to_string,
                                   string_to_num,
                                   NULL, NULL);
    }
  else if (g_type_is_a (pspec->value_type, G_TYPE_ENUM))
    {
      GEnumValue *evalue;
      GEnumClass *eclass;
      gint init = 0;

      value = mx_combo_box_new ();
      clutter_actor_set_width (value, 100);

      eclass = g_type_class_ref (pspec->value_type);

      while ((evalue = g_enum_get_value (eclass, init)))
        {
          mx_combo_box_append_text (MX_COMBO_BOX (value), evalue->value_nick);
          init++;
        }

      g_type_class_unref (eclass);

      g_object_bind_property (object, pspec->name, value, "index",
                              G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);

    }
  else
    value = NULL;

  if (value)
    {
      clutter_actor_add_child (box, value);
      return box;
    }
  else
    return NULL;
}
Beispiel #4
0
int
main (int     argc,
      char  **argv)
{
  ClutterActor    *stage;
  MxBoxLayout     *vbox;
  MxBoxLayout     *hbox;
  ClutterActor    *button;
  ClutterActor    *label;
  ObjectStoreTest  app = { 0, };

  clutter_init (&argc, &argv);

  stage = clutter_stage_get_default ();
  clutter_actor_set_size (stage, 320.0, 240.0);

  vbox = (MxBoxLayout *) mx_box_layout_new ();
  clutter_actor_set_size (CLUTTER_ACTOR (vbox), 320.0, 240.0);
  mx_box_layout_set_orientation (vbox, MX_ORIENTATION_VERTICAL);
  clutter_container_add_actor (CLUTTER_CONTAINER (stage), CLUTTER_ACTOR (vbox));

  /* Create model */
  app.store = foo_object_store_new (2,
                                    FOO_TYPE_TEST_OBJECT, "foo",  /* column #0 */
                                    G_TYPE_STRING, "text");       /* column #1 */

  /*
   * Create view
   */
  app.view = mx_list_view_new ();

  /* Use MxButton to render the model's items */
  mx_list_view_set_item_type (MX_LIST_VIEW (app.view), MX_TYPE_BUTTON);

  /* Map column #1 to attribute "label" of view's GtkButton */
  mx_list_view_add_attribute (MX_LIST_VIEW (app.view), "label", 1);

  /* Connect to model */
  mx_list_view_set_model (MX_LIST_VIEW (app.view), app.store);

  mx_box_layout_add_actor_with_properties (vbox, app.view, -1,
                                           "expand", true,
                                           "x-fill", true,
                                           "y-fill", true,
                                           NULL);

  hbox = (MxBoxLayout *) mx_box_layout_new ();
  mx_box_layout_set_orientation (hbox, MX_ORIENTATION_HORIZONTAL);
  mx_box_layout_add_actor_with_properties (vbox, CLUTTER_ACTOR (hbox), -1,
                                           "expand", false,
                                           "x-fill", true,
                                           NULL);

  app.entry = (MxEntry *) mx_entry_new ();
  mx_box_layout_add_actor_with_properties (hbox, CLUTTER_ACTOR (app.entry), -1,
                                           "expand", true,
                                           "x-fill", true,
                                           NULL);

  button = mx_button_new_with_label ("Update");
  g_signal_connect (button, "clicked",
                    G_CALLBACK (_update_clicked), &app);
  clutter_container_add_actor (CLUTTER_CONTAINER (hbox), button);

  button = mx_button_new_with_label ("Dump");
  g_signal_connect (button, "clicked",
                    G_CALLBACK (_dump_clicked), &app);
  clutter_container_add_actor (CLUTTER_CONTAINER (hbox), button);

  label = mx_label_new_with_text ("Enter text and update to add item\n"
                                  "Enter <number>:<text> to change item <number>\n"
                                  "Enter -<number> to delete item <number>");
  clutter_container_add_actor (CLUTTER_CONTAINER (vbox), label);

  clutter_actor_show_all (stage);
  clutter_main ();

  return EXIT_SUCCESS;
}
static void
dawati_bt_request_init (DawatiBtRequest *request)
{
  ClutterActor *title_box, *close_btn, *btn_box;
  DawatiBtRequestPrivate *priv = GET_PRIVATE (request);

  mx_box_layout_set_orientation (MX_BOX_LAYOUT (request),
                                 MX_ORIENTATION_VERTICAL);
  mx_stylable_set_style_class (MX_STYLABLE (request), "BtRequest");

  priv->request = DAWATI_BT_REQUEST_TYPE_PIN;

  /* FIXME: this should maybe not be instance-specific */
  priv->uuid_strings = _new_uiid_strings ();

  title_box = mx_box_layout_new ();
  mx_box_layout_add_actor_with_properties (MX_BOX_LAYOUT (request), title_box, -1,
                                           "expand", TRUE,
                                           "x-fill", TRUE,
                                           "x-align", MX_ALIGN_START,
                                           NULL);

  priv->title = mx_label_new ();
  mx_stylable_set_style_class (MX_STYLABLE (priv->title), "BtTitle");
  mx_box_layout_add_actor_with_properties (MX_BOX_LAYOUT (title_box), priv->title, -1,
                                           "expand", TRUE,
                                           "x-fill", TRUE,
                                           "x-align", MX_ALIGN_START,
                                           NULL);

  close_btn = mx_button_new ();
  mx_stylable_set_style_class (MX_STYLABLE (close_btn), "BtCloseButton");
  mx_bin_set_child (MX_BIN (close_btn), mx_icon_new ());
  mx_box_layout_add_actor (MX_BOX_LAYOUT (title_box), close_btn, -1);
  g_signal_connect (close_btn, "clicked",
                    G_CALLBACK (_close_clicked_cb), request);


  priv->request_label = mx_label_new ();
  mx_stylable_set_style_class (MX_STYLABLE (priv->request_label), "BtLabel");
  mx_label_set_line_wrap (MX_LABEL (priv->request_label), TRUE);
  mx_box_layout_add_actor_with_properties (MX_BOX_LAYOUT (request), priv->request_label, -1,
                                           "expand", TRUE,
                                           "x-fill", FALSE,
                                           "x-align", MX_ALIGN_START,
                                           NULL);

  btn_box = mx_box_layout_new ();
  mx_box_layout_add_actor_with_properties (MX_BOX_LAYOUT (request), btn_box, -1,
                                           "expand", TRUE,
                                           "x-fill", FALSE,
                                           "x-align", MX_ALIGN_END,
                                           NULL);

  priv->request_entry = mx_entry_new ();
  mx_box_layout_add_actor (MX_BOX_LAYOUT (btn_box), priv->request_entry, -1);

  priv->request_always_btn = mx_button_new ();
  /* TRANSLATORS: request button label */
  mx_button_set_label (MX_BUTTON (priv->request_always_btn),
                       _("Always grant"));
  mx_box_layout_add_actor (MX_BOX_LAYOUT (btn_box), priv->request_always_btn, -1);
  g_signal_connect (priv->request_always_btn, "clicked",
                    G_CALLBACK (_always_clicked_cb), request);

  priv->request_yes_btn = mx_button_new ();
  mx_box_layout_add_actor (MX_BOX_LAYOUT (btn_box), priv->request_yes_btn, -1);
  g_signal_connect (priv->request_yes_btn, "clicked",
                    G_CALLBACK (_yes_clicked_cb), request);
}
Beispiel #6
0
void
scroll_grid_main (ClutterContainer *stage)
{
  ClutterActor *scroll, *grid, *table, *label, *visible_entry, *stride_entry;
  int i;

  scroll = mx_scroll_view_new ();
  clutter_container_add_actor (stage, scroll);
  clutter_actor_set_position (scroll, 10, 10);

  clutter_actor_set_size (scroll, 400, 400);

  grid = mx_grid_new ();
  clutter_container_add_actor (CLUTTER_CONTAINER (scroll), grid);

  for (i = 1; i <= 200; i++)
    {
      ClutterActor *button;
      gchar *text;

      text = g_strdup_printf ("Button %d", i);

      button = mx_button_new_with_label (text);
      clutter_container_add_actor (CLUTTER_CONTAINER (grid), button);
      mx_widget_set_tooltip_text (MX_WIDGET (button), "test");
      if (i == 1)
        g_signal_connect (button,
                          "clicked",
                          G_CALLBACK (swap_orientation),
                          grid);

      g_free (text);
    }

  table = mx_table_new ();

  label = mx_label_new_with_text ("Make button visible:");
  visible_entry = mx_entry_new ();
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         label,
                                         0, 0,
                                         "x-expand", FALSE,
                                         NULL);
  mx_table_insert_actor (MX_TABLE (table), visible_entry, 0, 1);

  label = mx_label_new_with_text ("Set max-stride:");
  stride_entry = mx_entry_new ();
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         label,
                                         1, 0,
                                         "x-expand", FALSE,
                                         NULL);
  mx_table_insert_actor (MX_TABLE (table), stride_entry, 1, 1);

  clutter_actor_set_position (table, 10, 420);
  clutter_actor_set_width (table, 400);
  clutter_container_add_actor (stage, table);

  g_signal_connect (mx_entry_get_clutter_text (MX_ENTRY (visible_entry)),
                    "activate",
                    G_CALLBACK (ensure_visible),
                    grid);

  g_signal_connect (mx_entry_get_clutter_text (MX_ENTRY (stride_entry)),
                    "activate",
                    G_CALLBACK (set_max_stride), grid);
}
Beispiel #7
0
void
entry_main (ClutterContainer *stage)
{
  ClutterActor *entry, *button, *clear_button;

  entry = mx_entry_new_with_text ("Hello World!");
  clutter_actor_set_position (entry, 20, 20);
  clutter_actor_set_width (entry, 150);

  clutter_container_add_actor (stage, entry);

  clutter_stage_set_key_focus (CLUTTER_STAGE (clutter_actor_get_stage (entry)),
                               mx_entry_get_clutter_text (MX_ENTRY (entry)));

  entry = mx_entry_new ();
  clutter_actor_set_position (entry, 20, 70);

  clutter_container_add_actor (stage, entry);
  mx_entry_set_hint_text (MX_ENTRY (entry), "hint hint...");

#ifdef HAVE_CLUTTER_IMCONTEXT
  clutter_imtext_set_autoshow_im (CLUTTER_IMTEXT (mx_entry_get_clutter_text (MX_ENTRY (entry))), TRUE);
#else
  g_debug ("Input method support is disabled");
#endif
  g_signal_connect (G_OBJECT (entry),
                    "notify::text", G_CALLBACK (text_changed_cb), NULL);

  button = mx_button_new_with_label ("Set");
  clutter_actor_set_position (button, 20, 120);
  g_signal_connect (button, "clicked", G_CALLBACK (btn_clicked_cb), entry);

  clear_button = mx_button_new_with_label ("clear");
  clutter_actor_set_position (clear_button, 70, 120);
  g_signal_connect (clear_button, "clicked",
                    G_CALLBACK (clear_btn_clicked_cb), entry);

  clutter_container_add (stage, button, clear_button, NULL);


  entry = mx_entry_new ();
  clutter_actor_set_position (entry, 20, 170);
  clutter_container_add_actor (stage, entry);

  mx_entry_set_hint_text (MX_ENTRY (entry), "Search...");
  mx_entry_set_primary_icon_from_file (MX_ENTRY (entry),
                                         "edit-find.png");
  mx_entry_set_secondary_icon_from_file (MX_ENTRY (entry),
                                           "edit-clear.png");

  mx_entry_set_icon_highlight_suffix (MX_ENTRY (entry), "-highlight");

  mx_entry_set_secondary_icon_tooltip_text (MX_ENTRY (entry), "one");

  mx_entry_set_primary_icon_tooltip_text (MX_ENTRY (entry), "two");

  g_signal_connect (entry, "primary-icon-clicked",
                    G_CALLBACK (print_notice), "primary icon clicked\n");
  g_signal_connect (entry, "secondary-icon-clicked",
                    G_CALLBACK (print_notice), "secondary icon clicked\n");

  entry = mx_entry_new ();
  clutter_actor_set_position (entry, 20, 220);
  clutter_container_add_actor (stage, entry);

  mx_entry_set_hint_text (MX_ENTRY (entry), "Secret!");
  mx_entry_set_password_char (MX_ENTRY (entry), 0x2022);
}
Beispiel #8
0
static void
mex_search_plugin_init (MexSearchPlugin *self)
{
  MexProxy *suggest_proxy;
  ClutterActor *icon, *header, *text, *frame, *box, *hbox;
  MexSearchPluginPrivate *priv = self->priv = SEARCH_PLUGIN_PRIVATE (self);

  /* Load style data */
  mx_style_load_from_file (mx_style_get_default (),
                           PLUGIN_DATA_DIR "/style.css", NULL);

  /* Create the history model and models list */
  priv->history_model = mex_feed_new (_("Search"), _("Search"));

  priv->model_info =
    mex_model_info_new_with_sort_funcs (MEX_MODEL (priv->history_model),
                                        "search", 0);
  g_object_unref (priv->history_model);
  priv->models = g_list_append (NULL, priv->model_info);

  /* Create the actions list */
  memset (&priv->action_info, 0, sizeof (MexActionInfo));
  priv->action_info.action =
    mx_action_new_full ("x-mex/search",
                        _("Search"),
                        G_CALLBACK (mex_search_plugin_history_cb),
                        self);
  priv->action_info.mime_types = (gchar **)search_mimetypes;
  priv->actions = g_list_append (NULL, &priv->action_info);

  /* Create the suggestions model */
  priv->suggest_model =
    mex_feed_new (_("Suggestions"), _("Google Suggestions"));

  /* Create the search page */

  /* Create header */
  icon = mx_icon_new ();
  mx_stylable_set_style_class (MX_STYLABLE (icon), "Search");

  header = mx_box_layout_new ();
  mx_box_layout_set_spacing (MX_BOX_LAYOUT (header), 5);
  clutter_actor_set_name (header, "search-header");

  /* Create search entry */
  frame = mx_table_new ();
  clutter_actor_set_name (frame, "search-entry-frame");
  priv->search_entry = mx_entry_new ();
  priv->spinner = mx_spinner_new ();

  mx_table_add_actor (MX_TABLE (frame), priv->search_entry, 0, 0);
  mx_table_add_actor (MX_TABLE (frame), priv->spinner, 0, 1);
  mx_table_child_set_x_fill (MX_TABLE (frame), priv->spinner, FALSE);
  mx_table_child_set_x_expand (MX_TABLE (frame), priv->spinner, FALSE);
  mx_table_child_set_y_fill (MX_TABLE (frame), priv->spinner, FALSE);

  mx_spinner_set_animating (MX_SPINNER (priv->spinner), FALSE);
  clutter_actor_hide (priv->spinner);

  clutter_container_add (CLUTTER_CONTAINER (header), icon, frame, NULL);
  clutter_container_child_set (CLUTTER_CONTAINER (header), icon,
                               "x-fill", FALSE, "y-fill", FALSE, NULL);
  clutter_container_child_set (CLUTTER_CONTAINER (header), frame,
                               "expand", TRUE, "x-fill", TRUE, NULL);

  text = mx_entry_get_clutter_text (MX_ENTRY (priv->search_entry));
  g_signal_connect_swapped (text, "activate",
                            G_CALLBACK (mex_search_plugin_search_cb), self);
  g_signal_connect (priv->search_entry, "notify::text",
                    G_CALLBACK (mex_search_text_changed_cb), self);
  g_signal_connect (priv->search_entry, "notify::style-pseudo-class",
                    G_CALLBACK (mex_search_text_style_changed), header);

  /* Create the suggestions column */
  priv->suggest_column = mx_box_layout_new ();
  clutter_actor_set_name (priv->suggest_column, "suggest-column");
  mx_box_layout_set_orientation (MX_BOX_LAYOUT (priv->suggest_column),
                                 MX_ORIENTATION_VERTICAL);
  suggest_proxy = mex_generic_proxy_new (MEX_MODEL (priv->suggest_model),
                                        MX_TYPE_BUTTON);
  mex_generic_proxy_bind (MEX_GENERIC_PROXY (suggest_proxy),
                          mex_enum_to_string (MEX_TYPE_CONTENT_METADATA,
                                              MEX_CONTENT_METADATA_TITLE),
                          "label");
  g_signal_connect (suggest_proxy, "object-created",
                    G_CALLBACK (mex_search_proxy_add_cb),
                    priv->suggest_column);
  g_signal_connect (suggest_proxy, "object-removed",
                    G_CALLBACK (mex_search_proxy_remove_cb),
                    priv->suggest_column);
  g_object_weak_ref (G_OBJECT (priv->suggest_column),
                     (GWeakNotify)g_object_unref, suggest_proxy);

  /* Pack the search page */
  priv->search_page = mx_frame_new ();
  clutter_actor_set_name (priv->search_page, "search-page");
  mx_bin_set_fill (MX_BIN (priv->search_page), FALSE, TRUE);
  mx_bin_set_alignment (MX_BIN (priv->search_page), MX_ALIGN_START,
                        MX_ALIGN_START);
  hbox = mex_resizing_hbox_new ();
  mex_resizing_hbox_set_resizing_enabled (MEX_RESIZING_HBOX (hbox), FALSE);
  box = mx_box_layout_new ();
  clutter_container_add_actor (CLUTTER_CONTAINER (priv->search_page), hbox);
  clutter_container_add_actor (CLUTTER_CONTAINER (hbox), box);
  mx_box_layout_set_orientation (MX_BOX_LAYOUT (box),
                                 MX_ORIENTATION_VERTICAL);
  clutter_container_add (CLUTTER_CONTAINER (box),
                         header, priv->suggest_column, NULL);
  mx_box_layout_child_set_expand (MX_BOX_LAYOUT (box),
                                  priv->suggest_column, TRUE);
  clutter_container_child_set (CLUTTER_CONTAINER (box), header,
                               "x-fill", TRUE,
                               "x-align", MX_ALIGN_START, NULL);
  clutter_container_child_set (CLUTTER_CONTAINER (box),
                               priv->suggest_column,
                               "x-fill", TRUE,
                               "x-align", MX_ALIGN_START, NULL);
  clutter_actor_set_width (box, 426.0);

  /* Update the history list */
  mex_search_plugin_update_history (self, NULL);

  /* Start the history list and suggestions proxy */
  mex_proxy_start (suggest_proxy);
}
static void
mnp_world_clock_construct (MnpWorldClock *world_clock)
{
    ClutterActor *entry, *box, *stage;
    MxBoxLayout *table = (MxBoxLayout *)world_clock;
    gfloat width, height;
    MnpWorldClockPrivate *priv = GET_PRIVATE (world_clock);

    stage = priv->stage;
    priv->location_tile = FALSE;

    mx_box_layout_set_orientation ((MxBoxLayout *)world_clock, MX_ORIENTATION_VERTICAL);
    mx_box_layout_set_spacing ((MxBoxLayout *)world_clock, 0);
    clutter_actor_set_name (CLUTTER_ACTOR(world_clock), "TimePane");

    construct_heading_and_top_area (world_clock);

    priv->completion_timeout = 0;

    /* Search Entry */

    box = mx_box_layout_new ();
    mx_box_layout_set_enable_animations ((MxBoxLayout *)box, TRUE);
    mx_box_layout_set_orientation ((MxBoxLayout *)box, MX_ORIENTATION_HORIZONTAL);
    mx_box_layout_set_spacing ((MxBoxLayout *)box, 4);

    priv->entry_box = box;
    mx_stylable_set_style_class (MX_STYLABLE(box), "ZoneSearchEntryBox");

    entry = mx_entry_new ();
    mx_stylable_set_style_class (MX_STYLABLE (entry), "ZoneSearchEntry");

    priv->search_location = (MxEntry *)entry;
    mx_entry_set_hint_text (MX_ENTRY (entry), _("Enter a country or city"));
    mx_entry_set_secondary_icon_from_file (MX_ENTRY (entry),
                                           THEMEDIR"/edit-clear.png");
    g_signal_connect (entry, "secondary-icon-clicked",
                      G_CALLBACK (clear_btn_clicked_cb), world_clock);

    g_signal_connect (G_OBJECT (entry),
                      "notify::text", G_CALLBACK (text_changed_cb), world_clock);

    clutter_actor_get_size (entry, &width, &height);
    clutter_actor_set_size (entry, width+10, -1);

    mx_box_layout_add_actor ((MxBoxLayout *)box, entry, 0);
    clutter_container_child_set (CLUTTER_CONTAINER (box),
                                 entry,
                                 "expand", FALSE,
                                 "y-fill", FALSE,
                                 "x-fill", FALSE,
                                 "y-align", MX_ALIGN_MIDDLE,
                                 "x-align", MX_ALIGN_START,
                                 NULL);

    priv->add_location = mx_button_new ();
    mx_button_set_label ((MxButton *)priv->add_location, _("Add"));
    mx_stylable_set_style_class (MX_STYLABLE(priv->add_location), "ZoneSearchEntryAddButton");

    /* mx_box_layout_add_actor ((MxBoxLayout *)box, priv->add_location, 1); */
    /* g_signal_connect (priv->add_location, "clicked",
                    	G_CALLBACK (add_location_clicked_cb), world_clock); */
    /*clutter_container_child_set (CLUTTER_CONTAINER (box),
                               priv->add_location,
                               "expand", FALSE,
    		       "y-fill", FALSE,
    		       "y-align", MX_ALIGN_MIDDLE,
                               NULL);*/


    mx_box_layout_add_actor (MX_BOX_LAYOUT(priv->widget_box), box, -1);
    clutter_container_child_set (CLUTTER_CONTAINER (priv->widget_box),
                                 box,
                                 "expand", FALSE,
                                 "y-fill", FALSE,
                                 "x-fill", FALSE,
                                 "x-align",  MX_ALIGN_START,
                                 NULL);

    /* Prep GeoClue */
    priv->geo_position = geoclue_position_new ("org.freedesktop.Geoclue.Providers.Hostip",
                         "/org/freedesktop/Geoclue/Providers/Hostip");

    priv->geo_geocode = geoclue_geocode_new ("org.freedesktop.Geoclue.Providers.Yahoo",
                        "/org/freedesktop/Geoclue/Providers/Yahoo");

    priv->geo_reverse_geocode = geoclue_reverse_geocode_new ("org.freedesktop.Geoclue.Providers.Nominatim",
                                "/org/freedesktop/Geoclue/Providers/Nominatim");

    geoclue_position_get_position_async (priv->geo_position,
                                         mnp_wc_get_position_cb,
                                         world_clock);

    /* Clock Area */

    priv->area = mnp_clock_area_new ();
    g_signal_connect (priv->area, "time-changed", G_CALLBACK(time_changed), world_clock);
    clutter_actor_set_size ((ClutterActor *)priv->area, 300, -1);

    clutter_actor_set_reactive ((ClutterActor *)priv->area, TRUE);
    clutter_actor_set_name ((ClutterActor *)priv->area, "WorldClockArea");

    clutter_container_add_actor ((ClutterContainer *)stage, (ClutterActor *)priv->area);

    clutter_actor_lower_bottom ((ClutterActor *)priv->area);
    mx_droppable_enable ((MxDroppable *)priv->area);
    g_object_ref ((GObject *)priv->area);
    clutter_container_remove_actor ((ClutterContainer *)stage, (ClutterActor *)priv->area);
    mx_box_layout_add_actor ((MxBoxLayout *) table, (ClutterActor *)priv->area, -1);
    clutter_container_child_set (CLUTTER_CONTAINER (table),
                                 (ClutterActor *)priv->area,
                                 "expand", TRUE,
                                 "y-fill", TRUE,
                                 "x-fill", TRUE,
                                 NULL);


    priv->zones = mnp_load_zones ();
    mnp_clock_area_refresh_time (priv->area, TRUE);
    mnp_clock_area_set_zone_remove_cb (priv->area, (ZoneRemovedFunc) zone_removed_cb, (gpointer)world_clock);
    mnp_clock_area_set_zone_reordered_cb (priv->area, (ClockZoneReorderedFunc) zone_reordered_cb, (gpointer)world_clock);

    if (priv->zones->len) {
        int i=0;

        for (i=0; i<priv->zones->len; i++) {
            MnpZoneLocation *loc = (MnpZoneLocation *)priv->zones->pdata[i];
            loc->local = FALSE;
            MnpClockTile *tile = mnp_clock_tile_new (loc, mnp_clock_area_get_time(priv->area), FALSE);
            mnp_clock_area_add_tile (priv->area, tile);
        }
        if (priv->zones->len >= 4)
            clutter_actor_hide (priv->entry_box);
    }

    /*	div = clutter_texture_new_from_file (SINGLE_DIV_LINE, NULL);
    	mx_box_layout_add_actor (MX_BOX_LAYOUT(world_clock), div, -1);
    */
    box = mx_box_layout_new ();
    clutter_actor_set_name (box, "DateTimeLauncherBox");
    priv->launcher_box = box;
    mx_box_layout_set_orientation ((MxBoxLayout *)box, MX_ORIENTATION_VERTICAL);
    mx_box_layout_set_spacing ((MxBoxLayout *)box, 6);

    priv->launcher = mx_button_new ();
    mx_button_set_label ((MxButton *) priv->launcher, _("Set Time & Date"));
    mx_stylable_set_style_class (MX_STYLABLE(priv->launcher), "DateTimeLauncherButton");

    mx_box_layout_add_actor ((MxBoxLayout *)box, priv->launcher, -1);
    clutter_container_child_set (CLUTTER_CONTAINER (box),
                                 (ClutterActor *)priv->launcher,
                                 "expand", FALSE,
                                 "y-fill", FALSE,
                                 "x-fill", FALSE,
                                 "x-align", MX_ALIGN_END,
                                 NULL);


    mx_box_layout_add_actor ((MxBoxLayout *)world_clock, box, -1);
}