Browse Source

Various updates

pull/3/head
Duke Leto 3 years ago
parent
commit
bd40b9d8b1
  1. 2
      cli/Cargo.toml
  2. 6
      cli/src/main.rs
  3. 10
      lib/Cargo.toml
  4. 2
      ui/qtlib/Cargo.toml
  5. 2
      ui/qtlib/src/lib.rs
  6. 10
      ui/src/about.ui
  7. 9
      ui/src/main.cpp
  8. 14
      ui/src/mainwindow.cpp

2
cli/Cargo.toml

@ -9,6 +9,6 @@ edition = "2018"
[dependencies] [dependencies]
clap = "2.33.0" clap = "2.33.0"
hushpaperlib = { path = "../lib" } silentdragonpaper = { path = "../lib" }
json = "0.11.14" json = "0.11.14"
printpdf = "0.3.2" printpdf = "0.3.2"

6
cli/src/main.rs

@ -1,11 +1,11 @@
extern crate clap; extern crate clap;
extern crate hushpaperlib; extern crate silentdragonpaperlib;
mod version; mod version;
use clap::{Arg, App}; use clap::{Arg, App};
use hushpaperlib::paper::*; use silentdragonpaperlib::paper::*;
use hushpaperlib::pdf; use silentdragonpaperlib::pdf;
use std::io; use std::io;
use std::io::prelude::*; use std::io::prelude::*;

10
lib/Cargo.toml

@ -1,9 +1,9 @@
[package] [package]
name = "hushpaperlib" name = "silentdragonpaper"
version = "0.1.2" version = "0.2.0"
authors = [ authors = [
"ZecWallet", "The Hush developers",
"The Hush developers" "ZecWallet"
] ]
edition = "2018" edition = "2018"
@ -14,7 +14,7 @@ default = ["printpdf"]
rand = "0.5" rand = "0.5"
hex = "0.3" hex = "0.3"
bech32 = "0.6" bech32 = "0.6"
zcash_primitives = { git = "https://github.com/gilardh/librustzcash", rev = "5a48d179b8434a0318e7e19dda506e245a904092" } zcash_primitives = { git = "https://git.hush.is/hush/librustzcash", rev = "5a48d179b8434a0318e7e19dda506e245a904092" }
json = "0.11.14" json = "0.11.14"
qrcode = { version = "0.8", default-features = false } qrcode = { version = "0.8", default-features = false }
printpdf = { version = "0.3.2", optional = true } printpdf = { version = "0.3.2", optional = true }

2
ui/qtlib/Cargo.toml

@ -10,4 +10,4 @@ crate-type = ["staticlib"]
[dependencies] [dependencies]
libc = "0.2.58" libc = "0.2.58"
hushpaperlib = { path = "../../lib" } silentdragonpaperlib = { path = "../../lib" }

2
ui/qtlib/src/lib.rs

@ -1,6 +1,6 @@
use libc::{c_char}; use libc::{c_char};
use std::ffi::{CStr, CString}; use std::ffi::{CStr, CString};
use hushpaperlib::{pdf, paper}; use silentdragonpaperlib::{pdf, paper};
/** /**
* Call into rust to generate a paper wallet. Returns the paper wallet in JSON form. * Call into rust to generate a paper wallet. Returns the paper wallet in JSON form.

10
ui/src/about.ui

File diff suppressed because one or more lines are too long

9
ui/src/main.cpp

@ -1,3 +1,6 @@
// Copyright (c) 2016-2020 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
#include "mainwindow.h" #include "mainwindow.h"
#include "version.h" #include "version.h"
#include <QApplication> #include <QApplication>
@ -7,8 +10,8 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setOrganizationDomain("hushwallet.co"); QCoreApplication::setOrganizationDomain("hush.is");
QCoreApplication::setOrganizationName("hushpaperwallet"); QCoreApplication::setOrganizationName("Hush");
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
QFontDatabase::addApplicationFont(":/fonts/res/Ubuntu-R.ttf"); QFontDatabase::addApplicationFont(":/fonts/res/Ubuntu-R.ttf");
@ -18,7 +21,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv); QApplication a(argc, argv);
MainWindow w; MainWindow w;
w.setWindowTitle(QString("hushpaperwallet ") + APP_VERSION); w.setWindowTitle(QString("Extreme Privacy: SilentDragonPaper ") + APP_VERSION);
w.show(); w.show();

14
ui/src/mainwindow.cpp

@ -1,13 +1,13 @@
// Copyright (c) 2016-2020 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
#include <cstring> #include <cstring>
#include "precompiled.h" #include "precompiled.h"
#include "mainwindow.h" #include "mainwindow.h"
#include "version.h" #include "version.h"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "ui_wallet.h" #include "ui_wallet.h"
#include "ui_about.h" #include "ui_about.h"
#include "hushpaperrust.h" #include "hushpaperrust.h"
void SaveRestore(QDialog* d) { void SaveRestore(QDialog* d) {
@ -33,9 +33,7 @@ QString SplitIntoLines(QString s, int maxlen) {
return ans.join("\n"); return ans.join("\n");
} }
/** // Add a wallet (address + pk) section to the given vertical layout
* Add a wallet (address + pk) section to the given vertical layout
*/
void AddWallet(QString address, QString pk, QWidget* scroll) { void AddWallet(QString address, QString pk, QWidget* scroll) {
Ui_WalletWidget w; Ui_WalletWidget w;
auto g1 = new QGroupBox(scroll); auto g1 = new QGroupBox(scroll);
@ -172,7 +170,7 @@ MainWindow::MainWindow(QWidget *parent) :
// Help site // Help site
QObject::connect(ui->actionHelp_site, &QAction::triggered, [=]() { QObject::connect(ui->actionHelp_site, &QAction::triggered, [=]() {
QDesktopServices::openUrl(QUrl("https://docs.hushwallet.co/paper")); QDesktopServices::openUrl(QUrl("https://faq.hush.is/sdp"));
}); });
// About button // About button
@ -180,7 +178,7 @@ MainWindow::MainWindow(QWidget *parent) :
QDialog ad(this); QDialog ad(this);
Ui_AboutDialog d; Ui_AboutDialog d;
d.setupUi(&ad); d.setupUi(&ad);
d.lblVersion->setText(QString("hushpaperwallet ") + APP_VERSION + "(" + APP_BUILD_DATE + ")"); d.lblVersion->setText(QString("SilentDragonPaper ") + APP_VERSION + "(" + APP_BUILD_DATE + ")");
SaveRestore(&ad); SaveRestore(&ad);
ad.exec(); ad.exec();

Loading…
Cancel
Save