]> git.pld-linux.org Git - packages/regedit.git/blob - regedit-quit.patch
- added Quit button
[packages/regedit.git] / regedit-quit.patch
1 diff -Nurb b/src/mainwidgetimpl.cpp n/src/mainwidgetimpl.cpp
2 --- b/src/mainwidgetimpl.cpp    2004-11-13 17:45:01.235503000 +0100
3 +++ n/src/mainwidgetimpl.cpp    2004-11-13 18:24:59.813863912 +0100
4 @@ -684,3 +684,9 @@
5  {
6         parent->statusBar()->message(str);
7  }
8 +
9 +void MainWidgetImpl::byebye()
10 +{
11 +       //cerr << "in MainWidgetImpl::byebye()" << endl;
12 +       parent->close();
13 +}
14 diff -Nurb b/src/mainwidgetimpl.h n/src/mainwidgetimpl.h
15 --- b/src/mainwidgetimpl.h      2004-11-13 17:45:01.236503000 +0100
16 +++ n/src/mainwidgetimpl.h      2004-11-13 18:14:59.982052208 +0100
17 @@ -79,6 +79,7 @@
18         void redo();
19         void addNewKey();
20         void deleteKey();
21 +       void byebye();
22         
23  private:
24         void fillUpKeyTree(::Key *root, QListViewItem *item);
25 diff -Nurb b/src/mainwindowimpl.cpp n/src/mainwindowimpl.cpp
26 --- b/src/mainwindowimpl.cpp    2004-11-13 17:45:01.237502000 +0100
27 +++ n/src/mainwindowimpl.cpp    2004-11-13 18:24:49.578419936 +0100
28 @@ -38,6 +38,7 @@
29  #include <qaction.h>
30  #include <qkeysequence.h>
31  #include <qstatusbar.h>
32 +#include <qapplication.h>
33  
34  MainWindowImpl::MainWindowImpl (QWidget *parent, const char *name, WFlags fl)
35  : QMainWindow(parent, name, fl)
36 @@ -56,6 +57,7 @@
37         connect(redo, SIGNAL(activated()), mainWidget, SLOT(redo()));
38         connect(del, SIGNAL(activated()), mainWidget, SLOT(deleteKey()));
39         connect(newkey, SIGNAL(activated()), mainWidget, SLOT(addNewKey()));
40 +       connect(quit, SIGNAL(activated()), mainWidget, SLOT(byebye()));
41         
42         show();
43  }
44 @@ -186,6 +188,7 @@
45         
46         kdbClose();
47         
48 +       //cerr << "in MainWindowImpl::closeEvent(QCloseEvent *e)" << endl;
49         QMainWindow::closeEvent(e);
50  }
51  
52 @@ -275,12 +278,14 @@
53         QPixmap reloadIcon(iconDir + "/reload.png");
54         QPixmap undoIcon(iconDir + "/undo.png");
55         QPixmap redoIcon(iconDir + "/redo.png");
56 +       QPixmap quitIcon(iconDir + "/exit.png");
57         
58         newkey = new QAction(QString("add new key to kdb"), QIconSet(newIcon), QString("new key"), QKeySequence(CTRL + Key_N), this, "newkey action");
59         del = new QAction(QString("delete key from kdb"), QIconSet(delIcon), QString("delet key"), QKeySequence(Key_Delete), this, "delete action");
60         reload = new QAction(QString("load the kdb"), QIconSet(reloadIcon), QString("refresh"), QKeySequence(Key_F5), this, "refresh action");
61         undo = new QAction(QString("undo last modification"), QIconSet(undoIcon), QString("undo"), QKeySequence(CTRL + Key_Z), this, "undo action");
62         redo = new QAction(QString("redo last modification"), QIconSet(redoIcon), QString("redo"), QKeySequence(CTRL + Key_R), this, "redo action");
63 +       quit = new QAction(QString("quit"), QIconSet(quitIcon), QString("quit"), QKeySequence(CTRL + Key_Q), this, "quit action");
64         
65         newkey->addTo(editToolBar);
66         del->addTo(editToolBar);
67 @@ -288,6 +293,8 @@
68         reload->addTo(editToolBar);     
69         undo->addTo(editToolBar);
70         redo->addTo(editToolBar);
71 +       editToolBar->addSeparator();
72 +       quit->addTo(editToolBar);
73         
74         newkey->setEnabled(false);
75         del->setEnabled(false);
76 diff -Nurb b/src/mainwindowimpl.h n/src/mainwindowimpl.h
77 --- b/src/mainwindowimpl.h      2004-08-07 19:57:01.000000000 +0200
78 +++ n/src/mainwindowimpl.h      2004-11-13 17:45:45.894714000 +0100
79 @@ -57,6 +57,7 @@
80         QAction *reload;
81         QAction *del;
82         QAction *newkey;
83 +       QAction *quit;
84  };
85   
86  #endif
This page took 0.060221 seconds and 4 git commands to generate.