[gthumb: 9/20] Project wide replace GtkComboBox by GtkComboBoxText when needed
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 9/20] Project wide replace GtkComboBox by GtkComboBoxText when needed
- Date: Thu, 12 May 2011 20:22:36 +0000 (UTC)
commit 0854726363627f0f6077aa29906ad2ba7a4c9c15
Author: Lincoln de Sousa <lincoln comum org>
Date: Sat May 7 15:50:20 2011 -0300
Project wide replace GtkComboBox by GtkComboBoxText when needed
The replaces happened when the `_append_text()' method was being called. In all
other places, the usual GtkComboBox remains.
extensions/edit_metadata/gth-edit-comment-page.c | 4 ++--
extensions/file_tools/gth-file-tool-crop.c | 6 +++---
extensions/file_tools/gth-file-tool-resize.c | 6 +++---
extensions/photo_importer/dlg-photo-importer.c | 5 +++--
extensions/search/gth-search-editor.c | 4 ++--
gthumb/gth-filter-editor-dialog.c | 12 ++++++------
gthumb/gth-filter.c | 5 +++--
gthumb/gth-test-category.c | 5 +++--
gthumb/gth-test-simple.c | 20 ++++++++++++--------
gthumb/gth-time-selector.c | 4 ++--
gthumb/gtk-utils.c | 10 +++++-----
gthumb/gtk-utils.h | 2 +-
12 files changed, 45 insertions(+), 38 deletions(-)
---
diff --git a/extensions/edit_metadata/gth-edit-comment-page.c b/extensions/edit_metadata/gth-edit-comment-page.c
index 96b5180..cd4b569 100644
--- a/extensions/edit_metadata/gth-edit-comment-page.c
+++ b/extensions/edit_metadata/gth-edit-comment-page.c
@@ -443,8 +443,8 @@ gth_edit_comment_page_init (GthEditCommentPage *self)
self->priv->builder = _gtk_builder_new_from_file ("edit-comment-page.ui", "edit_metadata");
gtk_box_pack_start (GTK_BOX (self), _gtk_builder_get_widget (self->priv->builder, "content"), TRUE, TRUE, 0);
- self->priv->date_combobox = gtk_combo_box_new_text ();
- _gtk_combo_box_append_texts (GTK_COMBO_BOX (self->priv->date_combobox),
+ self->priv->date_combobox = gtk_combo_box_text_new ();
+ _gtk_combo_box_append_texts (GTK_COMBO_BOX_TEXT (self->priv->date_combobox),
_("No date"),
_("The following date"),
_("Current date"),
diff --git a/extensions/file_tools/gth-file-tool-crop.c b/extensions/file_tools/gth-file-tool-crop.c
index 3c7a552..0bb939f 100644
--- a/extensions/file_tools/gth-file-tool-crop.c
+++ b/extensions/file_tools/gth-file-tool-crop.c
@@ -421,12 +421,12 @@ gth_file_tool_crop_get_options (GthFileTool *base)
self->priv->ratio_combobox = _gtk_combo_box_new_with_texts (_("None"), _("Square"), NULL);
text = g_strdup_printf (_("%d x %d (Image)"), self->priv->pixbuf_width, self->priv->pixbuf_height);
- gtk_combo_box_append_text (GTK_COMBO_BOX (self->priv->ratio_combobox), text);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (self->priv->ratio_combobox), text);
g_free (text);
text = g_strdup_printf (_("%d x %d (Screen)"), self->priv->screen_width, self->priv->screen_height);
- gtk_combo_box_append_text (GTK_COMBO_BOX (self->priv->ratio_combobox), text);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (self->priv->ratio_combobox), text);
g_free (text);
- _gtk_combo_box_append_texts (GTK_COMBO_BOX (self->priv->ratio_combobox),
+ _gtk_combo_box_text_append_texts (GTK_COMBO_BOX_TEXT (self->priv->ratio_combobox),
_("5:4"),
_("4:3 (DVD, Book)"),
_("7:5"),
diff --git a/extensions/file_tools/gth-file-tool-resize.c b/extensions/file_tools/gth-file-tool-resize.c
index ba1776a..f448d31 100644
--- a/extensions/file_tools/gth-file-tool-resize.c
+++ b/extensions/file_tools/gth-file-tool-resize.c
@@ -418,12 +418,12 @@ gth_file_tool_resize_get_options (GthFileTool *base)
self->priv->ratio_combobox = _gtk_combo_box_new_with_texts (_("None"), _("Square"), NULL);
text = g_strdup_printf (_("%d x %d (Image)"), self->priv->original_width, self->priv->original_height);
- gtk_combo_box_append_text (GTK_COMBO_BOX (self->priv->ratio_combobox), text);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (self->priv->ratio_combobox), text);
g_free (text);
text = g_strdup_printf (_("%d x %d (Screen)"), self->priv->screen_width, self->priv->screen_height);
- gtk_combo_box_append_text (GTK_COMBO_BOX (self->priv->ratio_combobox), text);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (self->priv->ratio_combobox), text);
g_free (text);
- _gtk_combo_box_append_texts (GTK_COMBO_BOX (self->priv->ratio_combobox),
+ _gtk_combo_box_append_texts (GTK_COMBO_BOX_TEXT (self->priv->ratio_combobox),
_("5:4"),
_("4:3 (DVD, Book)"),
_("7:5"),
diff --git a/extensions/photo_importer/dlg-photo-importer.c b/extensions/photo_importer/dlg-photo-importer.c
index 5735d83..01eeafe 100644
--- a/extensions/photo_importer/dlg-photo-importer.c
+++ b/extensions/photo_importer/dlg-photo-importer.c
@@ -548,7 +548,7 @@ dlg_photo_importer (GthBrowser *browser,
general_filter = "file::type::is_media"; /* default value */
active_filter = 0;
- data->filter_combobox = gtk_combo_box_new_text ();
+ data->filter_combobox = gtk_combo_box_text_new ();
for (i = 0, i_general = -1, scan = tests; scan; scan = scan->next, i++) {
const char *registered_test_id = scan->data;
GthTest *test;
@@ -564,7 +564,8 @@ dlg_photo_importer (GthBrowser *browser,
}
data->general_tests = g_list_prepend (data->general_tests, g_strdup (gth_test_get_id (test)));
- gtk_combo_box_append_text (GTK_COMBO_BOX (data->filter_combobox), gth_test_get_display_name (test));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (data->filter_combobox),
+ gth_test_get_display_name (test));
g_object_unref (test);
}
data->general_tests = g_list_reverse (data->general_tests);
diff --git a/extensions/search/gth-search-editor.c b/extensions/search/gth-search-editor.c
index 26d9c67..e6a5394 100644
--- a/extensions/search/gth-search-editor.c
+++ b/extensions/search/gth-search-editor.c
@@ -133,8 +133,8 @@ gth_search_editor_construct (GthSearchEditor *self,
gtk_widget_show (self->priv->location_chooser);
gtk_box_pack_start (GTK_BOX (GET_WIDGET ("location_box")), self->priv->location_chooser, TRUE, TRUE, 0);
- self->priv->match_type_combobox = gtk_combo_box_new_text ();
- _gtk_combo_box_append_texts (GTK_COMBO_BOX (self->priv->match_type_combobox),
+ self->priv->match_type_combobox = gtk_combo_box_text_new ();
+ _gtk_combo_box_append_texts (GTK_COMBO_BOX_TEXT (self->priv->match_type_combobox),
_("all the following rules"),
_("any of the following rules"),
NULL);
diff --git a/gthumb/gth-filter-editor-dialog.c b/gthumb/gth-filter-editor-dialog.c
index a64215b..fff49f2 100644
--- a/gthumb/gth-filter-editor-dialog.c
+++ b/gthumb/gth-filter-editor-dialog.c
@@ -190,8 +190,8 @@ gth_filter_editor_dialog_construct (GthFilterEditorDialog *self,
/**/
- self->priv->match_type_combobox = gtk_combo_box_new_text ();
- _gtk_combo_box_append_texts (GTK_COMBO_BOX (self->priv->match_type_combobox),
+ self->priv->match_type_combobox = gtk_combo_box_text_new ();
+ _gtk_combo_box_append_texts (GTK_COMBO_BOX_TEXT (self->priv->match_type_combobox),
_("all the following rules"),
_("any of the following rules"),
NULL);
@@ -202,8 +202,8 @@ gth_filter_editor_dialog_construct (GthFilterEditorDialog *self,
/**/
- self->priv->limit_object_combobox = gtk_combo_box_new_text ();
- _gtk_combo_box_append_texts (GTK_COMBO_BOX (self->priv->limit_object_combobox),
+ self->priv->limit_object_combobox = gtk_combo_box_text_new ();
+ _gtk_combo_box_append_texts (GTK_COMBO_BOX_TEXT (self->priv->limit_object_combobox),
_("files"),
_("kB"),
_("MB"),
@@ -249,8 +249,8 @@ gth_filter_editor_dialog_construct (GthFilterEditorDialog *self,
/**/
- self->priv->selection_order_combobox = gtk_combo_box_new_text ();
- _gtk_combo_box_append_texts (GTK_COMBO_BOX (self->priv->selection_order_combobox),
+ self->priv->selection_order_combobox = gtk_combo_box_text_new ();
+ _gtk_combo_box_append_texts (GTK_COMBO_BOX_TEXT (self->priv->selection_order_combobox),
_("ascending"),
_("descending"),
NULL);
diff --git a/gthumb/gth-filter.c b/gthumb/gth-filter.c
index 4676fbc..072bb0e 100644
--- a/gthumb/gth-filter.c
+++ b/gthumb/gth-filter.c
@@ -345,12 +345,13 @@ create_control_for_size (GthFilter *filter)
/* size combo box */
- filter->priv->size_combo_box = gtk_combo_box_new_text ();
+ filter->priv->size_combo_box = gtk_combo_box_text_new ();
gtk_widget_show (filter->priv->size_combo_box);
size_idx = 0;
for (i = 0; i < G_N_ELEMENTS (size_data); i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (filter->priv->size_combo_box), _(size_data[i].name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (filter->priv->size_combo_box),
+ _(size_data[i].name));
if (! size_set && ((i == G_N_ELEMENTS (size_data) - 1) || (filter->priv->limit < size_data[i + 1].size))) {
char *value;
diff --git a/gthumb/gth-test-category.c b/gthumb/gth-test-category.c
index c8c2b4e..debf061 100644
--- a/gthumb/gth-test-category.c
+++ b/gthumb/gth-test-category.c
@@ -179,12 +179,13 @@ gth_test_category_real_create_control (GthTest *base)
/* text operation combo box */
- test->priv->op_combo_box = gtk_combo_box_new_text ();
+ test->priv->op_combo_box = gtk_combo_box_text_new ();
gtk_widget_show (test->priv->op_combo_box);
op_idx = 0;
for (i = 0; i < G_N_ELEMENTS (category_op_data); i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (test->priv->op_combo_box), _(category_op_data[i].name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (test->priv->op_combo_box),
+ _(category_op_data[i].name));
if ((category_op_data[i].op == test->priv->op) && (category_op_data[i].negative == test->priv->negative))
op_idx = i;
}
diff --git a/gthumb/gth-test-simple.c b/gthumb/gth-test-simple.c
index f4407e5..bd655b2 100644
--- a/gthumb/gth-test-simple.c
+++ b/gthumb/gth-test-simple.c
@@ -227,12 +227,13 @@ create_control_for_size (GthTestSimple *test)
/* text operation combo box */
- test->priv->size_op_combo_box = gtk_combo_box_new_text ();
+ test->priv->size_op_combo_box = gtk_combo_box_text_new ();
gtk_widget_show (test->priv->size_op_combo_box);
op_idx = 0;
for (i = 0; i < G_N_ELEMENTS (int_op_data); i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (test->priv->size_op_combo_box), _(int_op_data[i].name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (test->priv->size_op_combo_box),
+ _(int_op_data[i].name));
if ((int_op_data[i].op == test->priv->op) && (int_op_data[i].negative == test->priv->negative))
op_idx = i;
}
@@ -264,12 +265,13 @@ create_control_for_size (GthTestSimple *test)
/* size combo box */
- test->priv->size_combo_box = gtk_combo_box_new_text ();
+ test->priv->size_combo_box = gtk_combo_box_text_new ();
gtk_widget_show (test->priv->size_combo_box);
size_idx = 0;
for (i = 0; i < G_N_ELEMENTS (size_data); i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (test->priv->size_combo_box), _(size_data[i].name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (test->priv->size_combo_box),
+ _(size_data[i].name));
if (! size_set && ((i == G_N_ELEMENTS (size_data) - 1) || (test->priv->data.i < size_data[i + 1].size))) {
char *value;
@@ -325,12 +327,13 @@ create_control_for_string (GthTestSimple *test)
/* text operation combo box */
- test->priv->text_op_combo_box = gtk_combo_box_new_text ();
+ test->priv->text_op_combo_box = gtk_combo_box_text_new ();
gtk_widget_show (test->priv->text_op_combo_box);
op_idx = 0;
for (i = 0; i < G_N_ELEMENTS (text_op_data); i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (test->priv->text_op_combo_box), _(text_op_data[i].name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (test->priv->text_op_combo_box),
+ _(text_op_data[i].name));
if ((text_op_data[i].op == test->priv->op) && (text_op_data[i].negative == test->priv->negative))
op_idx = i;
}
@@ -399,12 +402,13 @@ create_control_for_date (GthTestSimple *test)
/* date operation combo box */
- test->priv->date_op_combo_box = gtk_combo_box_new_text ();
+ test->priv->date_op_combo_box = gtk_combo_box_text_new ();
gtk_widget_show (test->priv->date_op_combo_box);
op_idx = 0;
for (i = 0; i < G_N_ELEMENTS (date_op_data); i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (test->priv->date_op_combo_box), _(date_op_data[i].name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (test->priv->date_op_combo_box),
+ _(date_op_data[i].name));
if ((date_op_data[i].op == test->priv->op) && (date_op_data[i].negative == test->priv->negative))
op_idx = i;
}
diff --git a/gthumb/gth-time-selector.c b/gthumb/gth-time-selector.c
index b42d8a9..c0f7b3a 100644
--- a/gthumb/gth-time-selector.c
+++ b/gthumb/gth-time-selector.c
@@ -504,12 +504,12 @@ gth_time_selector_construct (GthTimeSelector *self)
gth_time_set_hms (dt->time, h, 0, 0, 0);
text = gth_datetime_strftime (dt, "%X");
- gtk_combo_box_append_text (GTK_COMBO_BOX (self->priv->time_combo_box), text);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (self->priv->time_combo_box), text);
g_free (text);
gth_time_set_hms (dt->time, h, 30, 0, 0);
text = gth_datetime_strftime (dt, "%X");
- gtk_combo_box_append_text (GTK_COMBO_BOX (self->priv->time_combo_box), text);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (self->priv->time_combo_box), text);
g_free (text);
}
diff --git a/gthumb/gtk-utils.c b/gthumb/gtk-utils.c
index 060a54e..fa9fb9a 100644
--- a/gthumb/gtk-utils.c
+++ b/gthumb/gtk-utils.c
@@ -946,13 +946,13 @@ _gtk_combo_box_new_with_texts (const char *first_text,
va_list args;
const char *text;
- combo_box = gtk_combo_box_new_text ();
+ combo_box = gtk_combo_box_text_new ();
va_start (args, first_text);
text = first_text;
while (text != NULL) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), text);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), text);
text = va_arg (args, const char *);
}
@@ -963,8 +963,8 @@ _gtk_combo_box_new_with_texts (const char *first_text,
void
-_gtk_combo_box_append_texts (GtkComboBox *combo_box,
- const char *first_text,
+_gtk_combo_box_append_texts (GtkComboBoxText *combo_box,
+ const char *first_text,
...)
{
va_list args;
@@ -974,7 +974,7 @@ _gtk_combo_box_append_texts (GtkComboBox *combo_box,
text = first_text;
while (text != NULL) {
- gtk_combo_box_append_text (combo_box, text);
+ gtk_combo_box_text_append_text (combo_box, text);
text = va_arg (args, const char *);
}
diff --git a/gthumb/gtk-utils.h b/gthumb/gtk-utils.h
index 16125aa..2482b1b 100644
--- a/gthumb/gtk-utils.h
+++ b/gthumb/gtk-utils.h
@@ -108,7 +108,7 @@ GtkWidget *
const char *name);
GtkWidget * _gtk_combo_box_new_with_texts (const char *first_text,
...);
-void _gtk_combo_box_append_texts (GtkComboBox *combo_box,
+void _gtk_combo_box_append_texts (GtkComboBoxText *combo_box,
const char *first_text,
...);
GtkWidget * _gtk_image_new_from_xpm_data (char *xpm_data[]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]