aboutsummaryrefslogtreecommitdiff
path: root/src/Basemenu.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-01-06 11:07:42 (GMT)
committerfluxgen <fluxgen>2002-01-06 11:07:42 (GMT)
commit68d83ecc98409b3de783b3f213951018fd258a54 (patch)
tree4c0d1c9c7427208e84deaf368cee44637b23626f /src/Basemenu.cc
parentad3923a371d8f64a506cbaacb170a911be73093a (diff)
downloadfluxbox_pavel-68d83ecc98409b3de783b3f213951018fd258a54.zip
fluxbox_pavel-68d83ecc98409b3de783b3f213951018fd258a54.tar.bz2
Changed Misc::
Diffstat (limited to 'src/Basemenu.cc')
-rw-r--r--src/Basemenu.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Basemenu.cc b/src/Basemenu.cc
index 8ed35ef..bf031dd 100644
--- a/src/Basemenu.cc
+++ b/src/Basemenu.cc
@@ -33,6 +33,7 @@
33#include "fluxbox.hh" 33#include "fluxbox.hh"
34#include "Basemenu.hh" 34#include "Basemenu.hh"
35#include "Screen.hh" 35#include "Screen.hh"
36#include "StringUtil.hh"
36 37
37#ifdef HAVE_STDIO_H 38#ifdef HAVE_STDIO_H
38# include <stdio.h> 39# include <stdio.h>
@@ -197,8 +198,8 @@ Basemenu::~Basemenu(void) {
197int Basemenu::insert(const char *l, int function, const char *e, int pos) { 198int Basemenu::insert(const char *l, int function, const char *e, int pos) {
198 char *label = 0, *exec = 0; 199 char *label = 0, *exec = 0;
199 200
200 if (l) label = Misc::strdup(l); 201 if (l) label = StringUtil::strdup(l);
201 if (e) exec = Misc::strdup(e); 202 if (e) exec = StringUtil::strdup(e);
202 203
203 BasemenuItem *item = new BasemenuItem(label, function, exec); 204 BasemenuItem *item = new BasemenuItem(label, function, exec);
204 menuitems->insert(item, pos); 205 menuitems->insert(item, pos);
@@ -210,7 +211,7 @@ int Basemenu::insert(const char *l, int function, const char *e, int pos) {
210int Basemenu::insert(const char *l, Basemenu *submenu, int pos) { 211int Basemenu::insert(const char *l, Basemenu *submenu, int pos) {
211 char *label = 0; 212 char *label = 0;
212 213
213 if (l) label = Misc::strdup(l); 214 if (l) label = StringUtil::strdup(l);
214 215
215 BasemenuItem *item = new BasemenuItem(label, submenu); 216 BasemenuItem *item = new BasemenuItem(label, submenu);
216 menuitems->insert(item, pos); 217 menuitems->insert(item, pos);
@@ -507,11 +508,11 @@ void Basemenu::redrawTitle(void) {
507 l += (menu.bevel_w * 2); 508 l += (menu.bevel_w * 2);
508 509
509 switch (screen->getMenuStyle()->titlefont.justify) { 510 switch (screen->getMenuStyle()->titlefont.justify) {
510 case Misc::Font::RIGHT: 511 case DrawUtil::Font::RIGHT:
511 dx += menu.width - l; 512 dx += menu.width - l;
512 break; 513 break;
513 514
514 case Misc::Font::CENTER: 515 case DrawUtil::Font::CENTER:
515 dx += (menu.width - l) / 2; 516 dx += (menu.width - l) / 2;
516 break; 517 break;
517 default: 518 default:
@@ -644,11 +645,11 @@ void Basemenu::drawItem(int index, Bool highlight, Bool clear,
644 } 645 }
645 646
646 switch(screen->getMenuStyle()->framefont.justify) { 647 switch(screen->getMenuStyle()->framefont.justify) {
647 case Misc::Font::LEFT: 648 case DrawUtil::Font::LEFT:
648 text_x = item_x + menu.bevel_w + menu.item_h + 1; 649 text_x = item_x + menu.bevel_w + menu.item_h + 1;
649 break; 650 break;
650 651
651 case Misc::Font::RIGHT: 652 case DrawUtil::Font::RIGHT:
652 text_x = item_x + menu.item_w - (menu.item_h + menu.bevel_w + text_w); 653 text_x = item_x + menu.item_w - (menu.item_h + menu.bevel_w + text_w);
653 break; 654 break;
654 default: //center 655 default: //center
@@ -789,7 +790,7 @@ void Basemenu::setLabel(const char *l) {
789 if (menu.label) 790 if (menu.label)
790 delete [] menu.label; 791 delete [] menu.label;
791 792
792 if (l) menu.label = Misc::strdup(l); 793 if (l) menu.label = StringUtil::strdup(l);
793 else menu.label = 0; 794 else menu.label = 0;
794} 795}
795 796