Use new stuff from patch 1/4 to set save widgets
sensitivity according to sym_change_count.


Signed-off-by: Karsten Wiese <[EMAIL PROTECTED]>



diff -pur 2.6.18/scripts/kconfig/qconf.cc rt3-kw/scripts/kconfig/qconf.cc
--- 2.6.18/scripts/kconfig/qconf.cc     2006-09-23 20:03:17.000000000 +0200
+++ 2.6.18-kw/scripts/kconfig/qconf.cc  2006-09-24 14:47:48.000000000 +0200
@@ -38,6 +38,13 @@
 static QApplication *configApp;
 static ConfigSettings *configSettings;
 
+static QAction *saveAction;
+
+extern "C" static void sym_change_count_changed(int count)
+{
+       saveAction->setEnabled(count);
+}
+
 static inline QString qgettext(const char* str)
 {
        return QString::fromLocal8Bit(gettext(str));
@@ -1305,7 +1312,9 @@ ConfigMainWindow::ConfigMainWindow(void)
          connect(quitAction, SIGNAL(activated()), SLOT(close()));
        QAction *loadAction = new QAction("Load", QPixmap(xpm_load), "&Load", 
CTRL+Key_L, this);
          connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
-       QAction *saveAction = new QAction("Save", QPixmap(xpm_save), "&Save", 
CTRL+Key_S, this);
+       saveAction = new QAction("Save", QPixmap(xpm_save), "&Save", 
CTRL+Key_S, this);
+       sym_change_count_changed_set(sym_change_count_changed);
+       sym_change_count_changed(sym_change_count());
          connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
        QAction *saveAsAction = new QAction("Save As...", "Save &As...", 0, 
this);
          connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
@@ -1584,7 +1593,7 @@ void ConfigMainWindow::showFullView(void
  */
 void ConfigMainWindow::closeEvent(QCloseEvent* e)
 {
-       if (!sym_change_count) {
+       if (!sym_change_count()) {
                e->accept();
                return;
        }

        

        
                
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to