packages: kde4-kdebase-workspace/kde4-kdebase-workspace-branch.diff, kde4-k...

arekm arekm at pld-linux.org
Wed Dec 2 19:07:05 CET 2009


Author: arekm                        Date: Wed Dec  2 18:07:05 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- branch is back

---- Files affected:
packages/kde4-kdebase-workspace:
   kde4-kdebase-workspace-branch.diff (1.14 -> 1.15) , kde4-kdebase-workspace.spec (1.178 -> 1.179) 

---- Diffs:

================================================================
Index: packages/kde4-kdebase-workspace/kde4-kdebase-workspace-branch.diff
diff -u packages/kde4-kdebase-workspace/kde4-kdebase-workspace-branch.diff:1.14 packages/kde4-kdebase-workspace/kde4-kdebase-workspace-branch.diff:1.15
--- packages/kde4-kdebase-workspace/kde4-kdebase-workspace-branch.diff:1.14	Wed Nov 25 10:53:24 2009
+++ packages/kde4-kdebase-workspace/kde4-kdebase-workspace-branch.diff	Wed Dec  2 19:06:59 2009
@@ -1,4659 +1,96 @@
---- workspace/kcontrol/screensaver/screensaver.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/kcontrol/screensaver/screensaver.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -20,7 +20,7 @@
- Name[bn]=স্ক্রীন সেভার
- Name[bn_IN]=স্ক্রিন-সেভার
- Name[br]=Damanter Skramm
--Name[ca]=Salvapantalles
-+Name[ca]=Estalvi de pantalla
- Name[ca at valencia]=Salvapantalles
- Name[cs]=Šetřič obrazovky
- Name[csb]=Wëgaszôcz ekranu
-@@ -105,7 +105,7 @@
- Comment[bn]=স্ক্রীন সেভার সেটিংস
- Comment[bn_IN]=স্ক্রিন-সেভার সংক্রান্ত বৈশিষ্ট্য
- Comment[br]=Kefluniadur an Damanter Skramm
--Comment[ca]=Arranjament del salvapantalles
-+Comment[ca]=Arranjament de l'estalvi de pantalla
- Comment[ca at valencia]=Arranjament del salvapantalles
- Comment[cs]=Nastavení šetřiče obrazovky
- Comment[csb]=Nastôw wëgaszôcza ekranu
---- workspace/kcontrol/autostart/autostart.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/kcontrol/autostart/autostart.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -72,7 +72,7 @@
- Name[ro]=Autostart
- Name[ru]=Автозапуск
- Name[si]=ක්‍ෂණික ඇරඹුම
--Name[sk]=Autoštart
-+Name[sk]=Automatické spustenie
- Name[sl]=Samodejni zagon
- Name[sr]=Самопокретање
- Name[sr at latin]=Samopokretanje
-@@ -144,7 +144,7 @@
- Comment[ro]=Unealtă de configurare pentru administrarea programelor ce pornesc odată cu KDE.
- Comment[ru]=Управление программами, запускаемыми в начале сеанса KDE
- Comment[si]=A configuration tool for managing which programs start up with KDE.
--Comment[sk]=Konfiguračný nástroj pre správu programov, ktoré sa majú spúšťať pri štarte KDE
-+Comment[sk]=Konfiguračný nástroj pre správu programov, ktoré sa majú spúšťať pri štarte KDE.
- Comment[sl]=Orodje za upravljanje programov, ki se zaženejo skupaj z namizjem KDE.
- Comment[sr]=Алатка за одређивање програма који се покрећу заједно са КДЕ‑ом.
- Comment[sr at latin]=Alatka za određivanje programa koji se pokreću zajedno sa KDE‑om.
-@@ -153,7 +153,7 @@
- Comment[te]=KDE తో ఏ కార్యక్రమములు ప్రారంభంకావాలో నిర్వహించుటకు ఆకృతీకరణ సాధనం
- Comment[th]=เครื่องมือปรับแต่งสำหรับกำหนดว่าจะให้โปรแกรมใดบ้างที่เริ่มทำงานอัตโนมัติพร้อมกับ KDE
- Comment[tr]=KDE oturumu açılırken başlatılacak uygulamaları yapılandırmanızı sağlayan bir araç.
--Comment[uk]=Засіб налаштування для керування програмами, які будуть запускатися разом з KDE.
-+Comment[uk]=Керування програмами, які будуть запускатися разом з KDE.
- Comment[wa]=Ene usteye d' apontiaedje po decider kés programes enondèt å minme tins ki KDE.
- Comment[x-test]=xxA configuration tool for managing which programs start up with KDE.xx
- Comment[zh_CN]=管理随 KDE 自动启动的程序的配置工具。
---- workspace/kcontrol/access/kcmaccess.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/kcontrol/access/kcmaccess.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -161,7 +161,7 @@
- Comment[ru]=Специальные возможности для людей с физическими ограничениями
- Comment[se]=Álkkibut geavaheapmi doaimmahehttejuvvon olbmuide
- Comment[si]=Improve accessibility for disabled persons
--Comment[sk]=Zlepšenie prístupnosti pre postihnutých používateľov
-+Comment[sk]=Zlepšenie prístupnosti pre postihnutých užívateľov
- Comment[sl]=Izboljšana dostopnost za prizadete osebe
- Comment[sr]=Побољшава приступачност хендикепираним особама
- Comment[sr at latin]=Poboljšava pristupačnost hendikepiranim osobama
---- workspace/systemsettings/classic/settings-classic-view.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/classic/settings-classic-view.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -44,6 +44,7 @@
- Name[pt_BR]=Visão em árvore clássica
- Name[ro]=Vizualizare arborescentă clasică
- Name[ru]=Дерево
-+Name[sk]=Klasické stromové zobrazenie
- Name[sl]=Klasičen drevesni prikaz
- Name[sr]=Класични приказ стабла
- Name[sr at latin]=Klasični prikaz stabla
-@@ -89,6 +90,7 @@
- Comment[pt]=A vista para a configuração do sistema clássica do KControl do KDE 3.
- Comment[pt_BR]=Um estilo de visão clássico das configurações do sistema do KControl do KDE 3
- Comment[ro]=Vizualizare clasică KControl KDE 3 pentru Configurări de sistem.
-+Comment[sk]=Klasický štýl zobrazenia Ovládacieho centra KDE 3.
- Comment[sl]=Prikaz za sistemske nastavitve v slogu nadzornega središča iz KDE 3.
- Comment[sr]=Приказ поставки у класичном стилу К‑контроле из КДЕ‑а 3.
- Comment[sr at latin]=Prikaz postavki u klasičnom stilu K‑kontrole iz KDE‑a 3.
---- workspace/systemsettings/categories/settings-notifications.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/categories/settings-notifications.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -66,7 +66,7 @@
- Name[ru]=Системные уведомления
- Name[se]=Dieđáhusat
- Name[si]=දැනුම් දීම්
--Name[sk]=Systémové notifikácie
-+Name[sk]=Upozornenia
- Name[sl]=Obvestila
- Name[sr]=Обавештења
- Name[sr at latin]=Obaveštenja
---- workspace/systemsettings/categories/settings-general.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/categories/settings-general.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -48,6 +48,7 @@
- Name[pt_BR]=Geral
- Name[ro]=General
- Name[ru]=Основные
-+Name[sk]=Všeobecné
- Name[sl]=Splošno
- Name[sr]=Опште
- Name[sr at latin]=Opšte
---- workspace/systemsettings/categories/settings-advanced-user-settings.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/categories/settings-advanced-user-settings.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -64,7 +64,7 @@
- Name[ru]=Дополнительные параметры
- Name[se]=Erenoamáš geavaheaddjiheivehusat
- Name[si]=වැඩමනත් පරිශීලක සැකසුම්
--Name[sk]=Pokročilé nastavenia používateľa
-+Name[sk]=Pokročilé nastavenia užívateľa
- Name[sl]=Napredne nastavitve uporabnika
- Name[sr]=Напредне корисничке поставке
- Name[sr at latin]=Napredne korisničke postavke
---- workspace/systemsettings/categories/settings-regional-and-language.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/categories/settings-regional-and-language.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -65,7 +65,7 @@
- Name[ru]=Язык и стандарты
- Name[se]=Riika/guovlu ja giella
- Name[si]=ප්‍රාදේශිය සහ භාෂාව
--Name[sk]=Región a Jazyk
-+Name[sk]=Región a jazyk
- Name[sl]=Država/regija in jezik
- Name[sr]=Регија и језик
- Name[sr at latin]=Regija i jezik
---- workspace/systemsettings/categories/settings-computer-administration.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/categories/settings-computer-administration.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -65,7 +65,7 @@
- Name[ru]=Управление компьютером
- Name[se]=Vuogádathálddašeapmi
- Name[si]=පරිගණක පරිපාලනය
--Name[sk]=Administrácia
-+Name[sk]=Správa počítača
- Name[sl]=Sistemsko upravljanje
- Name[sr]=Администрација рачунара
- Name[sr at latin]=Administracija računara
---- workspace/systemsettings/categories/settings-network-settings.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/categories/settings-network-settings.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -66,7 +66,7 @@
- Name[ru]=Настройка сети
- Name[se]=Fierpmádatheivehusat
- Name[si]=ජාල සැකසුම්
--Name[sk]=Sieť
-+Name[sk]=Nastavenie siete
- Name[sl]=Nastavitve omrežja
- Name[sr]=Мрежне поставке
- Name[sr at latin]=Mrežne postavke
---- workspace/systemsettings/categories/settings-network-and-connectivity.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/categories/settings-network-and-connectivity.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -63,7 +63,7 @@
- Name[ru]=Сеть и Интернет
- Name[se]=Fierpmádat ja gullahallan
- Name[si]=ජාලය සහ සම්බන්ධතාවය
--Name[sk]=Sieť a konektivita
-+Name[sk]=Sieť a pripojenie
- Name[sl]=Omrežje in povezljivost
- Name[sr]=Мрежа и повезивост
- Name[sr at latin]=Mreža i povezivost
---- workspace/systemsettings/core/systemsettingsview.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/core/systemsettingsview.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -43,6 +43,7 @@
- Name[pt_BR]=Visão das configurações do sistema
- Name[ro]=Vizualizare Configurări de sistem
- Name[ru]=Внешний вид «Параметров системы»
-+Name[sk]=Zobrazenie systémových nastavení
- Name[sl]=Prikaz sistemskih nastavitev
- Name[sr]=Приказ системских поставки
- Name[sr at latin]=Prikaz sistemskih postavki
---- workspace/systemsettings/icons/settings-icon-view.desktop	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/systemsettings/icons/settings-icon-view.desktop	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -53,6 +53,7 @@
- Name[pt_BR]=Visão em ícone
- Name[ro]=Vizualizare pictograme
- Name[ru]=Значки
-+Name[sk]=Zobrazenie s ikonami
- Name[sl]=Prikaz z ikonami
- Name[sr]=Приказ икона
- Name[sr at latin]=Prikaz ikona
-@@ -103,6 +104,7 @@
- Comment[pt]=O estilo de vista com ícones para o KDE 4
- Comment[pt_BR]=O estilo de visão em ícone do KDE 4
- Comment[ro]=Stilul KDE 4 de vizualizare pe pictograme
-+Comment[sk]=Štýl zobrazenia s ikonami KDE 4
- Comment[sl]=Slog prikaza z ikonami iz KDE 4
- Comment[sr]=Приказ икона у стилу КДЕ‑а 4.
- Comment[sr at latin]=Prikaz ikona u stilu KDE‑a 4.
---- workspace/klipper/editactiondialog.ui	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/klipper/editactiondialog.ui	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -56,6 +56,29 @@
-        </property>
-       </widget>
-      </item>
-+     <item row="1" column="1">
-+      <widget class="QLabel" name="label_5">
-+       <property name="text">
-+        <string>Automatic:</string>
-+       </property>
-+       <property name="alignment">
-+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-+       </property>
-+       <property name="buddy">
-+        <cstring>automatic</cstring>
-+       </property>
-+      </widget>
-+     </item>
-+     <item row="1" column="2">
-+      <widget class="QCheckBox" name="automatic">
-+       <property name="layoutDirection">
-+        <enum>Qt::LeftToRight</enum>
-+       </property>
-+       <property name="text">
-+        <string/>
-+       </property>
-+      </widget>
-+     </item>
-     </layout>
-    </item>
-    <item row="3" column="0" colspan="2">
-@@ -65,23 +88,6 @@
-      </property>
-     </widget>
-    </item>
--   <item row="4" column="1">
--    <widget class="QTreeWidget" name="twCommandList">
--     <property name="toolTip">
--      <string>Double-click an item to edit</string>
--     </property>
--     <column>
--      <property name="text">
--       <string>Command</string>
--      </property>
--     </column>
--     <column>
--      <property name="text">
--       <string>Description</string>
--      </property>
--     </column>
--    </widget>
--   </item>
-    <item row="1" column="0">
-     <spacer name="horizontalSpacer">
-      <property name="orientation">
-@@ -164,8 +170,50 @@
-      </property>
-     </spacer>
-    </item>
-+   <item row="4" column="1">
-+    <widget class="QTableView" name="twCommandList">
-+     <property name="toolTip">
-+      <string>Double-click an item to edit</string>
-+     </property>
-+     <property name="alternatingRowColors">
-+      <bool>true</bool>
-+     </property>
-+     <property name="selectionMode">
-+      <enum>QAbstractItemView::SingleSelection</enum>
-+     </property>
-+     <property name="selectionBehavior">
-+      <enum>QAbstractItemView::SelectRows</enum>
-+     </property>
-+     <property name="showGrid">
-+      <bool>false</bool>
-+     </property>
-+     <property name="gridStyle">
-+      <enum>Qt::NoPen</enum>
-+     </property>
-+     <property name="wordWrap">
-+      <bool>false</bool>
-+     </property>
-+     <attribute name="horizontalHeaderStretchLastSection">
-+      <bool>true</bool>
-+     </attribute>
-+     <attribute name="verticalHeaderVisible">
-+      <bool>false</bool>
-+     </attribute>
-+     <attribute name="verticalHeaderStretchLastSection">
-+      <bool>false</bool>
-+     </attribute>
-+    </widget>
-+   </item>
-   </layout>
-  </widget>
-+ <tabstops>
-+  <tabstop>twCommandList</tabstop>
-+  <tabstop>leRegExp</tabstop>
-+  <tabstop>automatic</tabstop>
-+  <tabstop>leDescription</tabstop>
-+  <tabstop>pbRemoveCommand</tabstop>
-+  <tabstop>pbAddCommand</tabstop>
-+ </tabstops>
-  <resources/>
-  <connections/>
- </ui>
---- workspace/klipper/editactiondialog.cpp	(.../tags/KDE/4.3.3/kdebase)	(wersja 1053996)
-+++ workspace/klipper/editactiondialog.cpp	(.../branches/KDE/4.3/kdebase)	(wersja 1053996)
-@@ -25,7 +25,238 @@
- #include "urlgrabber.h"
- 
- #include "ui_editactiondialog.h"
-+#include <QItemDelegate>
-+#include <QComboBox>
- 
-+namespace {
-+    static QString output2text(ClipCommand::Output output) {
-+        switch(output) {
-+            case ClipCommand::IGNORE:
-+                return QString(i18n("Ignore"));
-+            case ClipCommand::REPLACE:
-+                return QString(i18n("Replace"));
-+            case ClipCommand::ADD:
-+                return QString(i18n("Add"));
-+        }
-+        return QString();
-+    }
-+
-+}
-+
-+/**
-+ * Show dropdown of editing Output part of commands
-+ */
-+class ActionOutputDelegate : public QItemDelegate {
-+    public:
-+        ActionOutputDelegate(QObject* parent = 0) : QItemDelegate(parent){
-+        }
-+
-+        virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& /*option*/, const QModelIndex& /*index*/) const {
-+            QComboBox* editor = new QComboBox(parent);
-+            editor->setInsertPolicy(QComboBox::NoInsert);
-+            editor->addItem(output2text(ClipCommand::IGNORE), QVariant::fromValue<ClipCommand::Output>(ClipCommand::IGNORE));
-+            editor->addItem(output2text(ClipCommand::REPLACE), QVariant::fromValue<ClipCommand::Output>(ClipCommand::REPLACE));
-+            editor->addItem(output2text(ClipCommand::ADD), QVariant::fromValue<ClipCommand::Output>(ClipCommand::ADD));
-+            return editor;
-+
-+        }
-+
-+        virtual void setEditorData(QWidget* editor, const QModelIndex& index) const {
-+            QComboBox* ed = static_cast<QComboBox*>(editor);
-+            QVariant data(index.model()->data(index, Qt::EditRole));
-+            ed->setCurrentIndex(static_cast<int>(data.value<ClipCommand::Output>()));
-+        }
-+
-+        virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const {
-+            QComboBox* ed = static_cast<QComboBox*>(editor);
-+            model->setData(index, ed->itemData(ed->currentIndex()));
-+        }
-+
-+        virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& /*index*/) const {
-+            editor->setGeometry(option.rect);
-+        }
-+};
-+
-+class ActionDetailModel : public QAbstractTableModel {
-+    public:
-+        ActionDetailModel(ClipAction* action, QObject* parent = 0);
-+        virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
-+        virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
-+        virtual Qt::ItemFlags flags(const QModelIndex& index) const;
-+        virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
-+        virtual int columnCount(const QModelIndex& parent) const;
-+        virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
-+        const QList<ClipCommand>& commands() const { return m_commands; }
-+        void addCommand(const ClipCommand& command);
-+        void removeCommand(const QModelIndex& index);
-+
-+    private:
-+        enum column_t {
-+            COMMAND_COL = 0,
-+            OUTPUT_COL = 1,
-+            DESCRIPTION_COL = 2
-+        };
-+        QList<ClipCommand> m_commands;
-+        QVariant displayData(ClipCommand* command, column_t colunm) const;
-+        QVariant editData(ClipCommand* command, column_t column) const;
-+        QVariant decorationData(ClipCommand* command, column_t column) const;
-+        void setIconForCommand(ClipCommand& cmd);
-+};
-+
-+ActionDetailModel::ActionDetailModel(ClipAction* action, QObject* parent):
-+    QAbstractTableModel(parent),
-+    m_commands(action->commands())
-+{
-+
-+}
-+
-+Qt::ItemFlags ActionDetailModel::flags(const QModelIndex& /*index*/) const
-+{
-+    return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
-+}
-+
-+
-+void ActionDetailModel::setIconForCommand(ClipCommand& cmd)
-+{
-+    // let's try to update icon of the item according to command
-+    QString command = cmd.command;
-+    if ( command.contains( ' ' ) ) {
-+        // get first word
-+        command = command.section( ' ', 0, 0 );
-+    }
-+
-+    QPixmap iconPix = KIconLoader::global()->loadIcon(
-+                                        command, KIconLoader::Small, 0,
-+                                        KIconLoader::DefaultState,
-+                                        QStringList(), 0, true /* canReturnNull */ );
-+
-+    if ( !iconPix.isNull() ) {
-+        cmd.pixmap = command;
-+    } else {
-+        cmd.pixmap.clear();
-+    }
-+
-+}
-+
-+bool ActionDetailModel::setData(const QModelIndex& index, const QVariant& value, int role)
-+{
-+    if (role == Qt::EditRole) {
-+        ClipCommand cmd = m_commands.at(index.row());
-+        switch (static_cast<column_t>(index.column())) {
-+            case COMMAND_COL:
-+                cmd.command = value.value<QString>();
-+                setIconForCommand(cmd);
-+                break;
-+            case OUTPUT_COL:
-+                cmd.output = value.value<ClipCommand::Output>();
-+                break;
-+            case DESCRIPTION_COL:
-+                cmd.description = value.value<QString>();
-+                break;
-+        }
-+        m_commands.replace(index.row(), cmd);
-+        emit dataChanged(index, index);
-+        return true;
-+    }
-+    return false;
-+}
-+
-+int ActionDetailModel::columnCount(const QModelIndex& /*parent*/) const
-+{
-+    return 3;
-+}
-+
-+int ActionDetailModel::rowCount(const QModelIndex&) const
-+{
-+    return m_commands.count();
-+}
-+
-+QVariant ActionDetailModel::displayData(ClipCommand* command, ActionDetailModel::column_t column) const
-+{
-+    switch (column) {
-+        case COMMAND_COL:
-+            return command->command;
-+        case OUTPUT_COL:
-+            return output2text(command->output);
-+        case DESCRIPTION_COL:
-+            return command->description;
-+    }
-+    return QVariant();
-+}
-+
-+QVariant ActionDetailModel::decorationData(ClipCommand* command, ActionDetailModel::column_t column) const
-+{
-+    switch (column) {
-+        case COMMAND_COL:
-+            return command->pixmap.isEmpty() ? KIcon( "system-run" ) : KIcon( command->pixmap );
-+        case OUTPUT_COL:
-+        case DESCRIPTION_COL:
-+            break;
-+    }
-+    return QVariant();
-+
-+}
-+
-+QVariant ActionDetailModel::editData(ClipCommand* command, ActionDetailModel::column_t column) const
-+{
-+    switch (column) {
-+        case COMMAND_COL:
-+            return command->command;
-+        case OUTPUT_COL:
-+            return QVariant::fromValue<ClipCommand::Output>(command->output);
-+        case DESCRIPTION_COL:
-+            return command->description;
-+    }
-+    return QVariant();
-+
-+}
-+
-+QVariant ActionDetailModel::headerData(int section, Qt::Orientation orientation, int role) const
-+{
-+    if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
-+        switch(static_cast<column_t>(section)) {
-+        case COMMAND_COL:
-+            return i18n("Command");
-+        case OUTPUT_COL:
-+            return i18n("Use Output");
-+        case DESCRIPTION_COL:
-+            return i18n("Description");
-+        }
-+    }
-+    return QAbstractTableModel::headerData(section, orientation, role);
-+}
-+
-+
-+QVariant ActionDetailModel::data(const QModelIndex& index, int role) const
-+{
-+    const int column = index.column();
-+    const int row = index.row();
-+    ClipCommand cmd = m_commands.at(row);
-+    switch (role) {
-+        case Qt::DisplayRole:
-+            return displayData(&cmd, static_cast<column_t>(column));
-+        case Qt::DecorationRole:
-+            return decorationData(&cmd, static_cast<column_t>(column));
-+        case Qt::EditRole:
-+            return editData(&cmd, static_cast<column_t>(column));
-+    }
-+    return QVariant();
-+}
-+
-+void ActionDetailModel::addCommand(const ClipCommand& command) {
-+    beginInsertRows(QModelIndex(), rowCount(), rowCount());
-+    m_commands << command;
-+    endInsertRows();
-+}
-+
-+void ActionDetailModel::removeCommand(const QModelIndex& index) {
-+    int row = index.row();
-+    beginRemoveRows(QModelIndex(), row, row);
-+    m_commands.removeAt(row);
-+    endRemoveRows();
-+
-+}
-+
- EditActionDialog::EditActionDialog(QWidget* parent)
-     : KDialog(parent)
- {
-@@ -39,19 +270,14 @@
-     m_ui->pbAddCommand->setIcon(KIcon("list-add"));
-     m_ui->pbRemoveCommand->setIcon(KIcon("list-remove"));
- 
--    m_ui->twCommandList->header()->resizeSection( 0, 170 );
--
-+    // For some reason, the default row height is 30 pixel. Set it to the minimum sectionSize instead,
-+    // which is the font height+struts.
-+    m_ui->twCommandList->verticalHeader()->setDefaultSectionSize(m_ui->twCommandList->verticalHeader()->minimumSectionSize());
-     setMainWidget(dlgWidget);
- 
--    connect(m_ui->twCommandList, SIGNAL(itemSelectionChanged()), SLOT(onSelectionChanged()));
--    connect(m_ui->twCommandList, SIGNAL(itemChanged(QTreeWidgetItem*, int)),
--            SLOT(onItemChanged(QTreeWidgetItem*, int)));
--
-     connect(m_ui->pbAddCommand, SIGNAL( clicked() ), SLOT( onAddCommand() ) );
-     connect(m_ui->pbRemoveCommand, SIGNAL( clicked() ), SLOT( onRemoveCommand() ) );
- 
--    // update Remove button
--    onSelectionChanged();
- }
- 
- EditActionDialog::~EditActionDialog()
-@@ -62,6 +288,10 @@
- void EditActionDialog::setAction(ClipAction* act, int commandIdxToSelect)
- {
-     m_action = act;
-+    m_model = new ActionDetailModel(act, this);
-+    m_ui->twCommandList->setModel(m_model);
-+    m_ui->twCommandList->setItemDelegateForColumn(1, new ActionOutputDelegate);
-+    connect(m_ui->twCommandList->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(onSelectionChanged()));
- 
-     updateWidgets( commandIdxToSelect );
- }
-@@ -73,25 +303,12 @@
-         return;
-     }
- 
--    m_ui->twCommandList->clear();
--
-     m_ui->leRegExp->setText(m_action->regExp());
-+    m_ui->automatic->setChecked(m_action->automatic());
-     m_ui->leDescription->setText(m_action->description());
- 
--    foreach( const ClipCommand& cmd, m_action->commands() ) {
--        QTreeWidgetItem* item = new QTreeWidgetItem;
--        item->setFlags( item->flags() | Qt::ItemIsEditable );
--
--        item->setText( 0, cmd.command );
--        QString iconName = cmd.pixmap.isEmpty() ? "system-run" : cmd.pixmap;
--        item->setIcon( 0, KIcon( iconName ) );
--        item->setData( 0, Qt::UserRole, iconName ); // store icon name too
--        item->setText( 1, cmd.description );
--        m_ui->twCommandList->addTopLevelItem( item );
--    }
--
-     if (commandIdxToSelect != -1) {
--        m_ui->twCommandList->setCurrentItem( m_ui->twCommandList->topLevelItem( commandIdxToSelect ) );
-+        m_ui->twCommandList->setCurrentIndex( m_model->index( commandIdxToSelect ,0 ) );
-     }
- 
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kde4-kdebase-workspace/kde4-kdebase-workspace-branch.diff?r1=1.14&r2=1.15&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kde4-kdebase-workspace/kde4-kdebase-workspace.spec?r1=1.178&r2=1.179&f=u



More information about the pld-cvs-commit mailing list