Commit 4bba46d1 authored by Edric Milaret's avatar Edric Milaret Committed by Guillaume Roguez
Browse files

windows: add start on startup feature

Also fix wrong copyright header

Refs #72072

Change-Id: I2920f7f9d7dd8dfdd91f52a46ee33a106781fdbd
parent 3a23e495
......@@ -32,7 +32,8 @@ SOURCES += main.cpp\
aboutdialog.cpp \
pivotviewwidget.cpp \
pivotcontrol.cpp \
videowidget.cpp
videowidget.cpp \
utils.cpp
HEADERS += mainwindow.h \
callwidget.h \
......@@ -46,7 +47,8 @@ HEADERS += mainwindow.h \
aboutdialog.h \
pivotviewwidget.h \
pivotcontrol.h \
videowidget.h
videowidget.h \
utils.h
FORMS += mainwindow.ui \
callwidget.ui \
......@@ -57,6 +59,8 @@ FORMS += mainwindow.ui \
aboutdialog.ui \
pivotviewwidget.ui
win32: LIBS += -lole32 -luuid -lshlwapi
INCLUDEPATH += /home/edric/Documents/CrossWorkspace/ring/binArch/include/libringclient
win32: LIBS += -L/home/edric/Documents/CrossWorkspace/ring/binArch/lib/ -lringclient
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -27,6 +27,7 @@
#include "fallbackpersoncollection.h"
#include "accountmodel.h"
#include "utils.h"
CallWidget::CallWidget(QWidget *parent) :
NavWidget(Main ,parent),
......@@ -91,6 +92,7 @@ CallWidget::findRingAccount() {
if (!found) {
AccountModel::instance()->add("RING", Account::Protocol::RING);
AccountModel::instance()->save();
Utils::CreateStartupLink();
findRingAccount();
}
}
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -23,12 +23,13 @@
#include "video/channel.h"
#include "video/resolution.h"
#include "video/rate.h"
#include "video/previewmanager.h"
#include "accountmodel.h"
#include "protocolmodel.h"
#include "accountdetails.h"
#include <video/previewmanager.h>
#include "utils.h"
ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
NavWidget(Nav, parent),
......@@ -54,6 +55,7 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) :
ui->accountDetailLayout->addWidget(accountDetails_);
ui->testVideoButton->setCheckable(true);
ui->accountTypeBox->setModel(accountModel_->protocolModel());
ui->startupBox->setChecked(Utils::CheckStartupLink());
}
void ConfigurationWidget::atExit() {
......@@ -155,3 +157,11 @@ ConfigurationWidget::on_addAccountButton_clicked()
ui->accountTypeBox->currentIndex(), 0));
accountModel_->save();
}
void ConfigurationWidget::on_startupBox_toggled(bool checked)
{
if (checked)
Utils::CreateStartupLink();
else
Utils::DeleteStartupLink();
}
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -54,6 +54,8 @@ private slots:
private slots:
void accountSelected(QItemSelection itemSel);
void on_startupBox_toggled(bool checked);
private:
Ui::ConfigurationWidget *ui;
AccountModel* accountModel_;
......
......@@ -19,7 +19,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
......@@ -29,7 +29,7 @@
<attribute name="title">
<string>Video</string>
</attribute>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1" columnstretch="0,0">
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0" columnstretch="0,0">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
......@@ -223,6 +223,16 @@
</widget>
</widget>
</item>
<item>
<widget class="QCheckBox" name="startupBox">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Launch Ring on Startup</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......@@ -75,7 +75,8 @@ MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason) {
this->show();
}
void MainWindow::onIncomingCall(Call *call) {
void
MainWindow::onIncomingCall(Call *call) {
Q_UNUSED(call);
QWidget::showNormal();
}
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
/***************************************************************************
* Copyright (C) 2011-2015 by Savoir-Faire Linux *
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* *
* This program is free software; you can redistribute it and/or modify *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment