Make GtkFileChooserButton behave as expected when expanding

This commit is contained in:
Matthias Clasen 2010-11-07 11:22:07 -05:00 committed by Tristan Van Berkom
parent c4a54055fe
commit e5c0d40d94
2 changed files with 4 additions and 3 deletions

View File

@ -452,7 +452,8 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button)
priv->label = gtk_label_new (_(FALLBACK_DISPLAY_NAME));
gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_END);
gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5);
gtk_container_add (GTK_CONTAINER (box), priv->label);
gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
//gtk_container_add (GTK_CONTAINER (box), priv->label);
gtk_widget_show (priv->label);
sep = gtk_separator_new (GTK_ORIENTATION_VERTICAL);

View File

@ -327,7 +327,7 @@ main (int argc,
g_signal_connect (chooser, "selection-changed", G_CALLBACK (chooser_selection_changed_cb), NULL);
g_signal_connect (chooser, "file-activated", G_CALLBACK (chooser_file_activated_cb), NULL);
g_signal_connect (chooser, "update-preview", G_CALLBACK (chooser_update_preview_cb), NULL);
gtk_container_add (GTK_CONTAINER (hbox), chooser);
gtk_box_pack_start (GTK_BOX (hbox), chooser, TRUE, TRUE, 0);
button = gtk_button_new_from_stock (GTK_STOCK_PROPERTIES);
g_signal_connect (button, "clicked", G_CALLBACK (properties_button_clicked_cb), chooser);
@ -357,7 +357,7 @@ main (int argc,
g_signal_connect (chooser, "selection-changed", G_CALLBACK (chooser_selection_changed_cb), NULL);
g_signal_connect (chooser, "file-activated", G_CALLBACK (chooser_file_activated_cb), NULL);
g_signal_connect (chooser, "update-preview", G_CALLBACK (chooser_update_preview_cb), NULL);
gtk_container_add (GTK_CONTAINER (hbox), chooser);
gtk_box_pack_start (GTK_BOX (hbox), chooser, TRUE, TRUE, 0);
button = gtk_button_new_from_stock (GTK_STOCK_PROPERTIES);
g_signal_connect (button, "clicked", G_CALLBACK (properties_button_clicked_cb), chooser);