Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 18 Jan 2014 02:13:05 UTC Commit: 7c6f48e4f56999eef6e5f29b4106c3e1d05ffe47 https://github.com/geany/geany/commit/7c6f48e4f56999eef6e5f29b4106c3e1d05ffe...
Log Message: ----------- Workaround a slowness in multi-column combo boxes under GTK3
Always set the combo boxes' wrap-width after their models are fully filled to work around dramatic slowness described in GTK bug https://bugzilla.gnome.org/show_bug.cgi?id=722388
Modified Paths: -------------- data/geany.glade src/dialogs.c src/prefs.c
Modified: data/geany.glade 2 files changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -4369,7 +4369,6 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="model">encoding_list</property> - <property name="wrap_width">3</property> <child> <object class="GtkCellRendererText" id="cellrenderertext6"/> <attributes> @@ -4436,7 +4435,6 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="model">encoding_list</property> - <property name="wrap_width">3</property> <child> <object class="GtkCellRendererText" id="cellrenderertext7"/> <attributes>
Modified: src/dialogs.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -321,7 +321,6 @@ static GtkWidget *add_file_open_extra_widget(GtkWidget *dialog) /* the ebox is for the tooltip, because gtk_combo_box can't show tooltips */ filetype_ebox = gtk_event_box_new(); filetype_combo = gtk_combo_box_text_new(); - gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(filetype_combo), 2); gtk_widget_set_tooltip_text(filetype_ebox, _("Explicitly defines a filetype for the file, if it would not be detected by filename extension.\nNote if you choose multiple files, they will all be opened with the chosen filetype.")); gtk_container_add(GTK_CONTAINER(filetype_ebox), filetype_combo); @@ -394,6 +393,7 @@ static GtkWidget *create_open_file_dialog(void) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(filetype_combo), ft->title); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filetypes_create_file_filter(ft)); } + gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(filetype_combo), 3); gtk_combo_box_set_active(GTK_COMBO_BOX(filetype_combo), 0);
/* fill encoding combo box */
Modified: src/prefs.c 9 files changed, 8 insertions(+), 1 deletions(-) =================================================================== @@ -1664,7 +1664,7 @@ void prefs_show_dialog(void) if (ui_widgets.prefs_dialog == NULL) { GtkListStore *encoding_list, *eol_list; - GtkWidget *label; + GtkWidget *label, *widget; guint i; gchar *encoding_string;
@@ -1687,6 +1687,13 @@ void prefs_show_dialog(void) list_store_append_text(eol_list, utils_get_eol_name(SC_EOL_CR)); list_store_append_text(eol_list, utils_get_eol_name(SC_EOL_LF));
+ /* wet combo box wrap width after having filled the encoding to workaround + * GTK bug https://bugzilla.gnome.org/show_bug.cgi?id=722388 */ + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_new_encoding"); + gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(widget), 3); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "combo_open_encoding"); + gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(widget), 3); + /* add manually GeanyWrapLabels because they can't be added with Glade */ /* page Tools */ label = geany_wrap_label_new(_("Enter tool paths below. Tools you do not need can be left blank."));
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).