diff --git a/src/RingWindowController.mm b/src/RingWindowController.mm index 5d4610e70dc373967ab2bac3acf7755c3fc35947..8b4036dc65f309d827cfaae0e670552b7b6cd212 100644 --- a/src/RingWindowController.mm +++ b/src/RingWindowController.mm @@ -57,13 +57,15 @@ static NSString* const kPreferencesIdentifier = @"PreferencesIdentifier"; [currentVC initFrame]; + // Fresh run, we need to make sure RingID appears + [self updateRingID]; + // Update Ring ID label based on account model changes QObject::connect(AccountModel::instance(), &AccountModel::dataChanged, [=] { [self updateRingID]; }); - } /** diff --git a/src/RingWizardWC.h b/src/RingWizardWC.h index 5271fd84236e38a1bccf18abb0e3446851b49fcf..0947a4c497db0ccc7e0f7585b8ef9815adc214a6 100644 --- a/src/RingWizardWC.h +++ b/src/RingWizardWC.h @@ -15,17 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Additional permission under GNU GPL version 3 section 7: - * - * If you modify this program, or any covered work, by linking or - * combining it with the OpenSSL project's OpenSSL library (or a - * modified version of that library), containing parts covered by the - * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. - * grants you additional permission to convey the resulting work. - * Corresponding Source for a non-source form of such a combination - * shall include the source code for the parts of OpenSSL used as well - * as that of the covered work. */ #import diff --git a/src/RingWizardWC.mm b/src/RingWizardWC.mm index 9f262fbf576c275e519398bedea326644a5241ed..21fb68c096255e10eb0afc35a4a25246899b6f66 100644 --- a/src/RingWizardWC.mm +++ b/src/RingWizardWC.mm @@ -15,17 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Additional permission under GNU GPL version 3 section 7: - * - * If you modify this program, or any covered work, by linking or - * combining it with the OpenSSL project's OpenSSL library (or a - * modified version of that library), containing parts covered by the - * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. - * grants you additional permission to convey the resulting work. - * Corresponding Source for a non-source form of such a combination - * shall include the source code for the parts of OpenSSL used as well - * as that of the covered work. */ #import "RingWizardWC.h" @@ -41,11 +30,7 @@ #import "AppDelegate.h" -#define PVK_PASSWORD_TAG 0 -#define NICKNAME_TAG 1 - -@interface RingWizardWC () { - +@implementation RingWizardWC { __unsafe_unretained IBOutlet NSButton *goToAppButton; __unsafe_unretained IBOutlet NSTextField *nickname; __unsafe_unretained IBOutlet NSProgressIndicator *progressBar; @@ -60,13 +45,11 @@ __unsafe_unretained IBOutlet NSPathControl *caListPathControl; __unsafe_unretained IBOutlet NSPathControl *pvkPathControl; BOOL isExpanded; + Account* accountToCreate; } -@property Account* accountToCreate; -@end - -@implementation RingWizardWC -@synthesize accountToCreate; +NSInteger const PVK_PASSWORD_TAG = 0; +NSInteger const NICKNAME_TAG = 1; - (void)windowDidLoad { [super windowDidLoad]; @@ -85,7 +68,6 @@ @"Display message to user")]; auto accList = AccountModel::instance()->getAccountsByProtocol(Account::Protocol::RING); [self displayHash:accList[0]->username().toNSString()]; - [showCustomCertsButton setHidden:YES]; } [caListPathControl setDelegate:self]; @@ -112,6 +94,8 @@ [nickname setEditable:NO]; [nickname setHidden:NO]; + [showCustomCertsButton setHidden:YES]; + [goToAppButton setHidden:NO]; NSSharingService* emailSharingService = [NSSharingService sharingServiceNamed:NSSharingServiceNameComposeEmail]; @@ -119,6 +103,8 @@ [createButton setTitle:NSLocalizedString(@"Share by mail", @"Share button")]; [createButton setAlternateImage:emailSharingService.alternateImage]; + [createButton setEnabled:YES]; + [createButton setAction:@selector(shareByEmail)]; } @@ -136,10 +122,10 @@ if (isExpanded) { // retract panel [self chooseOwnCertificates:nil]; - [showCustomCertsButton setHidden:YES]; } - [self performSelector:@selector(saveAccount) withObject:nil afterDelay:1]; + [showCustomCertsButton setHidden:YES]; + [self performSelector:@selector(saveAccount) withObject:nil afterDelay:1]; [self registerAutoStartup]; }