Skip to content

Commit

Permalink
+icon, fixed DisambigPair
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercury13 committed Mar 29, 2022
1 parent c40c421 commit 2b49bad
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion UTranslator/FmDisambigPair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
#include "ui_FmDisambigPair.h"

#include "u_Qstrings.h"
#include "QtConsts.h"

FmDisambigPair::FmDisambigPair(QWidget *parent) :
QDialog(parent),
QDialog(parent, QDlgType::FIXED),
ui(new Ui::FmDisambigPair)
{
ui->setupUi(this);
Expand Down
17 changes: 16 additions & 1 deletion UTranslator/FmMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ void FmMain::reenable()
bool hasProject {project };
bool isOriginal = (isMainVisible && hasProject
&& project->info.type == tr::PrjType::ORIGINAL);
//bool isTranslation = (hasProject && !isOriginal);

// Menu: File
// New, Open are always available
ui->acSave->setEnabled(hasProject);
ui->acSaveAs->setEnabled(hasProject);

Expand Down Expand Up @@ -633,3 +633,18 @@ void FmMain::updateCaption()
s += "UTranslator";
setWindowTitle(s);
}


void FmMain::doSaveAs()
{
/// @todo [urgent] doSaveAs
}


void FmMain::doSave()
{
if (!project)
return;
if (project->fname.empty())
doSaveAs();
}
2 changes: 2 additions & 0 deletions UTranslator/FmMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ private slots:

// Menu: File
void doNew();
void doSave();
void doSaveAs();
// Menu: Edit
void acceptCurrObject();
void revertCurrObject();
Expand Down
Binary file added UTranslator/UTranslator-win.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions UTranslator/UTranslator.pro
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ FORMS += \

win32 { # and W64 too
LIBS += -lcomdlg32

RC_ICONS = UTranslator-win.ico
QMAKE_TARGET_COMPANY = Mikhail Merkuryev
QMAKE_TARGET_PRODUCT = UTranslator
QMAKE_TARGET_DESCRIPTION = UTranslator: translation tool for Unicodia
QMAKE_TARGET_COPYRIGHT = Mikhail Merkuryev
}

0 comments on commit 2b49bad

Please sign in to comment.