]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/opie-console/opie-console-1.2.1/1686-bugfix.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / opie-console / opie-console-1.2.1 / 1686-bugfix.patch
1 Index: emulation_handler.cpp
2 ===================================================================
3 RCS file: /cvs/opie/noncore/apps/opie-console/emulation_handler.cpp,v
4 retrieving revision 1.25
5 retrieving revision 1.26
6 diff -u -u -r1.25 -r1.26
7 --- opie-console/emulation_handler.cpp  11 Jun 2005 12:22:32 -0000      1.25
8 +++ opie-console/emulation_handler.cpp  12 Oct 2005 21:05:47 -0000      1.26
9 @@ -250,3 +250,6 @@
10    m_teWid->setWrapAt(columns);
11  }
12  
13 +void EmulationHandler::setScrollbarLocation(int index) {
14 +  m_teWid->setScrollbarLocation(index);
15 +}
16 Index: emulation_handler.h
17 ===================================================================
18 RCS file: /cvs/opie/noncore/apps/opie-console/emulation_handler.h,v
19 retrieving revision 1.8
20 retrieving revision 1.9
21 diff -u -u -r1.8 -r1.9
22 --- opie-console/emulation_handler.h    8 Oct 2004 20:03:40 -0000       1.8
23 +++ opie-console/emulation_handler.h    12 Oct 2005 21:05:47 -0000      1.9
24 @@ -83,6 +83,7 @@
25  
26         /* Propagate change to widget */
27         void setWrap(int columns);
28 +       void setScrollbarLocation(int index);
29  signals:
30      void send( const QByteArray& );
31      void changeSize(int rows, int cols );
32 Index: mainwindow.cpp
33 ===================================================================
34 RCS file: /cvs/opie/noncore/apps/opie-console/mainwindow.cpp,v
35 retrieving revision 1.94
36 retrieving revision 1.95
37 diff -u -u -r1.94 -r1.95
38 --- opie-console/mainwindow.cpp 16 May 2005 18:56:02 -0000      1.94
39 +++ opie-console/mainwindow.cpp 12 Oct 2005 21:05:47 -0000      1.95
40 @@ -69,6 +69,7 @@
41      m_scripts = new QPopupMenu( this );
42      m_sessionsPop= new QPopupMenu( this );
43      m_scriptsPop = new QPopupMenu( this );
44 +    m_scrollbar = new QPopupMenu( this );
45  
46      /* add a toolbar for icons */
47      m_icons = new QToolBar(this);
48 @@ -164,6 +165,17 @@
49      connect( m_fullscreen, SIGNAL( activated() ),
50               this,  SLOT( slotFullscreen() ) );
51  
52 +       /*
53 +        * scrollbar
54 +        */
55 +    sm_none = m_scrollbar->insertItem(tr( "None" ));
56 +    sm_left = m_scrollbar->insertItem(tr( "Left" ));
57 +    sm_right = m_scrollbar->insertItem(tr( "Right" ));
58 +
59 +    m_console->insertItem(tr("Scrollbar"), m_scrollbar, -1, 0);
60 +    connect( m_scrollbar, SIGNAL(activated(int)),
61 +                        this, SLOT(slotScrollbarSelected(int)));
62 +
63      m_console->insertSeparator();
64  
65         m_recordLog = new QAction();
66 @@ -693,6 +705,35 @@
67      m_isFullscreen = !m_isFullscreen;
68  }
69  
70 +void MainWindow::slotScrollbarSelected(int index)
71 +{
72 +       int loc;
73 +
74 +    Config cfg( "Konsole" );
75 +    cfg.setGroup("ScrollBar");
76 +    if(index == sm_none)
77 +    {
78 +               loc = 0;
79 +    }
80 +    else if(index == sm_left)
81 +    {
82 +               loc = 1;
83 +    }
84 +    else if(index == sm_right)
85 +    {
86 +               loc = 2;
87 +    }
88 +       
89 +       cfg.writeEntry("Position", loc);
90 +
91 +    if (currentSession()) {
92 +        currentSession()->emulationHandler()->setScrollbarLocation(loc);
93 +    }
94 +
95 +    m_scrollbar->setItemChecked(sm_none, index == sm_none);
96 +    m_scrollbar->setItemChecked(sm_left, index == sm_left);
97 +    m_scrollbar->setItemChecked(sm_right, index == sm_right);
98 +}
99  
100  void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) {
101  
102 Index: mainwindow.h
103 ===================================================================
104 RCS file: /cvs/opie/noncore/apps/opie-console/mainwindow.h,v
105 retrieving revision 1.29
106 retrieving revision 1.30
107 diff -u -u -r1.29 -r1.30
108 --- opie-console/mainwindow.h   8 Oct 2004 20:03:40 -0000       1.29
109 +++ opie-console/mainwindow.h   12 Oct 2005 21:05:47 -0000      1.30
110 @@ -24,6 +24,7 @@
111  class FKey;
112  class DocLnk;
113  
114 +
115  class MainWindow : public QMainWindow {
116      Q_OBJECT
117  public:
118 @@ -75,6 +76,7 @@
119      void slotKeyReceived(FKey, ushort, ushort, bool);
120      void slotSaveHistory();
121      void slotSaveLog();
122 +    void slotScrollbarSelected(int);
123  
124      /* what could these both slot do? */
125      void slotCopy();
126 @@ -105,6 +107,12 @@
127      MetaFactory* m_factory;
128      ProfileManager* m_manager;
129  
130 +       /*
131 +        * scrollbar
132 +        */
133 +
134 +    int sm_none, sm_left, sm_right;
135 +       
136      TabWidget* m_consoleWindow;
137      QToolBar* m_tool;
138      QToolBar* m_icons;
139 @@ -115,6 +123,7 @@
140      QPopupMenu* m_sessionsPop;
141      QPopupMenu* m_scriptsPop;
142      QPopupMenu* m_scripts;
143 +    QPopupMenu* m_scrollbar;
144      QAction* m_connect;
145      QAction* m_disconnect;
146      QAction* m_quickLaunch;