[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:02:25 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=2d10598

The following commit has been merged in the master branch:
commit 2d10598957622faca526e93cae18288b8d8eda13
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Tue Aug 7 15:14:02 2012 +0200

    Use .ui file to create the buttons in SimpleProfileSelectWidget
    
    Also fix some resizing bugs
    
    BUG: 292690
    FIXED-IN: 0.5
---
 .../simple-profile-select-widget.cpp               |  76 ++-------
 .../simple-profile-select-widget.ui                | 183 ++++++++++++++++++++-
 2 files changed, 192 insertions(+), 67 deletions(-)

diff --git a/src/KCMTelepathyAccounts/simple-profile-select-widget.cpp b/src/KCMTelepathyAccounts/simple-profile-select-widget.cpp
index 174488e..5f9a516 100644
--- a/src/KCMTelepathyAccounts/simple-profile-select-widget.cpp
+++ b/src/KCMTelepathyAccounts/simple-profile-select-widget.cpp
@@ -65,72 +65,24 @@ SimpleProfileSelectWidget::SimpleProfileSelectWidget(ProfileListModel *profileLi
     d->ui = new Ui::SimpleProfileSelectWidget;
     d->ui->setupUi(this);
 
-    // Create the buttons for the Major Profiles
-    QCommandLinkButton *buttonJabber = new QCommandLinkButton(Dictionary::instance()->string(QLatin1String("jabber")), QString());
-    buttonJabber->setIcon(KIcon(QLatin1String("im-jabber")));
-    buttonJabber->setIconSize(QSize(32,32));
-    // NOTE: Setting a new created size policy breaks the vertical layout, so
-    //       instead we change the policies of the existing one
-    buttonJabber->sizePolicy().setHorizontalPolicy(QSizePolicy::Expanding);
-    buttonJabber->sizePolicy().setVerticalPolicy(QSizePolicy::Fixed);
-
-    QCommandLinkButton *buttonGTalk = new QCommandLinkButton(Dictionary::instance()->string(QLatin1String("google-talk")));
-    buttonGTalk->setIcon(KIcon(QLatin1String("im-google-talk")));
-    buttonGTalk->setIconSize(QSize(32,32));
-    buttonGTalk->sizePolicy().setHorizontalPolicy(QSizePolicy::Expanding);
-    buttonGTalk->sizePolicy().setVerticalPolicy(QSizePolicy::Fixed);
-
-    QCommandLinkButton *buttonFacebook = new QCommandLinkButton(Dictionary::instance()->string(QLatin1String("facebook")));
-    buttonFacebook->setIcon(KIcon(QLatin1String("im-facebook")));
-    buttonFacebook->setIconSize(QSize(32,32));
-    buttonFacebook->sizePolicy().setHorizontalPolicy(QSizePolicy::Expanding);
-    buttonFacebook->sizePolicy().setVerticalPolicy(QSizePolicy::Fixed);
-
-    QCommandLinkButton *buttonIcq = new QCommandLinkButton(Dictionary::instance()->string(QLatin1String("icq")));
-    buttonIcq->setIcon(KIcon(QLatin1String("im-icq")));
-    buttonIcq->setIconSize(QSize(32,32));
-    buttonIcq->sizePolicy().setHorizontalPolicy(QSizePolicy::Expanding);
-    buttonIcq->sizePolicy().setVerticalPolicy(QSizePolicy::Fixed);
-
-    QCommandLinkButton *buttonMsn = new QCommandLinkButton(Dictionary::instance()->string(QLatin1String("msn")));
-    buttonMsn->setIcon(KIcon(QLatin1String("im-msn")));
-    buttonMsn->setIconSize(QSize(32,32));
-    buttonMsn->sizePolicy().setHorizontalPolicy(QSizePolicy::Expanding);
-    buttonMsn->sizePolicy().setVerticalPolicy(QSizePolicy::Fixed);
-
-    QCommandLinkButton *buttonOthers = new QCommandLinkButton(i18n("Others"), i18n("AOL, Gadu-Gadu, IRC, Yahoo and more..."));
-    buttonOthers->setIcon(KIcon(QLatin1String("go-next")));
-    buttonOthers->setIconSize(QSize(32,32));
-    buttonOthers->sizePolicy().setHorizontalPolicy(QSizePolicy::Expanding);
-    buttonOthers->sizePolicy().setVerticalPolicy(QSizePolicy::Fixed);
-
-    // Add them to the SignalMapper
-    d->signalMapper->setMapping(buttonJabber,   QLatin1String("jabber"));
-    d->signalMapper->setMapping(buttonGTalk,    QLatin1String("google-talk"));
-    d->signalMapper->setMapping(buttonFacebook, QLatin1String("facebook"));
-    d->signalMapper->setMapping(buttonIcq,      QLatin1String("haze-icq"));
-    d->signalMapper->setMapping(buttonMsn,      QLatin1String("msn"));
-
-    // Connect them to the SignalMapper
-    connect(buttonJabber,   SIGNAL(clicked()), d->signalMapper, SLOT(map()));
-    connect(buttonGTalk,    SIGNAL(clicked()), d->signalMapper, SLOT(map()));
-    connect(buttonFacebook, SIGNAL(clicked()), d->signalMapper, SLOT(map()));
-    connect(buttonIcq,      SIGNAL(clicked()), d->signalMapper, SLOT(map()));
-    connect(buttonMsn,      SIGNAL(clicked()), d->signalMapper, SLOT(map()));
-    connect(buttonOthers,   SIGNAL(clicked()), this,            SIGNAL(othersChosen()));
+    // Add buttons to the SignalMapper
+    d->signalMapper->setMapping(d->ui->buttonJabber,   QLatin1String("jabber"));
+    d->signalMapper->setMapping(d->ui->buttonGTalk,    QLatin1String("google-talk"));
+    d->signalMapper->setMapping(d->ui->buttonFacebook, QLatin1String("facebook"));
+    d->signalMapper->setMapping(d->ui->buttonIcq,      QLatin1String("haze-icq"));
+    d->signalMapper->setMapping(d->ui->buttonMsn,      QLatin1String("msn"));
+
+    // Connect buttons to the SignalMapper
+    connect(d->ui->buttonJabber,   SIGNAL(clicked()), d->signalMapper, SLOT(map()));
+    connect(d->ui->buttonGTalk,    SIGNAL(clicked()), d->signalMapper, SLOT(map()));
+    connect(d->ui->buttonFacebook, SIGNAL(clicked()), d->signalMapper, SLOT(map()));
+    connect(d->ui->buttonIcq,      SIGNAL(clicked()), d->signalMapper, SLOT(map()));
+    connect(d->ui->buttonMsn,      SIGNAL(clicked()), d->signalMapper, SLOT(map()));
+    connect(d->ui->buttonOthers,   SIGNAL(clicked()), this,            SIGNAL(othersChosen()));
 
     connect(d->signalMapper,SIGNAL(mapped(QString)),
             this,           SLOT(onProfileClicked(QString)));
 
-    // Add them to the Layout
-    d->ui->verticalLayout->addWidget(buttonJabber);
-    d->ui->verticalLayout->addWidget(buttonGTalk);
-    d->ui->verticalLayout->addWidget(buttonFacebook);
-    d->ui->verticalLayout->addWidget(buttonIcq);
-    d->ui->verticalLayout->addWidget(buttonMsn);
-    d->ui->verticalLayout->addWidget(buttonOthers);
-    d->ui->verticalLayout->addStretch();
-
     // Disable everything until Tp::ProfileManager is ready
     d->ui->verticalLayout->setEnabled(false);
 }
diff --git a/src/KCMTelepathyAccounts/simple-profile-select-widget.ui b/src/KCMTelepathyAccounts/simple-profile-select-widget.ui
index 5d36e39..aa4b98d 100644
--- a/src/KCMTelepathyAccounts/simple-profile-select-widget.ui
+++ b/src/KCMTelepathyAccounts/simple-profile-select-widget.ui
@@ -6,10 +6,16 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>98</width>
-    <height>28</height>
+    <width>339</width>
+    <height>396</height>
    </rect>
   </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
   <property name="font">
    <font>
     <pointsize>12</pointsize>
@@ -19,10 +25,13 @@
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout">
    <item>
-    <spacer name="horizontalSpacer_2">
+    <spacer name="horizontalSpacer">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>40</width>
@@ -32,13 +41,177 @@
     </spacer>
    </item>
    <item>
-    <layout class="QVBoxLayout" name="verticalLayout"/>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QCommandLinkButton" name="buttonJabber">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Jabber/XMPP</string>
+       </property>
+       <property name="icon">
+        <iconset theme="im-jabber">
+         <normaloff/>
+        </iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>32</width>
+         <height>32</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCommandLinkButton" name="buttonGTalk">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Google Talk</string>
+       </property>
+       <property name="icon">
+        <iconset theme="im-google-talk">
+         <normaloff/>
+        </iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>32</width>
+         <height>32</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCommandLinkButton" name="buttonFacebook">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Facebook Chat</string>
+       </property>
+       <property name="icon">
+        <iconset theme="im-facebook">
+         <normaloff/>
+        </iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>32</width>
+         <height>32</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCommandLinkButton" name="buttonIcq">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>ICQ</string>
+       </property>
+       <property name="icon">
+        <iconset theme="im-icq">
+         <normaloff/>
+        </iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>32</width>
+         <height>32</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCommandLinkButton" name="buttonMsn">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Windows Live Messenger</string>
+       </property>
+       <property name="icon">
+        <iconset theme="im-msn">
+         <normaloff/>
+        </iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>32</width>
+         <height>32</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCommandLinkButton" name="buttonOthers">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text">
+        <string>Others</string>
+       </property>
+       <property name="icon">
+        <iconset theme="go-next">
+         <normaloff/>
+        </iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>32</width>
+         <height>32</height>
+        </size>
+       </property>
+       <property name="description">
+        <string>AOL, Gadu-Gadu, IRC, Yahoo and more...</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
    </item>
    <item>
-    <spacer name="horizontalSpacer">
+    <spacer name="horizontalSpacer_2">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
      <property name="sizeHint" stdset="0">
       <size>
        <width>40</width>

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list