static void
mnb_launcher_button_init (MnbLauncherButton *self)
{
  ClutterActor *label;

  self->priv = MNB_LAUNCHER_BUTTON_GET_PRIVATE (self);

  g_signal_connect (self, "leave-event",
                    G_CALLBACK (_leave_event_cb), NULL);
  g_signal_connect (self, "key-focus-out",
                    G_CALLBACK (_leave_event_cb), NULL);
  g_signal_connect (self, "enter-event",
                    G_CALLBACK (_enter_event_cb), NULL);

  self->priv->icon = NULL;

  mx_stylable_set_style_class (MX_STYLABLE (self), "contentTile");

  /* "app" label */
  self->priv->title = (MxLabel *) mx_label_new ();
  mx_label_set_x_align (MX_LABEL (self->priv->title), MX_ALIGN_MIDDLE);

  clutter_actor_set_reactive (CLUTTER_ACTOR (self->priv->title), FALSE);
  mx_table_insert_actor_with_properties (MX_TABLE (self),
                                         CLUTTER_ACTOR (self->priv->title),
                                         1, 0,
                                         "x-align", MX_ALIGN_MIDDLE,
                                         "x-expand", TRUE,
                                         "x-fill", TRUE,
                                         "y-align", MX_ALIGN_MIDDLE,
                                         "y-expand", TRUE,
                                         "y-fill", TRUE,
                                         NULL);

  label = mx_label_get_clutter_text (self->priv->title);
  clutter_text_set_ellipsize (CLUTTER_TEXT (label), PANGO_ELLIPSIZE_END);
  clutter_text_set_line_alignment (CLUTTER_TEXT (label), PANGO_ALIGN_CENTER);
  clutter_text_set_line_wrap (CLUTTER_TEXT (label), TRUE);
  clutter_text_set_line_wrap_mode (CLUTTER_TEXT (label), PANGO_WRAP_WORD_CHAR);

  /* "fav app" toggle */
  self->priv->fav_toggle = g_object_ref_sink (CLUTTER_ACTOR (mx_button_new ()));
  mx_button_set_is_toggle (MX_BUTTON (self->priv->fav_toggle), TRUE);
  clutter_actor_set_name (CLUTTER_ACTOR (self->priv->fav_toggle),
                          "mnb-launcher-button-fav-toggle");
  clutter_actor_set_size (self->priv->fav_toggle, FAV_TOGGLE_SIZE, FAV_TOGGLE_SIZE);
  mx_table_insert_actor (MX_TABLE (self),
                         CLUTTER_ACTOR (self->priv->fav_toggle),
                         0, 0);


  g_signal_connect (self->priv->fav_toggle, "notify::toggled",
                    G_CALLBACK (fav_button_notify_toggled_cb), self);

  clutter_actor_set_reactive ((ClutterActor *) self, TRUE);
}
Example #2
0
static void
ntf_tray_constructed (GObject *object)
{
  NtfTray        *self = (NtfTray*) object;
  ClutterActor   *actor = (ClutterActor*) self;
  NtfTrayPrivate *priv = self->priv;
  ClutterActor   *button;

  if (G_OBJECT_CLASS (ntf_tray_parent_class)->constructed)
    G_OBJECT_CLASS (ntf_tray_parent_class)->constructed (object);

  priv->notifiers = mx_stack_new ();

  clutter_actor_add_child (actor, priv->notifiers);

  /* 'Overflow' control */
  priv->control = mx_table_new ();

  mx_stylable_set_style_class (MX_STYLABLE (priv->control),
                               "notification-control");

  button = mx_button_new ();
  mx_button_set_label (MX_BUTTON (button), _("Dismiss All"));
  mx_table_insert_actor (MX_TABLE (priv->control), button, 0, 1);

  g_signal_connect (button, "clicked",
                    G_CALLBACK (ntf_tray_dismiss_all_cb), self);

  priv->control_text = mx_label_new ();
  mx_table_insert_actor (MX_TABLE (priv->control),
                         CLUTTER_ACTOR (priv->control_text), 0, 0);

  clutter_actor_add_child (actor, priv->control);

  clutter_actor_hide (priv->control);

  clutter_actor_set_reactive (priv->notifiers, TRUE);
  clutter_actor_set_reactive (actor, TRUE);

  mnb_input_manager_push_actor (actor, MNB_INPUT_LAYER_TOP);
}
Example #3
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);
}
static void
penge_grid_view_init (PengeGridView *self)
{
  PengeGridViewPrivate *priv = GET_PRIVATE_REAL (self);
  GError *error = NULL;

  self->priv = priv;

  priv->header_label = mx_label_new_with_text ("Myzone");
  clutter_actor_set_name (priv->header_label, "myzone-panel-header-label");
  mx_table_insert_actor_with_properties (MX_TABLE (self),
                                      priv->header_label,
                                      0, 0,
                                      "x-expand", FALSE,
                                      "y-expand", FALSE,
                                      "column-span", 3,
                                      NULL);

  priv->calendar_pane = g_object_new (PENGE_TYPE_CALENDAR_PANE,
                                      NULL);
  clutter_actor_set_width (priv->calendar_pane, 280);


  mx_table_insert_actor (MX_TABLE (self),
                      priv->calendar_pane,
                      1,
                      0);

  priv->email_pane = g_object_new (PENGE_TYPE_EMAIL_PANE,
                                   NULL);

  mx_table_insert_actor (MX_TABLE (self),
                      priv->email_pane,
                      2,
                      0);

  priv->favourite_apps_pane = g_object_new (PENGE_TYPE_APPS_PANE,
                                            NULL);

  mx_table_insert_actor (MX_TABLE (self),
                      priv->favourite_apps_pane,
                      3,
                      0);
  priv->div_tex = clutter_texture_new_from_file (V_DIV_LINE, &error);

  if (!priv->div_tex)
  {
    g_warning (G_STRLOC ": Error loading vertical divider: %s",
               error->message);
    g_clear_error (&error);
  } else {
    mx_table_insert_actor (MX_TABLE (self),
                        priv->div_tex,
                        1,
                        1);
  }

  priv->everything_pane = g_object_new (PENGE_TYPE_EVERYTHING_PANE,
                                        NULL);

  mx_table_insert_actor (MX_TABLE (self), priv->everything_pane, 1, 2);

  mx_table_set_row_spacing (MX_TABLE (self), 6);
  mx_table_set_column_spacing (MX_TABLE (self), 6);

  /* 
   * Create a background and parent it to the grid. We paint and allocate this
   * in the overridden vfuncs
   */
  priv->background = g_object_new (PENGE_TYPE_VIEW_BACKGROUND, NULL);
  clutter_actor_set_parent (priv->background, (ClutterActor *)self);
  clutter_actor_show (priv->background);

  priv->background_fade = clutter_texture_new_from_file (FADE_BG,
                                                         NULL);
  clutter_actor_set_parent (priv->background_fade, (ClutterActor *)self);
  clutter_actor_show (priv->background_fade);

  priv->gconf_client = gconf_client_get_default ();
  priv->show_calendar_notify_id = 
    gconf_client_notify_add (priv->gconf_client,
                             MEEGO_MYZONE_SHOW_CALENDAR,
                             _gconf_show_calendar_notify_cb,
                             self,
                             NULL,
                             &error);
  if (error)
  {
    g_warning (G_STRLOC ": Error setting gconf key notification: %s",
               error->message);
    g_clear_error (&error);
  } else {
    gconf_client_notify (priv->gconf_client, MEEGO_MYZONE_SHOW_CALENDAR);
  }

  priv->show_email_notify_id = 
    gconf_client_notify_add (priv->gconf_client,
                             MEEGO_MYZONE_SHOW_EMAIL,
                             _gconf_show_email_notify_cb,
                             self,
                             NULL,
                             &error);
  if (error)
  {
    g_warning (G_STRLOC ": Error setting gconf key notification: %s",
        error->message);
    g_clear_error (&error);
  } else {
    gconf_client_notify (priv->gconf_client, MEEGO_MYZONE_SHOW_EMAIL);
  }

}
Example #5
0
static gboolean
_create_settings_dialog (MexInfoBar *self)
{
  MexInfoBarPrivate *priv = self->priv;

  ClutterActor *dialog, *network_graphic;
  ClutterActor *network_tile, *dialog_layout, *dialog_label;
  ClutterActor *network_button;

  MxAction *close_dialog, *network_settings;

  dialog = mx_dialog_new ();
  mx_stylable_set_style_class (MX_STYLABLE (dialog), "MexInfoBarDialog");

  dialog_label = mx_label_new_with_text (_("Settings"));
  mx_stylable_set_style_class (MX_STYLABLE (dialog_label), "DialogHeader");

  /* Create actions for settings dialog */
  network_settings =
    _action_new_from_desktop_file ("mex-networks.desktop");

  close_dialog = mx_action_new_full ("close", _("Close"),
                                     G_CALLBACK (_close_dialog_cb), self);

  dialog_layout = mx_table_new ();
  mx_table_set_column_spacing (MX_TABLE (dialog_layout), 10);
  mx_table_set_row_spacing (MX_TABLE (dialog_layout), 30);

  mx_table_insert_actor (MX_TABLE (dialog_layout),
                         CLUTTER_ACTOR (dialog_label), 0, 0);

  if (network_settings)
    {
      gchar *tmp;
      network_graphic = mx_image_new ();
      mx_stylable_set_style_class (MX_STYLABLE (network_graphic),
                                   "NetworkGraphic");

      tmp = g_build_filename (mex_get_data_dir (), "style",
                              "graphic-network.png", NULL);
      mx_image_set_from_file (MX_IMAGE (network_graphic), tmp, NULL);
      g_free (tmp);

      network_tile = mex_tile_new ();
      mex_tile_set_label (MEX_TILE (network_tile), _("Network"));
      mex_tile_set_important (MEX_TILE (network_tile), TRUE);

      network_button = mx_button_new ();

      mx_button_set_action (MX_BUTTON (network_button), network_settings);

      mx_bin_set_child (MX_BIN (network_tile), network_button);
      mx_bin_set_child (MX_BIN (network_button), network_graphic);

      mx_table_insert_actor (MX_TABLE (dialog_layout),
                             CLUTTER_ACTOR (network_tile), 1, 1);
    }

  if (!network_settings)
    {
      ClutterActor *no_settings;
      no_settings = mx_label_new_with_text (_("No settings helpers installed"));

      clutter_actor_destroy (priv->settings_button);

      mx_table_insert_actor (MX_TABLE (dialog_layout),
                             CLUTTER_ACTOR (no_settings), 1, 0);
    }


  mx_bin_set_child (MX_BIN (dialog), dialog_layout);
  mx_dialog_add_action (MX_DIALOG (dialog), close_dialog);

  priv->settings_dialog = g_object_ref (dialog);

  return TRUE;
}
Example #6
0
void
mnb_home_widget_set_edit_mode (MnbHomeWidget *self,
    gboolean edit_mode)
{
  //if (edit_mode == self->priv->edit_mode)
  //  return;

  DEBUG ("%d -> %d for widget %s", self->priv->edit_mode,
      edit_mode, self->priv->settings_path);
  self->priv->edit_mode = edit_mode;
  //g_object_notify (G_OBJECT (self), "edit-mode");

  /* FIXME: should hold refs to the actors rather than destroy/recreate them? */
  mx_bin_set_child (MX_BIN (self), NULL);

  /* FIXME: animate this */
  if (edit_mode)
    {
      ClutterActor *table;

      table = mx_table_new ();
      mx_bin_set_child (MX_BIN (self), table);

      if (!STR_EMPTY (self->priv->module))
        {
          ClutterActor *config, *remove;

          remove = mx_button_new_with_label ("x");
          mx_table_insert_actor_with_properties (MX_TABLE (table), remove, 0, 1,
                                                 "x-expand", FALSE,
                                                 "y-expand", FALSE,
                                                 "x-fill", FALSE,
                                                 "y-fill", FALSE,
                                                 NULL);

          g_signal_connect (remove, "clicked",
              G_CALLBACK (home_widget_remove_module), self);

          if (self->priv->app != NULL)
            config = dawati_home_plugins_app_get_configuration (
                self->priv->app);
          else
            config = mx_label_new_with_text (_("Plugin missing"));

          if (CLUTTER_IS_ACTOR (config))
            mx_table_insert_actor_with_properties (MX_TABLE (table), config, 1, 0,
                                                   "x-expand", TRUE,
                                                   "y-expand", TRUE,
                                                   "x-fill", TRUE,
                                                   "y-fill", TRUE,
                                                   NULL);
        }
      else /* STR_EMPTY (self->priv->module) */
        {
          ClutterActor *button;

          button = mx_button_new_with_label ("+");
          mx_table_insert_actor (MX_TABLE (table), button, 0, 0);

          g_signal_connect (button, "clicked",
              G_CALLBACK (home_widget_add_module), self);
        }

      clutter_actor_show_all (table);
    }
  else /* !edit_mode */
    {
      ClutterActor *widget = NULL;

      if (self->priv->app != NULL)
        {
          widget = dawati_home_plugins_app_get_widget (self->priv->app);

          if (!CLUTTER_IS_ACTOR (widget))
            /* FIXME: make this better */
            {
            widget = mx_label_new_with_text (_("Broken plugin"));
            }
        }
      else if (!STR_EMPTY (self->priv->module))
        {
          widget = mx_label_new_with_text (_("Plugin missing"));
        }

      if (widget != NULL)
        mx_bin_set_child (MX_BIN (self), widget);
    }
}
Example #7
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);
}
static void
mex_search_plugin_init (MexSearchPlugin *self)
{
  MexModel *view_model;
  MexProxy *suggest_proxy;
  ClutterActor *icon, *header, *text, *frame, *box, *hbox;
  MexSearchPluginPrivate *priv = self->priv = SEARCH_PLUGIN_PRIVATE (self);
  MexModelCategoryInfo search = { "search", _("Search"), "icon-panelheader-search", 0, "" };
  /* create a category for search results that is not shown on the home screen */
  MexModelCategoryInfo search_results = {
      "search-results", _("Search"), "icon-panelheader-search", -1, "" };
  MexModelManager *manager = mex_model_manager_get_default ();

  manager = mex_model_manager_get_default ();
  mex_model_manager_add_category (manager, &search);
  mex_model_manager_add_category (manager, &search_results);

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

  priv->models = g_list_append (NULL, priv->history_model);

  /* 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_insert_actor (MX_TABLE (frame), priv->search_entry, 0, 0);
  mx_table_insert_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);

  view_model = mex_view_model_new (MEX_MODEL (priv->suggest_model));
  suggest_proxy = mex_generic_proxy_new (view_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 ();
  mx_bin_set_child (MX_BIN (priv->search_page), hbox);
  clutter_actor_add_child (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);
}
Example #9
0
static void
mnb_people_panel_init (MnbPeoplePanel *self)
{
  MnbPeoplePanelPrivate *priv = GET_PRIVATE (self);
  ClutterActor *label;
  ClutterActor *bin;
  ClutterActor *table;
  ClutterActor *scroll_view;
  ClutterActor *left_side;
  ClutterActor *right_side;
  AnerleyFeed *active_feed;

  priv->am = tp_account_manager_dup ();
  priv->aggregator = folks_individual_aggregator_new ();

  /* Populate top level table */
  label = mx_label_new_with_text (_("IM"));
  mx_stylable_set_style_class (MX_STYLABLE (label), "titleBar");
  mx_table_insert_actor_with_properties (MX_TABLE (self),
                                         CLUTTER_ACTOR (label),
                                         0, 0,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", TRUE,
                                         NULL);
  table = mx_table_new ();
  mx_stylable_set_style_class (MX_STYLABLE (table), "contentPane");
  mx_table_set_column_spacing (MX_TABLE (table), 23);
  mx_table_insert_actor_with_properties (MX_TABLE (self),
                                         CLUTTER_ACTOR (table),
                                         1, 0,
                                         "x-expand", TRUE,
                                         "y-expand", TRUE,
                                         "x-fill", TRUE,
                                         "y-fill", TRUE,
                                         NULL);
  left_side = mx_table_new ();
  clutter_actor_set_width (left_side, 300);
  mx_table_set_row_spacing (MX_TABLE (left_side), 10);
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         CLUTTER_ACTOR (left_side),
                                         0, 0,
                                         "x-expand", FALSE,
                                         "y-expand", TRUE,
                                         "x-fill", FALSE,
                                         "y-fill", TRUE,
                                         NULL);
  right_side = mx_table_new ();
  mx_table_set_row_spacing (MX_TABLE (right_side), 10);
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         CLUTTER_ACTOR (right_side),
                                         0, 1,
                                         "x-expand", TRUE,
                                         "y-expand", TRUE,
                                         "x-fill", TRUE,
                                         "y-fill", TRUE,
                                         NULL);

  /* Populate left side */
  table = mx_table_new ();
  mx_table_set_column_spacing (MX_TABLE (table), 10);
  clutter_actor_set_name (table, "people-panel-me-table");
  mx_table_insert_actor_with_properties (MX_TABLE (left_side),
                                         CLUTTER_ACTOR (table),
                                         0, 0,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", FALSE,
                                         NULL);
  bin = mx_frame_new ();
  clutter_actor_set_name (bin, "people-panel-me-avatar-frame");
  clutter_actor_set_size (bin, 84, 85);
  priv->avatar = anerley_tp_user_avatar_new ();
  clutter_actor_set_size (priv->avatar, 64, 64);
  mx_bin_set_child (MX_BIN (bin), priv->avatar);
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         bin,
                                         0, 0,
                                         "row-span", 3,
                                         "x-expand", FALSE,
                                         "y-expand", FALSE,
                                         "x-fill", FALSE,
                                         "y-fill", FALSE,
                                         NULL);
  label = mx_label_new_with_text (_("Me"));
  clutter_actor_set_name (label, "people-panel-me-label");
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         label,
                                         0, 1,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", FALSE,
                                         "x-align", MX_ALIGN_START,
                                         NULL);
  priv->presence_message = mx_label_new ();
  clutter_actor_set_name (label, "people-panel-me-presence-message");
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         priv->presence_message,
                                         1, 1,
                                         "x-expand", FALSE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", FALSE,
                                         NULL);
  priv->presence_chooser = anerley_presence_chooser_new ();
  clutter_actor_set_height (priv->presence_chooser, 40);
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         priv->presence_chooser,
                                         2, 1,
                                         "x-expand", FALSE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", FALSE,
                                         "y-align", MX_ALIGN_END,
                                         NULL);
  label = mx_label_new_with_text (_("You are chatting with:"));
  mx_stylable_set_style_class (MX_STYLABLE (label), "sectionHeader");
  mx_table_insert_actor_with_properties (MX_TABLE (left_side),
                                         label,
                                         1, 0,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", FALSE,
                                         NULL);
  scroll_view = mx_scroll_view_new ();
  mx_table_insert_actor_with_properties (MX_TABLE (left_side),
                                         scroll_view,
                                         2, 0,
                                         "x-expand", TRUE,
                                         "y-expand", TRUE,
                                         "x-fill", TRUE,
                                         "y-fill", TRUE,
                                         NULL);
  active_feed = anerley_tp_monitor_feed_new (priv->aggregator,
                                             "DawatiPanelPeople");
  priv->active_model = (AnerleyFeedModel *)anerley_feed_model_new (active_feed);
  priv->active_list_view = anerley_compact_tile_view_new (priv->active_model);
  clutter_container_add_actor (CLUTTER_CONTAINER (scroll_view),
                               priv->active_list_view);

  /* Populate right side */
  table = mx_table_new ();
  clutter_actor_set_name (table, "people-panel-actions-box");
  mx_table_set_column_spacing (MX_TABLE (table), 10);
  mx_table_insert_actor_with_properties (MX_TABLE (right_side),
                                         CLUTTER_ACTOR (table),
                                         0, 0,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", TRUE,
                                         NULL);
  create_sort_by_chooser (self);
  clutter_actor_set_size (priv->sort_by_chooser, 160, 40);
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         priv->sort_by_chooser,
                                         0, 0,
                                         "x-expand", FALSE,
                                         "y-expand", FALSE,
                                         "x-fill", FALSE,
                                         "y-fill", TRUE,
                                         NULL);
  create_new_chooser (self);
  clutter_actor_set_size (priv->new_chooser, 126, 40);
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         priv->new_chooser,
                                         0, 1,
                                         "x-expand", FALSE,
                                         "y-expand", FALSE,
                                         "x-fill", FALSE,
                                         "y-fill", TRUE,
                                         NULL);
  create_search_entry (self);
  //clutter_actor_set_height (priv->search_entry, 30);
  mx_stylable_set_style_class (MX_STYLABLE (priv->search_entry), "searchBox");
  mx_table_insert_actor_with_properties (MX_TABLE (table),
                                         priv->search_entry,
                                         0, 2,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "x-fill", TRUE,
                                         "y-fill", TRUE,
                                         NULL);
  priv->content_table = mx_table_new ();
  mx_stylable_set_style_class (MX_STYLABLE (priv->content_table), "contentPanel");
  mx_table_insert_actor_with_properties (MX_TABLE (right_side),
                                         priv->content_table,
                                         1, 0,
                                         "x-expand", TRUE,
                                         "y-expand", TRUE,
                                         "x-fill", TRUE,
                                         "y-fill", TRUE,
                                         NULL);
  priv->tp_feed = ANERLEY_FEED (anerley_tp_feed_new (priv->aggregator));
  priv->model = (AnerleyFeedModel *)anerley_feed_model_new (priv->tp_feed);
  priv->tile_view = anerley_tile_view_new (priv->model);
  priv->main_scroll_view = mx_scroll_view_new ();
  clutter_container_add_actor (CLUTTER_CONTAINER (priv->main_scroll_view),
                               priv->tile_view);
  mx_table_insert_actor (MX_TABLE (priv->content_table),
                         priv->main_scroll_view,
                         0, 0);

  /* No people && no accounts enabled */
  priv->no_people_tile = _make_empty_people_tile (self);
  clutter_actor_hide (priv->no_people_tile);

  mx_table_insert_actor_with_properties (MX_TABLE (priv->content_table),
                                         priv->no_people_tile,
                                         1, 0,
                                         "x-fill", TRUE,
                                         "x-expand", TRUE,
                                         "y-expand", TRUE,
                                         "y-fill", TRUE,
                                         NULL);

  /* No people && acounts are online */
  priv->everybody_offline_tile = _make_everybody_offline_tile (self);
  clutter_actor_hide (priv->everybody_offline_tile);

  mx_table_insert_actor_with_properties (MX_TABLE (priv->content_table),
                                         priv->everybody_offline_tile,
                                         2, 0,
                                         "x-fill", TRUE,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "y-fill", FALSE,
                                         "y-align", MX_ALIGN_START,
                                         "row-span", 1,
                                         NULL);

  priv->offline_banner =
    _make_offline_banner (self,
                          clutter_actor_get_width (priv->main_scroll_view));
  clutter_actor_hide (priv->offline_banner);
  mx_table_insert_actor_with_properties (MX_TABLE (priv->content_table),
                                         priv->offline_banner,
                                         3, 0,
                                         "x-fill", TRUE,
                                         "x-expand", TRUE,
                                         "y-expand", FALSE,
                                         "y-fill", FALSE,
                                         "y-align", MX_ALIGN_START,
                                         "row-span", 1,
                                         NULL);

  g_signal_connect (priv->tile_view,
                    "item-activated",
                    (GCallback)_tile_view_item_activated_cb,
                    self);

  g_signal_connect (priv->active_list_view,
                    "item-activated",
                    (GCallback)_tile_view_item_activated_cb,
                    self);


  g_signal_connect (priv->model,
                    "bulk-change-end",
                    (GCallback)_model_bulk_changed_end_cb,
                    self);
  g_signal_connect (priv->active_model,
                    "bulk-change-end",
                    (GCallback)_active_model_bulk_change_end_cb,
                    self);
  clutter_actor_hide ((ClutterActor *)priv->main_scroll_view);

  /* Placeholder changes based on onlineness or not */
  _update_placeholder_state (self);

  sw_online_add_notify (_online_notify_cb, self);
  _update_online_state (self, sw_is_online ());

  tp_proxy_prepare_async (priv->am, NULL, am_prepared_cb, self);
}