I use Geany's **Replace** dialog by default (bound to CTRL-F). It is not very nice to use on a small screen as it is very wide and either blocks some code or it blocks my list of files.
I think it should be vertically oriented to minimise this disruption.
The PR reduces the minimum-width of the **Replace** dialog by 37% on my laptop screen.
Even if you do not like it then please consider the first commit on its own.
This could be further improved by putting the 6 buttons at the bottom in rows of 2, and perhaps putting the regex options in their own GtkExpander.
Any approved changes can then be copied to the **Find** dialog.
What do you think?
Original: ![1_orig](https://user-images.githubusercontent.com/1383407/35925325-56f9d918-0c1d-11e...)
Remove min-width of combo-boxes ![2_no_min_width](https://user-images.githubusercontent.com/1383407/35925329-58c98216-0c1d-11e...)
Make combo-box labels and **Replace All** contents vertically oriented ![3_more_vertical](https://user-images.githubusercontent.com/1383407/35925338-5abf2be8-0c1d-11e...)
Make the checkbox options vertically oriented ![4_single_col](https://user-images.githubusercontent.com/1383407/35925340-5c94ff2e-0c1d-11e...)
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1762
-- Commit Summary --
* Don't set combobox width in Replace window * Further reduce min-width of replace dialog * Put all checkboxes in single column
-- File Changes --
M src/search.c (48)
-- Patch Links --
https://github.com/geany/geany/pull/1762.patch https://github.com/geany/geany/pull/1762.diff
Removing setting the entry widths to fixed numbers of characters seems ok (commit 1).
But I do not like the look of the other two, having labels above the entry is different to every other dialog in Geany and every other replace dialog in editors I have on this machine. I also don't like the removal of the close button which allows me to change my mind.
Also I am not sure its right since it seems to no longer set a parent and that may modify the dialog behaviour (platform and desktop dependent).
codebrainz commented on this pull request.
GtkSizeGroup *label_size;
- replace_dlg.dialog = gtk_dialog_new_with_buttons(_("Replace"), - GTK_WINDOW(main_widgets.window), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, NULL); + replace_dlg.dialog = gtk_dialog_new();
As @elextr mentionedin the PR comments, this doesn't set the transient parent anymore, I believe you can set it with (`gtk_window_set_transient_for()`)[https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-transi...].
The first change seems fine from the image. It seems good to not force a minimum size unless truly needed (or something really small), and the default size of the dialog needn't/shouldn't change.
For the other stuff, perhaps it could be made more responsive so that once the dialog gets too small to fit, the contents could start adapting. I think GTK+ 3 has some new widgets to help with this (ex. [GtkFlowBox](https://developer.gnome.org/gtk3/stable/GtkFlowBox.html#gtk-flow-box-set-col...)). It would be more complicated code-wise but it would allow your use case without negatively affecting those of us with 4k screens and dual monitors or whatever.
@shiftee pushed 1 commit.
46cffb5 Restore setting transient parent for replace dialog
The GTKFlowBox seems like a nice solution. Does Geany still support GTK2? If so should I use an #ifdef ?
Does Geany still support GTK2?
Yes
If so should I use an #ifdef ?
Yes
github-comments@lists.geany.org