[Github-comments] [geany/geany] Fix search history filling on GTK >= 3.20 (#1404)

Matthew Brush notifications at xxxxx
Wed Feb 22 01:33:47 UTC 2017


codebrainz commented on this pull request.



> @@ -641,27 +643,27 @@ static void create_replace_dialog(void)
 	label_replace = gtk_label_new_with_mnemonic(_("Replace wit_h:"));
 	gtk_misc_set_alignment(GTK_MISC(label_replace), 0, 0.5);
 
-	entry_find = gtk_combo_box_text_new_with_entry();
-	ui_entry_add_clear_icon(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_find))));
-	gtk_label_set_mnemonic_widget(GTK_LABEL(label_find), entry_find);
-	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_get_child(GTK_BIN(entry_find));
+	replace_dlg.find_combobox = gtk_combo_box_text_new_with_entry();
+	replace_dlg.find_entry = gtk_bin_get_child(GTK_BIN(replace_dlg.find_combobox));

Ah, it seems to be [documented](https://developer.gnome.org/gtk3/stable/GtkComboBoxText.html):

> The entry itself can be accessed by calling gtk_bin_get_child() on the combo box.

Though having a `gtk_combo_box_text_get_entry()` function would inspire more confidence that weren't going to break it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1404#discussion_r102364759
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170221/290f9fea/attachment.html>


More information about the Github-comments mailing list