Remove deprecated GTK3 code, fixes #6103 (#6113)

Replaces the following deprecated Gtk classes throughout the codebase by their non-deprecated counterparts. Style, HBox, VBox, HPaned, VPaned, HScrollbar, VScrollbar, VSeparator, HSeparator, Stock, Table, VScale and HScale.
This commit is contained in:
Thanatomanic
2021-02-17 11:44:25 +01:00
committed by GitHub
parent a349d17b08
commit fc031ccb5a
119 changed files with 737 additions and 641 deletions

View File

@@ -25,21 +25,26 @@ RenameDialog::RenameDialog (Gtk::Window* parent)
: Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true), p(parent), imageData(nullptr)
{
Gtk::Table* names = Gtk::manage (new Gtk::Table (2, 2));
Gtk::Grid* names = Gtk::manage (new Gtk::Grid());
Gtk::Label* onlab = Gtk::manage (new Gtk::Label (M("FILEBROWSER_CURRENT_NAME")));
onlab->set_halign(Gtk::ALIGN_START);
Gtk::Label* nnlab = Gtk::manage (new Gtk::Label (M("FILEBROWSER_NEW_NAME")));
oldName = Gtk::manage (new Gtk::Label ("alma"));
newName = Gtk::manage (new Gtk::Entry ());
names->attach (*onlab, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2);
names->attach (*oldName, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
names->attach (*nnlab, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 2, 2);
names->attach (*newName, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
nnlab->set_halign(Gtk::ALIGN_START);
oldName = Gtk::manage (new Gtk::Label("alma"));
oldName->set_halign(Gtk::ALIGN_START);
newName = Gtk::manage (new Gtk::Entry());
newName->set_hexpand();
newName->set_halign(Gtk::ALIGN_FILL);
names->attach(*onlab, 0, 0);
names->attach(*oldName, 1, 0);
names->attach(*nnlab, 0, 1);
names->attach(*newName, 1, 1);
get_content_area()->pack_start (*names, Gtk::PACK_SHRINK, 4);
// Issue 316
// Gtk::HBox* tbox = Gtk::manage (new Gtk::HBox());
// Gtk::Box* tbox = Gtk::manage (new Gtk::Box());
// useTmpl = Gtk::manage (new Gtk::CheckButton (M("FILEBROWSER_USETEMPLATE")));
// templates = Gtk::manage (new MyComboBox ());
// templateModel = Gtk::ListStore::create (templateColumns);
@@ -51,8 +56,8 @@ RenameDialog::RenameDialog (Gtk::Window* parent)
// get_content_area()->pack_start (*tbox, Gtk::PACK_SHRINK, 4);
add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
add_button ("_OK", Gtk::RESPONSE_OK);
add_button ("_Cancel", Gtk::RESPONSE_CANCEL);
// Issue 316
// all = add_button ("All", RESPONSE_ALL);