Fuel

Diff
Login

Differences From Artifact [3c2ecc7455]:

To Artifact [dd63f28e8e]:


517
518
519
520
521
522
523
524


















525
526
527
528
529
530
531

	if(!fossil().cloneRepository(repository, url, url_proxy))
	{
		QMessageBox::critical(this, tr("Error"), tr("Could not clone the repository"), QMessageBox::Ok);
		return;
	}

	openWorkspace(repository);


















}

//------------------------------------------------------------------------------
void MainWindow::rebuildRecent()
{
	for(int i = 0; i < MAX_RECENT; ++i)
		recentWorkspaceActs[i]->setVisible(false);







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549

	if(!fossil().cloneRepository(repository, url, url_proxy))
	{
		QMessageBox::critical(this, tr("Error"), tr("Could not clone the repository"), QMessageBox::Ok);
		return;
	}

	if(!openWorkspace(repository))
		return;

	// Store credentials
	if(!url.isLocalFile())
	{
		KeychainDelete(this, url);

		if(!KeychainSet(this, url))
			QMessageBox::critical(this, tr("Error"), tr("Could not store information to keychain."), QMessageBox::Ok );
	}

	// Create Remote
	url.setPassword("");

	QString name = UrlToStringNoCredentials(url);
	getWorkspace().addRemote(url, name);
	getWorkspace().setRemoteDefault(url);
	updateWorkspaceView();
}

//------------------------------------------------------------------------------
void MainWindow::rebuildRecent()
{
	for(int i = 0; i < MAX_RECENT; ++i)
		recentWorkspaceActs[i]->setVisible(false);
555
556
557
558
559
560
561

562
563
564
565
566
567
568
}


//------------------------------------------------------------------------------
void MainWindow::enableActions(bool on)
{
	QAction *actions[] = {

		ui->actionCommit,
		ui->actionDiff,
		ui->actionAdd,
		ui->actionDelete,
		ui->actionPush,
		ui->actionPull,
		ui->actionRename,







>







573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
}


//------------------------------------------------------------------------------
void MainWindow::enableActions(bool on)
{
	QAction *actions[] = {
		ui->actionCloseRepository,
		ui->actionCommit,
		ui->actionDiff,
		ui->actionAdd,
		ui->actionDelete,
		ui->actionPush,
		ui->actionPull,
		ui->actionRename,
581
582
583
584
585
586
587

588
589
590
591
592
593
594
		ui->actionDiffStash,
		ui->actionApplyStash,
		ui->actionDeleteStash,
		ui->actionCreateTag,
		ui->actionDeleteTag,
		ui->actionCreateBranch,
		ui->actionMergeBranch,

	};

	for(size_t i=0; i<COUNTOF(actions); ++i)
		actions[i]->setEnabled(on);

}
//------------------------------------------------------------------------------







>







600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
		ui->actionDiffStash,
		ui->actionApplyStash,
		ui->actionDeleteStash,
		ui->actionCreateTag,
		ui->actionDeleteTag,
		ui->actionCreateBranch,
		ui->actionMergeBranch,
		ui->actionFossilSettings
	};

	for(size_t i=0; i<COUNTOF(actions); ++i)
		actions[i]->setEnabled(on);

}
//------------------------------------------------------------------------------
619
620
621
622
623
624
625
626

627
628
629
630
631
632
633
634
	}

	loadFossilSettings();
	scanWorkspace();
	setStatus("");
	enableActions(true);

	if(!fossil().getProjectName().isEmpty())

		title += " - " + fossil().getProjectName();

	setWindowTitle(title);
	return true;
}










|
>
|







639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
	}

	loadFossilSettings();
	scanWorkspace();
	setStatus("");
	enableActions(true);

	const QString &project_name = fossil().getProjectName();
	if(!project_name.isEmpty())
		title += " - " + project_name;

	setWindowTitle(title);
	return true;
}