[Xfce4-commits] [thunar-plugins/thunar-vcs-plugin] 06/13: Use GtkComboBoxText
noreply at xfce.org
noreply at xfce.org
Thu May 24 04:05:10 CEST 2018
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository thunar-plugins/thunar-vcs-plugin.
commit a5795b4c13090a0f553cda5ae20bf07ca319cb8b
Author: Andre Miranda <andreldm at xfce.org>
Date: Wed Nov 15 22:21:31 2017 -0300
Use GtkComboBoxText
---
tvp-svn-helper/tsh-properties-dialog.c | 46 ++++++++++++----------------------
1 file changed, 16 insertions(+), 30 deletions(-)
diff --git a/tvp-svn-helper/tsh-properties-dialog.c b/tvp-svn-helper/tsh-properties-dialog.c
index 2c13010..7ba6439 100644
--- a/tvp-svn-helper/tsh-properties-dialog.c
+++ b/tvp-svn-helper/tsh-properties-dialog.c
@@ -150,21 +150,21 @@ tsh_properties_dialog_init (TshPropertiesDialog *dialog)
box = gtk_vbox_new (FALSE, 0);
- dialog->combo_box = combo_box = gtk_combo_box_entry_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_EOL_STYLE);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_EXECUTABLE);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_EXTERNALS);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_IGNORE);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_KEYWORDS);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_MERGEINFO);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_MIME_TYPE);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_NEEDS_LOCK);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_SPECIAL);
+ dialog->combo_box = combo_box = gtk_combo_box_text_new ();
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_EOL_STYLE);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_EXECUTABLE);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_EXTERNALS);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_IGNORE);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_KEYWORDS);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_MERGEINFO);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_MIME_TYPE);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_NEEDS_LOCK);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), NULL, SVN_PROP_SPECIAL);
completion = gtk_entry_completion_new();
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box));
gtk_entry_completion_set_model(completion, model);
- gtk_entry_completion_set_text_column(completion, gtk_combo_box_entry_get_text_column (GTK_COMBO_BOX_ENTRY (combo_box)));
+ gtk_entry_completion_set_text_column(completion, gtk_combo_box_get_entry_text_column (GTK_COMBO_BOX (combo_box)));
gtk_entry_completion_set_inline_completion(completion, TRUE);
gtk_entry_set_completion(GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo_box))), completion);
g_object_unref(completion);
@@ -184,20 +184,6 @@ tsh_properties_dialog_init (TshPropertiesDialog *dialog)
dialog->depth = depth = gtk_combo_box_new_with_model (model);
- /*
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- 0, _("Unknown"),
- 1, svn_depth_unknown,
- -1);
-
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- 0, _("Exclude"),
- 1, svn_depth_exclude,
- -1);
- */
-
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
/* Translators: svn recursion selection
@@ -354,7 +340,7 @@ tsh_properties_dialog_add (TshPropertiesDialog *dialog, const char *name, const
g_free (line);
- column = gtk_combo_box_entry_get_text_column (GTK_COMBO_BOX_ENTRY (dialog->combo_box));
+ column = gtk_combo_box_get_entry_text_column (GTK_COMBO_BOX (dialog->combo_box));
model = gtk_combo_box_get_model (GTK_COMBO_BOX (dialog->combo_box));
if (gtk_tree_model_get_iter_first (model, &iter))
{
@@ -375,7 +361,7 @@ tsh_properties_dialog_add (TshPropertiesDialog *dialog, const char *name, const
if (!found)
{
- gtk_combo_box_append_text (GTK_COMBO_BOX (dialog->combo_box), name);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (dialog->combo_box), NULL, name);
}
}
}
@@ -394,7 +380,7 @@ tsh_properties_dialog_get_key (TshPropertiesDialog *dialog)
{
g_return_val_if_fail (TSH_IS_PROPERTIES_DIALOG (dialog), NULL);
- return gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->combo_box));
+ return gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (dialog->combo_box));
}
gchar *
@@ -473,7 +459,7 @@ selection_changed (GtkTreeView *tree_view, gpointer user_data)
gint column;
gtk_tree_model_get (model, &iter, COLUMN_NAME, &name, COLUMN_FULL_VALUE, &value, -1);
- column = gtk_combo_box_entry_get_text_column (GTK_COMBO_BOX_ENTRY (dialog->combo_box));
+ column = gtk_combo_box_get_entry_text_column (GTK_COMBO_BOX (dialog->combo_box));
model = gtk_combo_box_get_model (GTK_COMBO_BOX (dialog->combo_box));
if (gtk_tree_model_get_iter_first (model, &iter))
{
@@ -496,7 +482,7 @@ selection_changed (GtkTreeView *tree_view, gpointer user_data)
if (!found)
{
- gtk_combo_box_append_text (GTK_COMBO_BOX (dialog->combo_box), name);
+ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (dialog->combo_box), NULL, name);
g_assert (gtk_tree_model_iter_next (model, &iter));
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (dialog->combo_box), &iter);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list