Browse Source

Fix Remove Dialog

Remove failed test and add other Messagebox to correct Text with Language support

Add Title again -,-
Jkoan 11 years ago
parent
commit
cc5884c136
1 changed files with 9 additions and 5 deletions
  1. 9 5
      obs/window-basic-main.cpp

+ 9 - 5
obs/window-basic-main.cpp

@@ -841,11 +841,15 @@ bool OBSBasic::QueryRemoveSource(obs_source_t source)
 	QString text = QTStr("ConfirmRemove.Text");
 	text.replace("$1", QT_UTF8(name));
 
-	QMessageBox::StandardButton button;
-	button = QMessageBox::question(this,
-			QTStr("ConfirmRemove.Remove"), text);
-
-	return button == QMessageBox::Yes;
+	QMessageBox remove_source;
+	remove_source.setInformativeText(text);
+	QAbstractButton *Yes = remove_source.addButton(QTStr("Yes"), QMessageBox::YesRole);
+	remove_source.addButton(QTStr("No"), QMessageBox::NoRole);
+	remove_source.setIcon(QMessageBox::Question);
+	remove_source.setWindowTitle(QTStr("ConfirmRemove.Title"));
+	remove_source.exec();
+
+	return Yes == remove_source.clickedButton();
 }
 
 #define UPDATE_CHECK_INTERVAL (60*60*24*4) /* 4 days */