From: Witold B. <wit...@gm...> - 2020-12-12 22:49:49
|
Hi, I ported gprename to Gtk3. It wasn't too hard, even with me not writing Perl in 14 years or using Gtk in last 10 years :D It works, all functionality tested. I added few comments about spotted issues (negative offsets in Insert/Delete, and .config location). The patch is pretty minimal, but does few additional changes: Commonalizes some expressions when handling full paths. Resized About and Tips dialogs to not show scrolling bars by default. Adjusts the size of the text entry fields used for Replacement / Regular Expression. IMHO they were way too narrow for most uses. Moved decode+gettext to own function, to reduce clutter. Updated / removed old or irrelevant links. The overview of the Gtk3 port part (all these changes are required): s/Gtk2/Gtk3/ Remove keys import, and fix KEY_Q reference. Gtk2::Dialog->set_has_separator(TRUE) -> removed. Gtk2::Dialog->vbox -> Gtk3::Dialog->get_content_area() Gtk2::Entry->new_with_max_length() -> Gtk3::Entry->new; set_max_length() Gtk2::Rc -> CssProvider + Display+Screen provider APPLICATION prio. Gtk2::RadioButton->new -> RadioButton->new_with_label_from_widget new Gtk2::Button(string) -> Gtk3::Button->new_with_mnemonic $notebook->append_page(..., string) -> append_page(...., label->new_with_mnemonic) iter_next changes iterator in place -> don't overwrite $iter setting things in treeview -> convert to Glib::String using GValueWrapper. this is probably perl-Gtk3 bug. $window->window->set_cursor() -> $windows->(GDK)get_window()->set_cursor() $buffer->create_tag -> minor modifications due to enumerations access. Additionally: Gtk2::HPaned -> Gtk3::Paned, because Gtk3::HPaned is deprecated. VBox/HBox -> Box, because VBox/HBox deprecation. Add TODO for GtkGrid. Set minimal size of left and right pane. Change resizing policies of left and right pane. Confirmed to work on Linux amd64, with perl-Gtk3 0.037, and libgtk3 3.24.24 Hope the patch can be merged soon with new release. Signed-off-by: Witold Baryluk <wit...@gm...> Cheers, Witold |