diff options
author | fluxgen <fluxgen> | 2003-12-17 00:43:22 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-17 00:43:22 (GMT) |
commit | 8294b04f5e044e1fa506cc1ce87f9c70e39d1ef4 (patch) | |
tree | f14a06a9428eceb09fac5d05ed4fdf6381a88037 /src/FbTk/Menu.cc | |
parent | 90ff80f89b990fcdf98d8c28b4d85a4420a8e213 (diff) | |
download | fluxbox_pavel-8294b04f5e044e1fa506cc1ce87f9c70e39d1ef4.zip fluxbox_pavel-8294b04f5e044e1fa506cc1ce87f9c70e39d1ef4.tar.bz2 |
using menu as observer, cleaning in menu theme
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r-- | src/FbTk/Menu.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 2ef5793..bb0b352 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Menu.cc,v 1.49 2003/12/16 17:06:51 fluxgen Exp $ | 25 | // $Id: Menu.cc,v 1.50 2003/12/17 00:43:22 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -63,7 +63,6 @@ Menu::Menu(MenuTheme &tm, ImageControl &imgctrl): | |||
63 | m_screen_height(DisplayHeight(FbTk::App::instance()->display(), tm.screenNum())), | 63 | m_screen_height(DisplayHeight(FbTk::App::instance()->display(), tm.screenNum())), |
64 | m_alignment(ALIGNDONTCARE), | 64 | m_alignment(ALIGNDONTCARE), |
65 | m_border_width(0), | 65 | m_border_width(0), |
66 | m_themeobserver(*this), | ||
67 | m_need_update(true) { | 66 | m_need_update(true) { |
68 | 67 | ||
69 | // setup timers | 68 | // setup timers |
@@ -78,7 +77,7 @@ Menu::Menu(MenuTheme &tm, ImageControl &imgctrl): | |||
78 | m_hide_timer.fireOnce(true); | 77 | m_hide_timer.fireOnce(true); |
79 | 78 | ||
80 | // make sure we get updated when the theme is reloaded | 79 | // make sure we get updated when the theme is reloaded |
81 | tm.addListener(m_themeobserver); | 80 | tm.reconfigSig().attach(this); |
82 | 81 | ||
83 | title_vis = | 82 | title_vis = |
84 | movable = | 83 | movable = |
@@ -1188,7 +1187,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) { | |||
1188 | // setup show menu timer | 1187 | // setup show menu timer |
1189 | timeval timeout; | 1188 | timeval timeout; |
1190 | timeout.tv_sec = 0; | 1189 | timeout.tv_sec = 0; |
1191 | timeout.tv_usec = theme().delayOpen(); | 1190 | timeout.tv_usec = theme().delayOpen() * 1000; // transformed to usec |
1192 | m_submenu_timer.setTimeout(timeout); | 1191 | m_submenu_timer.setTimeout(timeout); |
1193 | m_submenu_timer.start(); | 1192 | m_submenu_timer.start(); |
1194 | 1193 | ||
@@ -1400,7 +1399,7 @@ void Menu::closeMenu() { | |||
1400 | void Menu::startHide() { | 1399 | void Menu::startHide() { |
1401 | timeval timeout; | 1400 | timeval timeout; |
1402 | timeout.tv_sec = 0; | 1401 | timeout.tv_sec = 0; |
1403 | timeout.tv_usec = theme().delayClose(); | 1402 | timeout.tv_usec = theme().delayClose() * 1000; // transformed to usec |
1404 | m_hide_timer.setTimeout(timeout); | 1403 | m_hide_timer.setTimeout(timeout); |
1405 | m_hide_timer.start(); | 1404 | m_hide_timer.start(); |
1406 | } | 1405 | } |