[gnumeric] Part 1 of changes to the properties tab in the document properties dialog
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Part 1 of changes to the properties tab in the document properties dialog
- Date: Tue, 28 Jun 2011 20:39:01 +0000 (UTC)
commit fb95f61fae5343236b4c225b5e6015791656803c
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue Jun 28 14:37:02 2011 -0600
Part 1 of changes to the properties tab in the document properties dialog
2011-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
* doc-meta-data.ui: restructure properties tab
* dialog-doc-metadata.c (dialog_doc_metadata_add_prop): remove argument,
change all callers, del;ete reference to names combo
(dialog_doc_metadata_set_prop): Don't act on new properties widgets
(cb_dialog_doc_metadata_keywords_sel_changed): simplify
(cb_dialog_doc_metadata_remove_clicked): simplify, don't act on new
properties widgets
(cb_dialog_doc_metadata_combo_prop_selected): deleted
(cb_dialog_doc_metadata_tree_prop_selected): simplify
(cb_dialog_doc_metadata_apply_clicked): deleted
(dialog_doc_metadata_init_properties_page): adjust for changes in
widgets
(dialog_doc_metadata_init_widgets): ditto
src/dialogs/ChangeLog | 18 +++-
src/dialogs/dialog-doc-metadata.c | 276 ++++++++-----------------------------
src/dialogs/doc-meta-data.ui | 217 +++++++++++++++--------------
3 files changed, 182 insertions(+), 329 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 747a5a9..5951c1e 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,9 +1,25 @@
2011-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * doc-meta-data.ui: restructure properties tab
+ * dialog-doc-metadata.c (dialog_doc_metadata_add_prop): remove argument,
+ change all callers, del;ete reference to names combo
+ (dialog_doc_metadata_set_prop): Don't act on new properties widgets
+ (cb_dialog_doc_metadata_keywords_sel_changed): simplify
+ (cb_dialog_doc_metadata_remove_clicked): simplify, don't act on new
+ properties widgets
+ (cb_dialog_doc_metadata_combo_prop_selected): deleted
+ (cb_dialog_doc_metadata_tree_prop_selected): simplify
+ (cb_dialog_doc_metadata_apply_clicked): deleted
+ (dialog_doc_metadata_init_properties_page): adjust for changes in
+ widgets
+ (dialog_doc_metadata_init_widgets): ditto
+
+2011-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* dialog-doc-metadata.c (dialog_doc_metadata_update_keywords_changed):
fix leak
(dialog_doc_metadata_transform_str_to_docprop_vect): fix leak
-
+
2011-06-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-doc-metadata.c (dialog_doc_metadata_get_gsf_prop_val_type):
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index 768bc29..e528aa4 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -113,14 +113,12 @@ typedef struct {
GtkTreeView *properties;
GtkTreeStore *properties_store;
- GtkComboBoxEntry *ppt_name;
- GtkListStore *ppt_name_store;
- GtkEntry *ppt_value;
- GtkEntry *ppt_link;
+ GtkEntry *ppt_name;
+ GtkComboBox *ppt_type;
+ GtkListStore *type_store;
GtkButton *add_button;
GtkButton *remove_button;
- GtkButton *apply_button;
/* Keyword Page */
GtkTreeView *key_tree_view;
@@ -515,12 +513,8 @@ static void
dialog_doc_metadata_add_prop (DialogDocMetaData *state,
const gchar *name,
const gchar *value,
- const gchar *link,
- gboolean activate_property)
+ const gchar *link)
{
- GtkTreeIter tree_iter;
- GtkTreeIter list_iter;
-
if (value == NULL)
value = "";
@@ -528,24 +522,11 @@ dialog_doc_metadata_add_prop (DialogDocMetaData *state,
link = "";
/* Append new values in tree view */
- gtk_tree_store_append (state->properties_store, &tree_iter, NULL);
- gtk_tree_store_set (state->properties_store,
- &tree_iter,
- 0, name,
- 1, value,
- 2, link,
- -1);
-
- /* Append new values in combo box */
- gtk_list_store_append (state->ppt_name_store, &list_iter);
- gtk_list_store_set (state->ppt_name_store,
- &list_iter,
- 0, name,
- -1);
-
- if (activate_property == TRUE)
- gtk_combo_box_set_active_iter (GTK_COMBO_BOX (state->ppt_name),
- &list_iter);
+ gtk_tree_store_insert_with_values (state->properties_store, NULL, NULL, G_MAXINT,
+ 0, name,
+ 1, value,
+ 2, link,
+ -1);
}
static GType
@@ -729,7 +710,6 @@ dialog_doc_metadata_set_prop (DialogDocMetaData *state,
const gchar *link_value)
{
GtkTreeIter tree_iter;
- GtkTreeIter list_iter;
GValue *value;
gboolean ret;
gboolean found;
@@ -766,26 +746,6 @@ dialog_doc_metadata_set_prop (DialogDocMetaData *state,
g_value_unset (value);
- /* Update entry value if necessary */
- ret = gtk_combo_box_get_active_iter (GTK_COMBO_BOX (state->ppt_name),
- &list_iter);
-
- if (ret == TRUE) {
- gtk_tree_model_get_value (GTK_TREE_MODEL (state->ppt_name_store),
- &list_iter,
- 0,
- value);
-
- if (strcmp (prop_name, g_value_get_string (value)) == 0) {
- gtk_entry_set_text (state->ppt_value, prop_value);
-
- if (link_value != NULL)
- gtk_entry_set_text (state->ppt_link, link_value);
- }
-
- g_value_unset (value);
- }
-
found = TRUE;
break;
}
@@ -799,7 +759,7 @@ dialog_doc_metadata_set_prop (DialogDocMetaData *state,
((link_value == NULL) || (*link_value == 0)))) {
/* If the property was not found create it */
if (found == FALSE)
- dialog_doc_metadata_add_prop (state, prop_name, prop_value, "", FALSE);
+ dialog_doc_metadata_add_prop (state, prop_name, prop_value, "");
}
dialog_doc_metadata_set_gsf_prop (state, prop_name, prop_value, link_value);
@@ -997,11 +957,9 @@ static void
cb_dialog_doc_metadata_keywords_sel_changed (GtkTreeSelection *treeselection,
DialogDocMetaData *state)
{
- GtkTreeIter iter;
-
gtk_widget_set_sensitive
(GTK_WIDGET (state->key_remove_button),
- gtk_tree_selection_get_selected (treeselection, NULL, &iter));
+ gtk_tree_selection_get_selected (treeselection, NULL, NULL));
}
static void
@@ -1135,7 +1093,7 @@ cb_dialog_doc_metadata_add_clicked (GtkWidget *w,
g_return_if_fail (state->metadata != NULL);
/* Create a new entry in Tree View and Combo Box */
- dialog_doc_metadata_add_prop (state, "<Name>", "<Value>", "", TRUE);
+ dialog_doc_metadata_add_prop (state, "<Name>", "<Value>", "");
}
/**
@@ -1239,134 +1197,43 @@ static void
cb_dialog_doc_metadata_remove_clicked (GtkWidget *remove_bt,
DialogDocMetaData *state)
{
- GtkTreeIter list_iter;
GtkTreeIter tree_iter;
- gboolean has_iter;
- GtkTreePath *path;
- GtkEntry *entry;
GValue *prop_name;
+ GtkTreeSelection *sel = gtk_tree_view_get_selection (state->properties);
g_return_if_fail (state->metadata != NULL);
- /* Get tree and list iter */
- gtk_combo_box_get_active_iter (GTK_COMBO_BOX (state->ppt_name),
- &list_iter);
+ if (gtk_tree_selection_get_selected (sel, NULL, &tree_iter)) {
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (state->ppt_name_store),
- &list_iter);
-
- has_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (state->properties_store),
- &tree_iter, path);
- gtk_tree_path_free (path);
- g_return_if_fail (has_iter);
-
- /* Get the property name */
- prop_name = g_new0 (GValue, 1);
- gtk_tree_model_get_value (GTK_TREE_MODEL (state->properties_store),
- &tree_iter,
- 0,
- prop_name);
-
- /* Update other pages */
- dialog_doc_metadata_update_prop (state,
- g_value_get_string (prop_name),
- NULL, NULL);
-
- /* Remove property from GsfMetadata */
- cmd_change_meta_data (WORKBOOK_CONTROL (state->wbcg), NULL,
- g_slist_prepend (NULL, g_value_dup_string (prop_name)));
+ /* Get the property name */
+ prop_name = g_new0 (GValue, 1);
+ gtk_tree_model_get_value (GTK_TREE_MODEL (state->properties_store),
+ &tree_iter,
+ 0,
+ prop_name);
- /* Remove from Tree View */
- gtk_tree_store_remove (state->properties_store,
- &tree_iter);
+ /* Update other pages */
+ dialog_doc_metadata_update_prop (state,
+ g_value_get_string (prop_name),
+ NULL, NULL);
- /* Remove from Combo Box */
- gtk_list_store_remove (state->ppt_name_store,
- &list_iter);
+ /* Remove property from GsfMetadata */
+ cmd_change_meta_data (WORKBOOK_CONTROL (state->wbcg), NULL,
+ g_slist_prepend (NULL, g_value_dup_string (prop_name)));
- /* Clear entries on 'Properties' page */
- entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (state->ppt_name)));
- gtk_entry_set_text (entry, "");
+ /* Remove from Tree View */
+ gtk_tree_store_remove (state->properties_store,
+ &tree_iter);
- gtk_entry_set_text (state->ppt_value, "");
- gtk_entry_set_text (state->ppt_link, "");
+ /* Free all data */
+ g_value_unset (prop_name);
+ g_free (prop_name);
+ }
/* Set remove button insensitive */
gtk_widget_set_sensitive (remove_bt, FALSE);
-
- /* Free all data */
- g_value_unset (prop_name);
- g_free (prop_name);
}
-/**
- * cb_dialog_doc_metadata_combo_prop_selected
- *
- * @combo_box : widget
- * @state : dialog main struct
- *
- * Update the highlited item in the tree view and the 'Properties' page entry values.
- *
- **/
-static void
-cb_dialog_doc_metadata_combo_prop_selected (GtkComboBox *combo_box,
- DialogDocMetaData *state)
-{
- GtkTreeIter list_iter;
- GtkTreeIter tree_iter;
- GtkTreePath *path;
- GValue *value;
- gchar *link_value;
-
- g_return_if_fail (state->metadata != NULL);
-
- /* Get list store path */
- if (gtk_combo_box_get_active_iter (combo_box, &list_iter)) {
- path = gtk_tree_model_get_path
- (GTK_TREE_MODEL (state->ppt_name_store), &list_iter);
-
- if (gtk_tree_model_get_iter
- (GTK_TREE_MODEL (state->properties_store),
- &tree_iter, path)) {
-
- /* Get value on the second column */
- value = g_new0 (GValue, 1);
- gtk_tree_model_get_value
- (GTK_TREE_MODEL (state->properties_store),
- &tree_iter, 1, value);
-
- gtk_entry_set_text (state->ppt_value,
- g_value_get_string (value));
-
- /* Get link value on the 3rd column */
- g_value_unset (value);
- gtk_tree_model_get_value
- (GTK_TREE_MODEL (state->properties_store),
- &tree_iter, 2, value);
-
- link_value = (gchar *) g_value_get_string (value);
-
- if (link_value != NULL)
- gtk_entry_set_text (state->ppt_link,
- (const gchar *) link_value);
-
- /* Update tree view cursor */
- gtk_tree_view_set_cursor (state->properties,
- path, NULL, FALSE);
-
- /* Set 'Remove' button sensitive */
- gtk_widget_set_sensitive
- (GTK_WIDGET (state->remove_button), TRUE);
-
- g_value_unset (value);
- g_free (value);
- } else {
- g_warning ("Did not get a valid iterator");
- }
-
- gtk_tree_path_free (path);
- }
-}
/**
* cb_dialog_doc_metadata_tree_prop_selected
@@ -1378,30 +1245,14 @@ cb_dialog_doc_metadata_combo_prop_selected (GtkComboBox *combo_box,
*
**/
static void
-cb_dialog_doc_metadata_tree_prop_selected (GtkTreeView *tree_view,
+cb_dialog_doc_metadata_tree_prop_selected (GtkTreeSelection *selection,
DialogDocMetaData *state)
{
- GtkTreeIter list_iter;
- GtkTreePath *path;
-
- g_return_if_fail (state->metadata != NULL);
+ g_return_if_fail (state->metadata != NULL);
- gtk_tree_view_get_cursor (tree_view, &path, NULL);
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->ppt_name_store),
- &list_iter,
- path)) {
-
- /* Activate item on combo box */
- gtk_combo_box_set_active_iter (GTK_COMBO_BOX (state->ppt_name),
- &list_iter);
-
- /* Set remove button sensitive */
- gtk_widget_set_sensitive (GTK_WIDGET (state->remove_button),
- TRUE);
- } else {
- g_warning ("Did not get a valid iterator");
- }
- gtk_tree_path_free (path);
+ /* Set remove button sensitive */
+ gtk_widget_set_sensitive (GTK_WIDGET (state->remove_button),
+ gtk_tree_selection_get_selected (selection, NULL, NULL));
}
/**
@@ -1462,20 +1313,13 @@ dialog_doc_metadata_populate_tree_view (gchar *name,
dialog_doc_metadata_add_prop (state,
gsf_doc_prop_get_name (prop),
str_value == NULL ? "" : str_value,
- link_value == NULL ? "" : link_value,
- FALSE);
+ link_value == NULL ? "" : link_value);
dialog_doc_metadata_update_prop (state, gsf_doc_prop_get_name (prop), str_value, prop);
g_free (str_value);
}
-static void cb_dialog_doc_metadata_apply_clicked (GtkWidget *w,
- DialogDocMetaData *state)
-{
- gtk_widget_set_sensitive (GTK_WIDGET (state->apply_button), FALSE);
-}
-
/**
* dialog_doc_metadata_init_properties_page
@@ -1488,22 +1332,23 @@ static void cb_dialog_doc_metadata_apply_clicked (GtkWidget *w,
static void
dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
{
+ GtkTreeSelection *sel;
+ GtkCellRenderer *cell;
+
g_return_if_fail (state->metadata != NULL);
g_return_if_fail (state->properties != NULL);
/* Set Remove and Apply buttons insensitive */
gtk_widget_set_sensitive (GTK_WIDGET (state->add_button), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (state->remove_button), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (state->apply_button), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (state->ppt_type), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (state->ppt_name), FALSE);
/* Intialize Combo Box */
- state->ppt_name_store = gtk_list_store_new (1, G_TYPE_STRING);
-
- gtk_combo_box_set_model (GTK_COMBO_BOX (state->ppt_name),
- GTK_TREE_MODEL (state->ppt_name_store));
- g_object_unref (state->ppt_name_store);
-
- gtk_combo_box_entry_set_text_column (state->ppt_name, 0);
+ /* gtk_combo_box_set_id_column (state->ppt_type, 0); */
+ cell = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(state->ppt_type), cell, TRUE);
+ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(state->ppt_type), cell, "text", 0, NULL);
/* Populate Treeview */
state->properties_store = gtk_tree_store_new (3,
@@ -1541,15 +1386,10 @@ dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
/* Set up signals */
/* Tree View */
- g_signal_connect (G_OBJECT (state->properties),
- "cursor-changed",
- G_CALLBACK (cb_dialog_doc_metadata_tree_prop_selected),
- state);
-
- /* Combo Box */
- g_signal_connect (G_OBJECT (state->ppt_name),
+ sel = gtk_tree_view_get_selection (state->properties);
+ g_signal_connect (G_OBJECT (sel),
"changed",
- G_CALLBACK (cb_dialog_doc_metadata_combo_prop_selected),
+ G_CALLBACK (cb_dialog_doc_metadata_tree_prop_selected),
state);
/* Entries */
@@ -1564,11 +1404,6 @@ dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
"clicked",
G_CALLBACK (cb_dialog_doc_metadata_remove_clicked),
state);
-
- g_signal_connect (G_OBJECT (state->apply_button),
- "clicked",
- G_CALLBACK (cb_dialog_doc_metadata_apply_clicked),
- state);
}
/******************************************************************************
@@ -1766,13 +1601,12 @@ dialog_doc_metadata_init_widgets (DialogDocMetaData *state)
/* Properties Page */
state->properties = GTK_TREE_VIEW (go_gtk_builder_get_widget (state->gui, "properties"));
- state->ppt_name = GTK_COMBO_BOX_ENTRY (go_gtk_builder_get_widget (state->gui, "ppt_name"));
- state->ppt_value = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "ppt_value"));
- state->ppt_link = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "ppt_link"));
+ state->ppt_name = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "property-name"));
+ state->ppt_type = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "type-combo"));
+ state->type_store = GTK_LIST_STORE (gtk_combo_box_get_model (state->ppt_type));
state->add_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "add_button"));
state->remove_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "remove_button"));
- state->apply_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "apply_button"));
/* Keyword Page */
state->key_tree_view = GTK_TREE_VIEW (go_gtk_builder_get_widget (state->gui, "keyview"));
diff --git a/src/dialogs/doc-meta-data.ui b/src/dialogs/doc-meta-data.ui
index 4d24838..c7f1a09 100644
--- a/src/dialogs/doc-meta-data.ui
+++ b/src/dialogs/doc-meta-data.ui
@@ -1139,6 +1139,58 @@
</packing>
</child>
<child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Edit items inside the above listing.</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="remove_button">
+ <property name="label">gtk-remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkHSeparator" id="hseparator4">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1146,15 +1198,28 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">New Document Property:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkTable" id="table3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
@@ -1176,54 +1241,21 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">Value: </property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="ppt_value">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text">This property's content (text)</property>
- <property name="invisible_char">â</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
+ <property name="label" translatable="yes">Type: </property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label124">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">Link:</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="y_options">GTK_SHRINK</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="ppt_link">
+ <object class="GtkEntry" id="property-name">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
@@ -1231,47 +1263,11 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="right_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="ppt_name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxentry-entry2">
- <property name="can_focus">False</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="layout_style">end</property>
- <child>
<object class="GtkButton" id="add_button">
<property name="label">gtk-add</property>
<property name="visible">True</property>
@@ -1282,48 +1278,33 @@
<property name="use_stock">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="remove_button">
- <property name="label">gtk-remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="apply_button">
- <property name="label">gtk-apply</property>
+ <object class="GtkComboBox" id="type-combo">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">typestore</property>
+ <property name="active">0</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
@@ -1796,4 +1777,26 @@
<column type="gchararray"/>
</columns>
</object>
+ <object class="GtkListStore" id="typestore">
+ <columns>
+ <!-- column-name typename -->
+ <column type="gchararray"/>
+ <!-- column-name typeid -->
+ <column type="gint"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">String</col>
+ <col id="1">1</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Complex Type</col>
+ <col id="1">0</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Date </col>
+ <col id="1">2</col>
+ </row>
+ </data>
+ </object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]