mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 04:18:39 +00:00
Support change to enum definitions in gtkmm/glibmm/pangomm (#3801)
Newer versions (gtkmm 4 and its dependencies) of these libraries have switched from enums to enum classes. Wrap the names with macros to support both.
This commit is contained in:
@@ -102,8 +102,8 @@ void gtr_confirm_remove(
|
||||
parent,
|
||||
gtr_sprintf("<big><b>%s</b></big>", primary_text),
|
||||
true /*use_markup*/,
|
||||
Gtk::MESSAGE_QUESTION,
|
||||
Gtk::BUTTONS_NONE,
|
||||
TR_GTK_MESSAGE_TYPE(WARNING),
|
||||
TR_GTK_BUTTONS_TYPE(NONE),
|
||||
true /*modal*/);
|
||||
|
||||
if (!secondary_text.empty())
|
||||
@@ -111,14 +111,14 @@ void gtr_confirm_remove(
|
||||
d->set_secondary_text(secondary_text, true);
|
||||
}
|
||||
|
||||
d->add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
|
||||
d->add_button(delete_files ? _("_Delete") : _("_Remove"), Gtk::RESPONSE_ACCEPT);
|
||||
d->set_default_response(Gtk::RESPONSE_CANCEL);
|
||||
d->add_button(_("_Cancel"), TR_GTK_RESPONSE_TYPE(CANCEL));
|
||||
d->add_button(delete_files ? _("_Delete") : _("_Remove"), TR_GTK_RESPONSE_TYPE(ACCEPT));
|
||||
d->set_default_response(TR_GTK_RESPONSE_TYPE(CANCEL));
|
||||
|
||||
d->signal_response().connect(
|
||||
[d, core, torrent_ids, delete_files](int response) mutable
|
||||
{
|
||||
if (response == Gtk::RESPONSE_ACCEPT)
|
||||
if (response == TR_GTK_RESPONSE_TYPE(ACCEPT))
|
||||
{
|
||||
for (auto const id : torrent_ids)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user