Commit 1366373c authored by Cosimo Cecchi's avatar Cosimo Cecchi

pathbar: fix set_label_size_request() for no-label buttons

It's convenient to just call this in a loop on the button data, so just
return if there's no label to set the size request for.
parent fb977bd4
......@@ -352,6 +352,10 @@ set_label_size_request (ButtonData *button_data)
gchar *markup;
GtkRequisition min_req, bold_req;
if (button_data->label == NULL) {
return;
}
gtk_label_set_ellipsize (GTK_LABEL (button_data->label), PANGO_ELLIPSIZE_NONE);
gtk_widget_get_preferred_size (button_data->label, &min_req, NULL);
gtk_label_set_ellipsize (GTK_LABEL (button_data->label), PANGO_ELLIPSIZE_MIDDLE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment