translate_qt_buttons.patch
src/libaudqt/infowin.cc | ||
---|---|---|
24 | 24 |
#include <QImage> |
25 | 25 |
#include <QLabel> |
26 | 26 |
#include <QPixmap> |
27 |
#include <QPushButton> |
|
27 | 28 |
#include <QVBoxLayout> |
28 | 29 | |
29 | 30 |
#include <libaudcore/audstrings.h> |
... | ... | |
67 | 68 |
auto vbox = new QVBoxLayout (this); |
68 | 69 |
vbox->addLayout (hbox); |
69 | 70 | |
70 |
auto buttonbox = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); |
|
71 |
vbox->addWidget (buttonbox); |
|
71 |
auto bbox = new QDialogButtonBox (QDialogButtonBox::Save | QDialogButtonBox::Close, this); |
|
72 |
bbox->button (QDialogButtonBox::Save)->setText (translate_str (N_("_Save"))); |
|
73 |
bbox->button (QDialogButtonBox::Close)->setText (translate_str (N_("_Close"))); |
|
74 |
vbox->addWidget (bbox); |
|
72 | 75 | |
73 |
QObject::connect (buttonbox, &QDialogButtonBox::accepted, [this] () {
|
|
76 |
QObject::connect (bbox, & QDialogButtonBox::accepted, [this] () {
|
|
74 | 77 |
m_infowidget.updateFile (); |
75 | 78 |
deleteLater (); |
76 | 79 |
}); |
77 | 80 | |
78 |
QObject::connect (buttonbox, &QDialogButtonBox::rejected, this, &QObject::deleteLater);
|
|
81 |
QObject::connect (bbox, & QDialogButtonBox::rejected, this, & QObject::deleteLater);
|
|
79 | 82 |
} |
80 | 83 | |
81 | 84 |
void InfoWindow::fillInfo (int playlist, int entry, const char * filename, const Tuple & tuple, |
src/libaudqt/prefs-plugin.cc | ||
---|---|---|
19 | 19 | |
20 | 20 |
#include <QDialog> |
21 | 21 |
#include <QDialogButtonBox> |
22 |
#include <QPushButton> |
|
22 | 23 |
#include <QVBoxLayout> |
23 | 24 | |
24 | 25 |
#include <libaudcore/audstrings.h> |
... | ... | |
50 | 51 |
text = dgettext (header->info.domain, text); |
51 | 52 |
} |
52 | 53 | |
53 |
AUDDBG("name = %s\n", name); |
|
54 |
AUDDBG ("name = %s\n", name);
|
|
54 | 55 | |
55 |
simple_message(str_printf (_("About %s"), name), text); |
|
56 |
simple_message (str_printf (_("About %s"), name), text);
|
|
56 | 57 |
} |
57 | 58 | |
58 | 59 |
struct ConfigWindow { |
... | ... | |
116 | 117 |
if (p->apply) |
117 | 118 |
{ |
118 | 119 |
bbox->setStandardButtons (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); |
120 |
bbox->button (QDialogButtonBox::Ok)->setText (translate_str (N_("_Set"))); |
|
121 |
bbox->button (QDialogButtonBox::Cancel)->setText (translate_str (N_("_Cancel"))); |
|
119 | 122 | |
120 | 123 |
QObject::connect (bbox, &QDialogButtonBox::accepted, [=] () { |
121 | 124 |
if (p->apply) |
... | ... | |
129 | 132 |
else |
130 | 133 |
{ |
131 | 134 |
bbox->setStandardButtons (QDialogButtonBox::Close); |
135 |
bbox->button (QDialogButtonBox::Close)->setText (translate_str (N_("_Close"))); |
|
132 | 136 | |
133 | 137 |
QObject::connect (bbox, &QDialogButtonBox::rejected, cw->root, &QWidget::hide); |
134 | 138 |
} |
src/libaudqt/prefs-window.cc | ||
---|---|---|
676 | 676 |
create_plugin_category (s_category_notebook); |
677 | 677 | |
678 | 678 |
QDialogButtonBox * bbox = new QDialogButtonBox (QDialogButtonBox::Close); |
679 |
bbox->button (QDialogButtonBox::Close)->setText (translate_str (N_("_Close"))); |
|
679 | 680 |
child_vbox->addWidget (bbox); |
680 | 681 | |
681 | 682 |
QObject::connect (bbox, &QDialogButtonBox::rejected, s_prefswin, &QObject::deleteLater); |
src/libaudqt/util.cc | ||
---|---|---|
20 | 20 |
#include <QDialog> |
21 | 21 |
#include <QDialogButtonBox> |
22 | 22 |
#include <QLabel> |
23 |
#include <QPushButton> |
|
23 | 24 |
#include <QVBoxLayout> |
24 | 25 | |
25 | 26 |
#include <libaudcore/audstrings.h> |
... | ... | |
66 | 67 |
label.setTextInteractionFlags (Qt::TextSelectableByMouse); |
67 | 68 | |
68 | 69 |
bbox.setStandardButtons (QDialogButtonBox::Close); |
70 |
bbox.button (QDialogButtonBox::Close)->setText (translate_str (N_("_Close"))); |
|
69 | 71 | |
70 | 72 |
QObject::connect (& bbox, & QDialogButtonBox::rejected, & msgbox, & QDialog::reject); |
71 | 73 |