[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r2254: Override the QDialogButtonBox button text so we can use our (in trunk: . src/vidalia/config)



Author: edmanm
Date: 2007-12-25 21:26:59 -0500 (Tue, 25 Dec 2007)
New Revision: 2254

Modified:
   trunk/
   trunk/src/vidalia/config/configdialog.cpp
Log:
 r2363@lysithea:  edmanm | 2007-12-25 21:26:49 -0500
 Override the QDialogButtonBox button text so we can use our own translations.



Property changes on: trunk
___________________________________________________________________
 svk:merge ticket from /local/vidalia/trunk [r2363] on 0108964c-5b0b-4c9e-969f-e2288315d100

Modified: trunk/src/vidalia/config/configdialog.cpp
===================================================================
--- trunk/src/vidalia/config/configdialog.cpp	2007-12-25 21:58:08 UTC (rev 2253)
+++ trunk/src/vidalia/config/configdialog.cpp	2007-12-26 02:26:59 UTC (rev 2254)
@@ -51,6 +51,15 @@
   /* Invoke the Qt Designer generated QObject setup routine */
   ui.setupUi(this);
  
+  /* Override the QDialogButtonBox button text so we can use our own
+   * translations. */
+  QPushButton *button = ui.buttonBox->button(QDialogButtonBox::Ok);
+  if (button)
+    button->setText(tr("OK"));
+  button = ui.buttonBox->button(QDialogButtonBox::Cancel);
+  if (button)
+    button->setText(tr("Cancel"));
+  
   /* Connect the button box signals to the appropriate slots */
   connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(saveChanges()));
   connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));