Skip to content

Commit

Permalink
Донат
Browse files Browse the repository at this point in the history
  • Loading branch information
YanSergey committed Apr 29, 2024
1 parent d66fedb commit 075be0f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class Helper {
public static final UUID EMPTY_UUID =
UUID.fromString("00000000-0000-0000-0000-000000000000"); //$NON-NLS-1$

public static final String BOOSTY_LINK = "https://boosty.to/YanSergeyCoder";

private Helper() {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wb.swt.SWTResourceManager;
import ru.yanygin.clusterAdminLibrary.Config;
import ru.yanygin.clusterAdminLibrary.Helper;

/** Диалог "О программе". */
public class AboutDialog extends Dialog {
Expand All @@ -26,7 +27,6 @@ public class AboutDialog extends Dialog {
"https://github.com/YanSergey/OneS_ClusterAdmin"; //$NON-NLS-1$
private static final String TELEGRAM_LINK = "https://t.me/YanSergey"; //$NON-NLS-1$
private static final String EMAIL_LINK = "mailto:yanyginsa@gmail.com"; //$NON-NLS-1$
private static final String BOOSTY_LINK = "https://boosty.to/YanSergeyCoder"; // $NON-NLS-1$

Config config = Config.currentConfig;

Expand Down Expand Up @@ -172,7 +172,7 @@ private static class Strings {
static final String EMAIL_DESCRIPTION =
String.format(getString("Email_Description"), EMAIL_LINK);
static final String BOOSTY_DESCRIPTION =
String.format(getString("Boosty_Description"), BOOSTY_LINK);
String.format(getString("Boosty_Description"), Helper.BOOSTY_LINK);

static String getString(String key) {
return Messages.getString("AboutDialog." + key); //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
Expand Down Expand Up @@ -121,6 +122,7 @@ public class ViewerArea extends Composite {
Image sortIcon;
Image moveUpIcon;
Image moveDownIcon;
Image roubleIcon;

Tree serversTree;
TreeItem currentTreeItem;
Expand Down Expand Up @@ -349,6 +351,8 @@ private void initIcon() {
moveUpIcon = Helper.getImage("move_up.png"); //$NON-NLS-1$
moveDownIcon = Helper.getImage("move_down.png"); //$NON-NLS-1$

roubleIcon = Helper.getImage("Rouble.png"); // $NON-NLS-1$

LOGGER.debug("Icon init succesfully"); //$NON-NLS-1$
}

Expand Down Expand Up @@ -396,6 +400,15 @@ private void initMainMenu(Menu mainMenu) {
Menu serviceGroup = addItemGroupInMenu(mainMenu, Strings.MENU_SERVICE, null);
addItemInMenu(serviceGroup, Strings.MENU_OPEN_SETTINGS, null, openSettingsListener);
addItemInMenu(serviceGroup, Strings.MENU_ABOUT, null, showAboutDialogListener);

SelectionAdapter goToLinkListener =
new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Program.launch(Helper.BOOSTY_LINK);
}
};
addItemInMenu(serviceGroup, Strings.MENU_DONATE, roubleIcon, goToLinkListener);
}

private void initServersTree(SashForm sashForm) {
Expand Down Expand Up @@ -3276,6 +3289,7 @@ private static class Strings {
static final String MENU_SERVICE = getString("MainMenu.Service");
static final String MENU_OPEN_SETTINGS = getString("MainMenu.OpenSettings");
static final String MENU_ABOUT = getString("MainMenu.About");
static final String MENU_DONATE = getString("MainMenu.Donate");
static final String COLUMN_SERVER = getString("ColumnServer");
static final String TREE_INFOBASES_COUNT = getString("InfobasesCount");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#Sun Apr 17 15:13:55 MSK 2022

AboutDialog.Autor = Autor:\r\nYanygin Sergey (Tula)
AboutDialog.Boosty_Description = Support the project on Boosty:\r\n<a>%s</a>
AboutDialog.Boosty_Description = Donate to the project on Boosty:\r\n<a>%s</a>
AboutDialog.CurrentVersion = version %s
AboutDialog.CurrentVersionIsLatest = (the latest version is installed)
AboutDialog.CurrentVersionIsOld = (latest version is %s, <a>download</a>)
Expand Down Expand Up @@ -193,6 +193,7 @@ ViewerArea.InfobasesCount = Infobases (%s)
ViewerArea.MainMenu.About = About
ViewerArea.MainMenu.ConnectAllServers = Connect to all servers
ViewerArea.MainMenu.DisonnectAllServers = Disconnect from all servers
ViewerArea.MainMenu.Donate = Donate to the project
ViewerArea.MainMenu.FindServers = Find Servers
ViewerArea.MainMenu.OpenSettings = Settings
ViewerArea.MainMenu.Servers = Servers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ ViewerArea.InfobasesCount = \u0418\u043D\u0444\u04
ViewerArea.MainMenu.About = \u041E \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0435
ViewerArea.MainMenu.ConnectAllServers = \u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F \u043A\u043E \u0432\u0441\u0435\u043C \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043C
ViewerArea.MainMenu.DisonnectAllServers = \u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F \u043E\u0442 \u0432\u0441\u0435\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u0432
ViewerArea.MainMenu.Donate = \u041F\u043E\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442
ViewerArea.MainMenu.FindServers = \u041D\u0430\u0439\u0442\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430
ViewerArea.MainMenu.OpenSettings = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438
ViewerArea.MainMenu.Servers = \u0421\u0435\u0440\u0432\u0435\u0440\u0430
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 075be0f

Please sign in to comment.