Replace Gtk::make_managed() with Gtk::manage()
Maintain compatibility with gtkmm 3.16.
This commit is contained in:
parent
58f0783561
commit
329341f89f
@ -671,7 +671,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
|
||||
queueimg->set_tooltip_markup (M ("MAIN_BUTTON_PUTTOQUEUE_TOOLTIP"));
|
||||
setExpandAlignProperties (queueimg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
|
||||
|
||||
send_to_external = Gtk::make_managed<PopUpButton>("", false);
|
||||
send_to_external = Gtk::manage(new PopUpButton("", false));
|
||||
send_to_external->set_tooltip_text(M("MAIN_BUTTON_SENDTOEDITOR_TOOLTIP"));
|
||||
setExpandAlignProperties(send_to_external->buttonGroup, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
|
||||
send_to_external->addEntry("palette-brush.png", M("GENERAL_OTHER"));
|
||||
|
@ -34,7 +34,7 @@ ExternalEditorPreferences::ExternalEditorPreferences():
|
||||
toolbar(Gtk::Orientation::ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
// List view.
|
||||
list_view = Gtk::make_managed<Gtk::TreeView>();
|
||||
list_view = Gtk::manage(new Gtk::TreeView());
|
||||
list_view->set_model(list_model);
|
||||
list_view->append_column(*Gtk::manage(makeAppColumn()));
|
||||
list_view->append_column(*Gtk::manage(makeCommandColumn()));
|
||||
@ -52,13 +52,13 @@ ExternalEditorPreferences::ExternalEditorPreferences():
|
||||
list_scroll_area.add(*list_view);
|
||||
|
||||
// Toolbar buttons.
|
||||
auto add_image = Gtk::make_managed<RTImage>("add-small.png");
|
||||
auto remove_image = Gtk::make_managed<RTImage>("remove-small.png");
|
||||
button_add = Gtk::make_managed<Gtk::Button>();
|
||||
button_remove = Gtk::make_managed<Gtk::Button>();
|
||||
auto add_image = Gtk::manage(new RTImage("add-small.png"));
|
||||
auto remove_image = Gtk::manage(new RTImage("remove-small.png"));
|
||||
button_add = Gtk::manage(new Gtk::Button());
|
||||
button_remove = Gtk::manage(new Gtk::Button());
|
||||
button_add->set_image(*add_image);
|
||||
button_remove->set_image(*remove_image);
|
||||
button_app_chooser = Gtk::make_managed<Gtk::Button>(M("PREFERENCES_EXTERNALEDITOR_CHANGE"));
|
||||
button_app_chooser = Gtk::manage(new Gtk::Button(M("PREFERENCES_EXTERNALEDITOR_CHANGE")));
|
||||
button_file_chooser = Gtk::manage(new Gtk::Button(M("PREFERENCES_EXTERNALEDITOR_CHANGE_FILE")));
|
||||
|
||||
button_app_chooser->signal_pressed().connect(sigc::mem_fun(
|
||||
@ -159,9 +159,9 @@ void ExternalEditorPreferences::addEditor()
|
||||
|
||||
Gtk::TreeViewColumn *ExternalEditorPreferences::makeAppColumn()
|
||||
{
|
||||
auto name_renderer = Gtk::make_managed<Gtk::CellRendererText>();
|
||||
auto icon_renderer = Gtk::make_managed<Gtk::CellRendererPixbuf>();
|
||||
auto col = Gtk::make_managed<Gtk::TreeViewColumn>();
|
||||
auto name_renderer = Gtk::manage(new Gtk::CellRendererText());
|
||||
auto icon_renderer = Gtk::manage(new Gtk::CellRendererPixbuf());
|
||||
auto col = Gtk::manage(new Gtk::TreeViewColumn());
|
||||
|
||||
col->set_title(M("PREFERENCES_EXTERNALEDITOR_COLUMN_NAME"));
|
||||
col->set_resizable();
|
||||
@ -180,8 +180,8 @@ Gtk::TreeViewColumn *ExternalEditorPreferences::makeAppColumn()
|
||||
|
||||
Gtk::TreeViewColumn *ExternalEditorPreferences::makeCommandColumn()
|
||||
{
|
||||
auto command_renderer = Gtk::make_managed<Gtk::CellRendererText>();
|
||||
auto col = Gtk::make_managed<Gtk::TreeViewColumn>();
|
||||
auto command_renderer = Gtk::manage(new Gtk::CellRendererText());
|
||||
auto col = Gtk::manage(new Gtk::TreeViewColumn());
|
||||
|
||||
col->set_title(M("PREFERENCES_EXTERNALEDITOR_COLUMN_COMMAND"));
|
||||
col->pack_start(*command_renderer);
|
||||
|
@ -50,14 +50,14 @@ PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label)
|
||||
buttonGroup->get_style_context()->add_class("image-combo");
|
||||
|
||||
// Create the image for the button
|
||||
buttonImage = Gtk::make_managed<RTImage>();
|
||||
buttonImage = Gtk::manage(new RTImage());
|
||||
setExpandAlignProperties(buttonImage, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
imageContainer->attach_next_to(*buttonImage, Gtk::POS_RIGHT, 1, 1);
|
||||
buttonImage->set_no_show_all();
|
||||
|
||||
// Create the button for showing the pop-up.
|
||||
arrowButton = Gtk::make_managed<Gtk::Button>();
|
||||
Gtk::Image *arrowImage = Gtk::make_managed<Gtk::Image>();
|
||||
arrowButton = Gtk::manage(new Gtk::Button());
|
||||
Gtk::Image *arrowImage = Gtk::manage(new Gtk::Image());
|
||||
arrowImage->set_from_icon_name("pan-down-symbolic", Gtk::ICON_SIZE_BUTTON);
|
||||
setExpandAlignProperties(arrowButton, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
|
||||
arrowButton->add(*arrowImage); //menuSymbol);
|
||||
@ -82,7 +82,7 @@ bool PopUpCommon::insertEntry(int position, const Glib::ustring& fileName, const
|
||||
{
|
||||
RTImage* image = nullptr;
|
||||
if (!fileName.empty()) {
|
||||
image = Gtk::make_managed<RTImage>(fileName);
|
||||
image = Gtk::manage(new RTImage(fileName));
|
||||
}
|
||||
bool success = insertEntryImpl(position, fileName, Glib::RefPtr<const Gio::Icon>(), image, label);
|
||||
if (!success && image) {
|
||||
@ -93,7 +93,7 @@ bool PopUpCommon::insertEntry(int position, const Glib::ustring& fileName, const
|
||||
|
||||
bool PopUpCommon::insertEntry(int position, const Glib::RefPtr<const Gio::Icon>& gIcon, const Glib::ustring& label)
|
||||
{
|
||||
RTImage* image = Gtk::make_managed<RTImage>(gIcon, Gtk::ICON_SIZE_BUTTON);
|
||||
RTImage* image = Gtk::manage(new RTImage(gIcon, Gtk::ICON_SIZE_BUTTON));
|
||||
bool success = insertEntryImpl(position, "", gIcon, image, label);
|
||||
if (!success) {
|
||||
delete image;
|
||||
@ -107,7 +107,7 @@ bool PopUpCommon::insertEntryImpl(int position, const Glib::ustring& fileName, c
|
||||
return false;
|
||||
|
||||
// Create the menu item and image
|
||||
MyImageMenuItem *newItem = Gtk::make_managed<MyImageMenuItem>(label, image);
|
||||
MyImageMenuItem *newItem = Gtk::manage(new MyImageMenuItem(label, image));
|
||||
imageIcons.insert(imageIcons.begin() + position, gIcon);
|
||||
imageFilenames.insert(imageFilenames.begin() + position, fileName);
|
||||
images.insert(images.begin() + position, newItem->getImage());
|
||||
|
@ -1249,7 +1249,7 @@ Gtk::Widget* Preferences::getGeneralPanel()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
externalEditors = Gtk::make_managed<ExternalEditorPreferences>();
|
||||
externalEditors = Gtk::manage(new ExternalEditorPreferences());
|
||||
externalEditors->set_size_request(-1, 200);
|
||||
#ifdef EXT_EDITORS_RADIOS
|
||||
externaleditorGrid->attach_next_to(*externalEditors, *edOther, Gtk::POS_BOTTOM, 2, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user