Пример #1
0
GtkWidget *
glade_tree_view_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
{
  GladeTreeViewEditor *view_editor;
  GtkWidget *vbox, *separator;
  gchar *str;

  g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
  g_return_val_if_fail (GLADE_IS_EDITABLE (embed), NULL);

  view_editor = g_object_new (GLADE_TYPE_TREE_VIEW_EDITOR, NULL);
  view_editor->embed = GTK_WIDGET (embed);

  /* Pack the parent on the left... */
  gtk_box_pack_start (GTK_BOX (view_editor), GTK_WIDGET (embed), TRUE, TRUE, 8);

  separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
  gtk_box_pack_start (GTK_BOX (view_editor), separator, FALSE, FALSE, 0);

  /* ...and the vbox with datastore/label on the right */
  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
  gtk_box_pack_start (GTK_BOX (view_editor), vbox, TRUE, TRUE, 8);

  str = g_strdup_printf ("<b>%s</b>", _("Choose a Data Model and define some\n"
                                        "columns in the data store first"));
  view_editor->no_model_message = gtk_label_new (str);
  gtk_label_set_use_markup (GTK_LABEL (view_editor->no_model_message), TRUE);
  gtk_label_set_justify (GTK_LABEL (view_editor->no_model_message),
                         GTK_JUSTIFY_CENTER);

  g_free (str);

  gtk_box_pack_start (GTK_BOX (vbox), view_editor->no_model_message, TRUE, TRUE,
                      0);

  view_editor->embed_list_store =
      (GtkWidget *)
      glade_widget_adaptor_create_editable (glade_widget_adaptor_get_by_type
                                            (GTK_TYPE_LIST_STORE),
                                            GLADE_PAGE_GENERAL);
  glade_editable_set_show_name (GLADE_EDITABLE (view_editor->embed_list_store),
                                FALSE);
  gtk_box_pack_start (GTK_BOX (vbox), view_editor->embed_list_store, TRUE, TRUE,
                      0);

  view_editor->embed_tree_store =
      (GtkWidget *)
      glade_widget_adaptor_create_editable (glade_widget_adaptor_get_by_type
                                            (GTK_TYPE_TREE_STORE),
                                            GLADE_PAGE_GENERAL);
  glade_editable_set_show_name (GLADE_EDITABLE (view_editor->embed_tree_store),
                                FALSE);
  gtk_box_pack_start (GTK_BOX (vbox), view_editor->embed_tree_store, TRUE, TRUE,
                      0);

  gtk_widget_show_all (GTK_WIDGET (view_editor));

  return GTK_WIDGET (view_editor);
}
Пример #2
0
static void
glade_tool_item_group_editor_set_show_name (GladeEditable *editable, gboolean show_name)
{
  GladeToolItemGroupEditor *group_editor = GLADE_TOOL_ITEM_GROUP_EDITOR (editable);

  glade_editable_set_show_name (GLADE_EDITABLE (group_editor->embed),
                                show_name);
}
Пример #3
0
static void
glade_tree_view_editor_set_show_name (GladeEditable * editable,
                                      gboolean show_name)
{
  GladeTreeViewEditor *view_editor = GLADE_TREE_VIEW_EDITOR (editable);

  glade_editable_set_show_name (GLADE_EDITABLE (view_editor->embed), show_name);
}
Пример #4
0
static void
    glade_sheet_editor_set_show_name (GladeEditable *editable, gboolean show_name)
{
    GladeSheetEditor *view_editor = GLADE_SHEET_EDITOR (editable);
    glade_editable_set_show_name (GLADE_EDITABLE (view_editor->embed), show_name);
}