spheras / desktopfolder

Bring your Desktop Back to Life
GNU General Public License v3.0
200 stars 40 forks source link

Window should be in proportionate size while linking file/folder in panel #249

Open fagunbhavsar opened 5 years ago

fagunbhavsar commented 5 years ago

When trying to link file or folder after creating a panel, the selection window is bigger in size

  1. Install new desktop folder (here - com.github.spheras.desktopfolder_1.0.10_amd64.deb)
  2. Create new panel
  3. From panel, right hand top corner button --> Link to file/folder
  4. Validate the opened window

Expected Result: The opened window is not big enough to cover almost half of the screen - both by breadth and height

Actual Result: Right now, the opening window is out of proportion

System: Ubuntu Budgie 19.04 Desktop folder version - 1.0.10

spheras commented 5 years ago

Hi @fagunbhavsar. I've been doing a little research on this subject (sizing the filechooser dialog), and I'm not sure, but it seems something managed by GTK automatically. For example, the current size of the dialog seems to be saved from previously size you got.. I mean, if you open the dialog, then it has the last size you put for it... AFAIK there exists a generic key at the registry to modify that size (org.gtk.settings.file-chooser)...

The code to open the dialog is something like this:

Gtk.FileChooserDialog chooser = new Gtk.FileChooserDialog (
            DesktopFolder.Lang.DESKTOPFOLDER_PANELLINK_MESSAGE, window, Gtk.FileChooserAction.OPEN,
            DesktopFolder.Lang.DIALOG_CANCEL,
            Gtk.ResponseType.CANCEL,
            DesktopFolder.Lang.DIALOG_SELECT,
            Gtk.ResponseType.ACCEPT);

if (chooser.run () == Gtk.ResponseType.ACCEPT) {
...
}

Maybe you can give me a hint about how to modify the default (automatic) size for that dialog. I have no idea :roll_eyes: