[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kicker/ui
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2004-10-29 21:18:14
Message-ID: 20041029211814.BB2C916CC2 () office ! kde ! org
[Download RAW message or body]

CVS commit by aseigo: 

BUG:92285
if you choose an icon first, and then select the file, the icon you chose
should not be replaced by the mimetype's icon for the file you chose


  M +15 -2     exe_dlg.cpp   1.14
  M +2 -0      exe_dlg.h   1.6


--- kdebase/kicker/ui/exe_dlg.cpp  #1.13:1.14
@@ -51,5 +51,6 @@ PanelExeDialog::PanelExeDialog(const QSt
                                QWidget *parent, const char *name)
     : KDialogBase(parent, name, true, i18n("Non-KDE Application Configuration"), Ok|Cancel, Ok, true),
-      m_icon(icon.isEmpty() ? "exec" : icon)
+      m_icon(icon.isEmpty() ? "exec" : icon),
+      m_iconChanged(false)
 {
     setCaption(i18n("Non-KDE Application Configuration"));
@@ -65,4 +66,6 @@ PanelExeDialog::PanelExeDialog(const QSt
     connect(ui->m_exec, SIGNAL(returnPressed()),
             this, SLOT(slotReturnPressed()));
+    connect(ui->m_icon, SIGNAL(iconChanged(QString)),
+            this, SLOT(slotIconChanged(QString)));
     ui->m_title->setText(title);
     ui->m_exec->setURL(path);
@@ -135,6 +138,16 @@ void PanelExeDialog::fillCompletion()
 }
 
+void PanelExeDialog::slotIconChanged(QString)
+{
+    m_iconChanged = true;
+}
+
 void PanelExeDialog::slotTextChanged(const QString &str)
 {
+    if (m_iconChanged)
+    {
+        return;
+    }
+
     QString exeLocation = str;
     QMap<QString, QString>::iterator it = m_partialPath2full.find(str);

--- kdebase/kicker/ui/exe_dlg.h  #1.5:1.6
@@ -46,4 +46,5 @@ protected slots:
     void slotTextChanged(const QString &);
     void slotReturnPressed();
+    void slotIconChanged(QString);
 
 protected:
@@ -54,4 +55,5 @@ protected:
     QString m_icon;
     QMap<QString, QString> m_partialPath2full;
+    bool m_iconChanged;
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic