aboutsummaryrefslogtreecommitdiff
path: root/src/SetWorkspaceName.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/SetWorkspaceName.cc')
-rw-r--r--src/SetWorkspaceName.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/SetWorkspaceName.cc b/src/SetWorkspaceName.cc
index 1127c3b..32187bb 100644
--- a/src/SetWorkspaceName.cc
+++ b/src/SetWorkspaceName.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: SetWorkspaceName.cc,v 1.1 2003/08/26 23:48:19 fluxgen Exp $ 22// $Id: SetWorkspaceName.cc,v 1.2 2003/08/27 18:05:12 fluxgen Exp $
23 23
24#include "SetWorkspaceName.hh" 24#include "SetWorkspaceName.hh"
25 25
@@ -43,8 +43,7 @@ SetWorkspaceName::SetWorkspaceName(BScreen &screen):
43 m_textbox(*this, m_font, screen.currentWorkspace()->name()), 43 m_textbox(*this, m_font, screen.currentWorkspace()->name()),
44 m_label(*this, m_font, "Set workspace name:"), 44 m_label(*this, m_font, "Set workspace name:"),
45 m_font("fixed"), 45 m_font("fixed"),
46 m_gc(XCreateGC(FbTk::App::instance()->display(), m_textbox.window(), 46 m_gc(m_textbox),
47 0, 0)),
48 m_screen(screen), 47 m_screen(screen),
49 m_move_x(0), 48 m_move_x(0),
50 m_move_y(0) { 49 m_move_y(0) {
@@ -58,12 +57,12 @@ SetWorkspaceName::SetWorkspaceName(BScreen &screen):
58 m_label.show(); 57 m_label.show();
59 58
60 m_textbox.setBackgroundColor(FbTk::Color("white", m_textbox.screenNumber())); 59 m_textbox.setBackgroundColor(FbTk::Color("white", m_textbox.screenNumber()));
61 XGCValues gc_val; 60
62 FbTk::Color black("black", m_textbox.screenNumber()); 61 FbTk::Color black("black", m_textbox.screenNumber());
63 gc_val.foreground = black.pixel(); 62 m_gc.setForeground(black);
64 XChangeGC(FbTk::App::instance()->display(), m_gc, 63
65 GCForeground, &gc_val); 64 m_textbox.setGC(m_gc.gc());
66 m_textbox.setGC(m_gc); 65
67 m_textbox.moveResize(0, m_label.height(), 66 m_textbox.moveResize(0, m_label.height(),
68 200, m_font.height() + 2); 67 200, m_font.height() + 2);
69 m_textbox.show(); 68 m_textbox.show();
@@ -80,9 +79,6 @@ SetWorkspaceName::SetWorkspaceName(BScreen &screen):
80 79
81SetWorkspaceName::~SetWorkspaceName() { 80SetWorkspaceName::~SetWorkspaceName() {
82 FbTk::EventManager::instance()->remove(*this); 81 FbTk::EventManager::instance()->remove(*this);
83 if (m_gc)
84 XFreeGC(FbTk::App::instance()->display(), m_gc);
85
86 hide(); 82 hide();
87} 83}
88 84