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

List:       kde-commits
Subject:    kdebase/kdeprint/kdeprintfax
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2003-05-21 16:30:04
[Download RAW message or body]

CVS commit by goffioul: 

Added support for generic fax system, which can be used for any other fax system than \
those already supported. Fixes bug #55857 and bug #42583.


  M +9 -0      confsystem.cpp   1.9
  M +2 -0      faxctrl.cpp   1.20
  M +3 -0      kdeprintfax.cpp   1.19


--- kdebase/kdeprint/kdeprintfax/confsystem.cpp  #1.8:1.9
@@ -37,4 +37,5 @@
 #define HYLAFAX_ID      1
 #define MGETTY_ID       2
+#define OTHER_ID    3
  
 ConfSystem::ConfSystem(QWidget *parent, const char *name) 
@@ -45,4 +46,5 @@ ConfSystem::ConfSystem(QWidget *parent, 
         m_system->insertItem("HylaFax");
         m_system->insertItem("Mgetty-sendfax");
+        m_system->insertItem( "Other" );
         m_command = new QLineEdit(this);
         QLabel  *syslabel = new QLabel(i18n("F&ax system:"), this);
@@ -95,7 +97,9 @@ void ConfSystem::load() 
         m_commands << conf->readEntry("HylaFax", \
                defaultCommand(hylafax_default_cmd));
         m_commands << conf->readEntry("Mgetty", defaultCommand(mgetty_default_cmd));
+        m_commands << conf->readEntry( "Other", QString::null );
         QString v = conf->readEntry("System", "efax");
         if (v == "mgetty") m_current = MGETTY_ID;
         else if (v == "hylafax") m_current = HYLAFAX_ID;
+        else if ( v == "other" ) m_current = OTHER_ID;
         else m_current = EFAX_ID;
         conf->setGroup("Fax");
@@ -129,4 +133,8 @@ void ConfSystem::save()
         else
                 conf->deleteEntry("Mgetty");
+        if ( !m_commands[ OTHER_ID ].isEmpty() )
+                conf->writeEntry( "Other", m_commands[ OTHER_ID ] );
+        else
+                conf->deleteEntry( "Other" );
         int     ID = m_system->currentItem();
         switch (ID)
@@ -135,4 +143,5 @@ void ConfSystem::save()
                 case HYLAFAX_ID: conf->writeEntry("System", "hylafax"); break;
                 case MGETTY_ID: conf->writeEntry("System", "mgetty"); break;
+                case OTHER_ID: conf->writeEntry( "System", "other" ); break;
         }
         conf->setGroup("Fax");

--- kdebase/kdeprint/kdeprintfax/faxctrl.cpp  #1.19:1.20
@@ -281,4 +281,6 @@ QString FaxCtrl::faxCommand()
         else if (sys == "mgetty")
                 cmd = conf->readEntry("Mgetty", mgetty_default_cmd);
+        else if ( sys == "other" )
+                cmd = conf->readEntry( "Other", QString::null );
         else
                 cmd = conf->readEntry("EFax", efax_default_cmd);

--- kdebase/kdeprint/kdeprintfax/kdeprintfax.cpp  #1.18:1.19
@@ -358,4 +358,7 @@ void KdeprintFax::updateState()
                 slotTimeComboActivated(0);
         }
+        else
+                m_timecombo->setEnabled( true );
+        m_name->setEnabled( cmd.find( "%name" ) != -1 );
         statusBar()->changeItem(m_faxctrl->faxSystem(), 2);
 }


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

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