[nautilus/gtk3-breakage: 1/7] [src] don't use GtkComboBox text APIs (#632651)
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gtk3-breakage: 1/7] [src] don't use GtkComboBox text APIs (#632651)
- Date: Fri, 22 Oct 2010 15:45:25 +0000 (UTC)
commit 73079b062688b180e54900efc5b030310ddc61af
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Oct 21 13:34:19 2010 +0200
[src] don't use GtkComboBox text APIs (#632651)
They got replaced by GtkComboBoxText.
Thanks to Mathias Clasen and Flo Gravo.
src/file-manager/fm-properties-window.c | 10 +++++-----
src/nautilus-file-management-properties.c | 21 +++++++++++----------
src/nautilus-query-editor.c | 4 ++--
src/nautilus-view-as-action.c | 8 ++++----
4 files changed, 22 insertions(+), 21 deletions(-)
---
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index adc2e7e..e8f8fed 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -1469,7 +1469,7 @@ changed_group_callback (GtkComboBox *combo_box, NautilusFile *file)
g_assert (GTK_IS_COMBO_BOX (combo_box));
g_assert (NAUTILUS_IS_FILE (file));
- group = gtk_combo_box_get_active_text (combo_box);
+ group = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo_box));
cur_group = nautilus_file_get_group_name (file);
if (group != NULL && strcmp (group, cur_group) != 0) {
@@ -1624,7 +1624,7 @@ synch_groups_combo_box (GtkComboBox *combo_box, NautilusFile *file)
for (node = groups, group_index = 0; node != NULL; node = node->next, ++group_index) {
group_name = (const char *)node->data;
- gtk_combo_box_append_text (combo_box, group_name);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), group_name);
}
}
@@ -1638,10 +1638,10 @@ synch_groups_combo_box (GtkComboBox *combo_box, NautilusFile *file)
if (current_group_index < 0 && current_group_name != NULL) {
if (groups != NULL) {
/* add separator */
- gtk_combo_box_prepend_text (combo_box, "-");
+ gtk_combo_box_text_prepend_text (GTK_COMBO_BOX_TEXT (combo_box), "-");
}
- gtk_combo_box_prepend_text (combo_box, current_group_name);
+ gtk_combo_box_text_prepend_text (GTK_COMBO_BOX_TEXT (combo_box), current_group_name);
current_group_index = 0;
}
gtk_combo_box_set_active (combo_box, current_group_index);
@@ -1683,7 +1683,7 @@ attach_combo_box (GtkTable *table,
GtkWidget *aligner;
if (!two_columns) {
- combo_box = gtk_combo_box_new_text ();
+ combo_box = gtk_combo_box_text_new ();
} else {
GtkTreeModel *model;
GtkCellRenderer *renderer;
diff --git a/src/nautilus-file-management-properties.c b/src/nautilus-file-management-properties.c
index 2d7215a..9e3d0f6 100644
--- a/src/nautilus-file-management-properties.c
+++ b/src/nautilus-file-management-properties.c
@@ -289,7 +289,7 @@ free_column_names_array (GPtrArray *column_names)
}
static void
-create_icon_caption_combo_box_items (GtkComboBox *combo_box,
+create_icon_caption_combo_box_items (GtkComboBoxText *combo_box,
GList *columns)
{
GList *l;
@@ -298,7 +298,7 @@ create_icon_caption_combo_box_items (GtkComboBox *combo_box,
column_names = g_ptr_array_new ();
/* Translators: this is referred to captions under icons. */
- gtk_combo_box_append_text (combo_box, _("None"));
+ gtk_combo_box_text_append_text (combo_box, _("None"));
g_ptr_array_add (column_names, g_strdup ("none"));
for (l = columns; l != NULL; l = l->next) {
@@ -319,7 +319,7 @@ create_icon_caption_combo_box_items (GtkComboBox *combo_box,
continue;
}
- gtk_combo_box_append_text (combo_box, label);
+ gtk_combo_box_text_append_text (combo_box, label);
g_ptr_array_add (column_names, name);
g_free (label);
@@ -445,7 +445,7 @@ nautilus_file_management_properties_dialog_setup_icon_caption_page (GtkBuilder *
combo_box = GTK_WIDGET (gtk_builder_get_object (builder,
icon_captions_components[i]));
- create_icon_caption_combo_box_items (GTK_COMBO_BOX (combo_box), columns);
+ create_icon_caption_combo_box_items (GTK_COMBO_BOX_TEXT (combo_box), columns);
gtk_widget_set_sensitive (combo_box, writable);
g_signal_connect (combo_box, "changed",
@@ -461,27 +461,28 @@ nautilus_file_management_properties_dialog_setup_icon_caption_page (GtkBuilder *
static void
create_date_format_menu (GtkBuilder *builder)
{
- GtkWidget *combo_box;
+ GtkComboBoxText *combo_box;
gchar *date_string;
time_t now_raw;
struct tm* now;
- combo_box = GTK_WIDGET (gtk_builder_get_object (builder,
- NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DATE_FORMAT_WIDGET));
+ combo_box = GTK_COMBO_BOX_TEXT
+ (gtk_builder_get_object (builder,
+ NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DATE_FORMAT_WIDGET));
now_raw = time (NULL);
now = localtime (&now_raw);
date_string = eel_strdup_strftime ("%c", now);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), date_string);
+ gtk_combo_box_text_append_text (combo_box, date_string);
g_free (date_string);
date_string = eel_strdup_strftime ("%Y-%m-%d %H:%M:%S", now);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), date_string);
+ gtk_combo_box_text_append_text (combo_box, date_string);
g_free (date_string);
date_string = eel_strdup_strftime (_("today at %-I:%M:%S %p"), now);
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), date_string);
+ gtk_combo_box_text_append_text (combo_box, date_string);
g_free (date_string);
}
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index 7d351ae..d7812ee 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -901,10 +901,10 @@ nautilus_query_editor_add_row (NautilusQueryEditor *editor,
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (editor->details->visible_vbox), hbox, FALSE, FALSE, 0);
- combo = gtk_combo_box_new_text ();
+ combo = gtk_combo_box_text_new ();
row->combo = combo;
for (i = 0; i < NAUTILUS_QUERY_EDITOR_ROW_LAST; i++) {
- gtk_combo_box_append_text (GTK_COMBO_BOX (combo), gettext (row_type[i].name));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), gettext (row_type[i].name));
}
gtk_widget_show (combo);
gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
diff --git a/src/nautilus-view-as-action.c b/src/nautilus-view-as-action.c
index 7d434c3..e61323c 100644
--- a/src/nautilus-view-as-action.c
+++ b/src/nautilus-view-as-action.c
@@ -128,7 +128,7 @@ view_as_changed_callback (NautilusWindow *window,
node != NULL;
node = node->next, ++index) {
info = nautilus_view_factory_lookup (node->data);
- gtk_combo_box_append_text (combo_box, _(info->view_combo_label));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), _(info->view_combo_label));
if (nautilus_window_slot_content_view_matches_iid (slot, (char *)node->data)) {
selected_index = index;
@@ -141,8 +141,8 @@ view_as_changed_callback (NautilusWindow *window,
id = nautilus_window_slot_get_content_view_id (slot);
info = nautilus_view_factory_lookup (id);
- gtk_combo_box_append_text (combo_box,
- _(info->view_combo_label));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box),
+ _(info->view_combo_label));
selected_index = index;
}
@@ -170,7 +170,7 @@ connect_proxy (GtkAction *action,
gtk_container_set_border_width (GTK_CONTAINER (item), 4);
gtk_container_add (GTK_CONTAINER (item), view_as_menu_vbox);
- view_as_combo_box = gtk_combo_box_new_text ();
+ view_as_combo_box = gtk_combo_box_text_new ();
gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (view_as_combo_box), FALSE);
gtk_box_pack_end (GTK_BOX (view_as_menu_vbox), view_as_combo_box, TRUE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]