Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Add support for file chooser buttons #602

Merged
merged 1 commit into from
Dec 11, 2017

Commits on Dec 11, 2017

  1. Add support for file chooser buttons

    This commit adds support for file chooser buttons. They are represented
    as a slice of tuples `(text, action)`. The original function uses
    varargs to support an arbitrary number of arguments. This implementation
    supports up to 3 buttons.
    
    **This is a breaking change.**
    
    See: https://developer.gnome.org/gtk3/stable/GtkFileChooserDialog.html#gtk-file-chooser-dialog-new
    
    Improve file chooser with buttons reliability
    
    Following the reviews in gtk-rs#602, this commit:
    - uses the `with_buttons` function instead of modifying `new` to keep
      backward compatibility.
    - saves the button texts in `Stash` objects to avoid invalid pointers
    - panics when the number of buttons is too high (instead of silently
      truncating the number of buttons)
    
    Remove doc comment for `FileChooserDialog::with_buttons`
    
    Remove local variables in `FileChooserDialog::with_buttons`
    
    This commit removes the Stash variables from
    `FileChooserDialog::with_buttons`, as requested in the PR gtk-rs#602
    
    Fix formatting issue
    
    Keep `downcast_unchecked` method on the same line as the closing
    parenthesis of the chopped-down call to `Widget::from_glib_none`.
    demurgos committed Dec 11, 2017
    Configuration menu
    Copy the full SHA
    06d9c44 View commit details
    Browse the repository at this point in the history