Replace GTK_BIN(...)->child with gtk_bin_get_child(...)

This commit is contained in:
Matthew Brush 2011-10-11 21:30:28 -07:00
parent 2aafa6a197
commit 182bdc3b17
4 changed files with 12 additions and 12 deletions

View File

@ -791,7 +791,7 @@ static void ui_combo_box_changed(GtkComboBox *combo, gpointer user_data)
{
/* we get this callback on typing as well as choosing an item */
if (gtk_combo_box_get_active(combo) >= 0)
gtk_widget_activate(GTK_BIN(combo)->child);
gtk_widget_activate(gtk_bin_get_child(GTK_BIN(combo)));
}
@ -909,7 +909,7 @@ static GtkWidget *make_filterbar(void)
label = gtk_label_new(_("Filter:"));
filter_combo = gtk_combo_box_entry_new_text();
filter_entry = GTK_BIN(filter_combo)->child;
filter_entry = gtk_bin_get_child(GTK_BIN(filter_combo));
if (gtk_check_version(2, 15, 2) == NULL)
{
@ -1107,7 +1107,7 @@ void plugin_init(GeanyData *data)
path_combo = gtk_combo_box_entry_new_text();
gtk_box_pack_start(GTK_BOX(file_view_vbox), path_combo, FALSE, FALSE, 2);
g_signal_connect(path_combo, "changed", G_CALLBACK(ui_combo_box_changed), NULL);
path_entry = GTK_BIN(path_combo)->child;
path_entry = gtk_bin_get_child(GTK_BIN(path_combo));
g_signal_connect(path_entry, "activate", G_CALLBACK(on_path_entry_activate), NULL);
file_view = gtk_tree_view_new();

View File

@ -1000,7 +1000,7 @@ static void add_input_widgets(GtkWidget *dialog, GtkWidget *vbox,
{
GtkWidget *combo = gtk_combo_box_entry_new_text();
entry = GTK_BIN(combo)->child;
entry = gtk_bin_get_child(GTK_BIN(combo));
ui_entry_add_clear_icon(GTK_ENTRY(entry));
g_object_set_data(G_OBJECT(dialog), "combo", combo);
gtk_container_add(GTK_CONTAINER(vbox), combo);

View File

@ -484,7 +484,7 @@ static void create_find_dialog(void)
gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry))), 248);
gtk_entry_set_width_chars(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry))), 50);
find_dlg.entry = GTK_BIN(entry)->child;
find_dlg.entry = gtk_bin_get_child(GTK_BIN(entry));
ui_hookup_widget(find_dlg.dialog, entry, "entry");
g_signal_connect(gtk_bin_get_child(GTK_BIN(entry)), "activate",
@ -650,7 +650,7 @@ static void create_replace_dialog(void)
gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_find))), 248);
gtk_entry_set_width_chars(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_find))), 50);
ui_hookup_widget(replace_dlg.dialog, entry_find, "entry_find");
replace_dlg.find_entry = GTK_BIN(entry_find)->child;
replace_dlg.find_entry = gtk_bin_get_child(GTK_BIN(entry_find));
entry_replace = gtk_combo_box_entry_new_text();
ui_entry_add_clear_icon(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_replace))));
@ -658,7 +658,7 @@ static void create_replace_dialog(void)
gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_replace))), 248);
gtk_entry_set_width_chars(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_replace))), 50);
ui_hookup_widget(replace_dlg.dialog, entry_replace, "entry_replace");
replace_dlg.replace_entry = GTK_BIN(entry_replace)->child;
replace_dlg.replace_entry = gtk_bin_get_child(GTK_BIN(entry_replace));
/* tab from find to the replace entry */
g_signal_connect(gtk_bin_get_child(GTK_BIN(entry_find)),
@ -1060,7 +1060,7 @@ void search_show_find_in_files_dialog(const gchar *dir)
if (doc && ! sel && ! GTK_WIDGET_VISIBLE(fif_dlg.dialog))
sel = editor_get_default_selection(doc->editor, search_prefs.use_current_word, NULL);
entry = GTK_BIN(fif_dlg.search_combo)->child;
entry = gtk_bin_get_child(GTK_BIN(fif_dlg.search_combo));
if (sel)
gtk_entry_set_text(GTK_ENTRY(entry), sel);
g_free(sel);
@ -1073,7 +1073,7 @@ void search_show_find_in_files_dialog(const gchar *dir)
app->project->base_path);
}
entry = GTK_BIN(fif_dlg.dir_combo)->child;
entry = gtk_bin_get_child(GTK_BIN(fif_dlg.dir_combo));
if (NZV(dir))
cur_dir = g_strdup(dir); /* custom directory argument passed */
else

View File

@ -1159,9 +1159,9 @@ gchar *ui_menu_item_get_text(GtkMenuItem *menu_item)
{
const gchar *text = NULL;
if (GTK_BIN(menu_item)->child)
if (gtk_bin_get_child(GTK_BIN(menu_item)))
{
GtkWidget *child = GTK_BIN(menu_item)->child;
GtkWidget *child = gtk_bin_get_child(GTK_BIN(menu_item));
if (GTK_IS_LABEL(child))
text = gtk_label_get_text(GTK_LABEL(child));
@ -1534,7 +1534,7 @@ void ui_combo_box_add_to_history(GtkComboBoxEntry *combo_entry,
if (history_len <= 0)
history_len = 10;
if (!text)
text = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(combo)->child));
text = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo))));
model = gtk_combo_box_get_model(combo);