From: "php-coder" <php-coder@ngs.ru> To: community@altlinux.ru Subject: [Comm] menu-method & update-menus Date: Sun, 03 Oct 2004 16:09:22 +0700 Message-ID: <web-268856@mx1.intranet.ru> (raw) 0000100101011110100100101::03.10.2004::0110001001001000100111100100010 Привет, Linuxоиды! Разбираюсь с тем как составить правильный menu-method для Fluxbox. Вот возникло несколько вопросов: - Как сделать, чтобы меню начиналось не с ALT->(...), а сразу с основных пунктов? Т.е. самым первым, родительским пунктом должен быть не ALT, а чтобы сразу начинfлось с Офис, Игры и прочего? - Сейчас пункты в меню для иксовых прог генерируется так: x11= " [exec] (" title() ") {" $command "} <" $icon ">\n" В итоге я получаю, к примеру, это: [exec] (Abuse) {/usr/games/abuse} <abuse_sdl.png> Но! Во Fluxbox поддерживаются только иконки в формате xpm! Т.е. мне нужно каким-то образом проверить является ли иконка в нужном формате или нет и в зависимости от результата выводить ее или нет. Далее я, думаю, не нужно выводить каждый раз /usr/bin, /usr/X11R6/bin и /usr/games, так как они прописаны в $PATH. Как сие осуществить? Можно тупо применять ко всем stripdir($command), но этот вариант не подходит так как есть в меню (Change Password) {/usr/lib/userpasswd/loop}, который в $PATH не прописан и соответственно его "стрипать" нельзя! В $icon содержится только имя, а мне нужно указывать полный путь. Можно тупо добавлять к именам всех иконок /usr/share/icon/, но этот вариант не подходит, так как Xoard берет иконку из /usr/share/icons/mini В итоге мне требуется проверить, что содержится в $icon полный путь или только имя иконки. Написал так: ifelse(parent($icon), $icon, "/usr/share/icons/" $icon) Т.е. если путь к родительскому каталогу не пустая строка, то выводим $icon, иначе добавляем к имени иконки полный путь.. Проблема следующая: в сгенерированном коде появляется лишний слеш!!! [exec] (XBoard) {/usr/bin/xboard -size Small} <//usr/share/icons/mini/xboard.xpm> - Тут тоже лишний слеш откуда-то взялся: [c0der@mycomp ~]$ update-menus -v Update-menus[1760]: Dpkg not locking dpkg status area. Good.7 Update-menus[1760]: Reading installed packages... Update-menus[1760]: Reading translate info in /etc/menu-methods/translate_menus Update-menus[1760]: Reading menuentryfiles in /home/coder/.menu/ Update-menus[1760]: Reading menuentryfiles in /etc/menu/ Update-menus[1760]: Reading menuentryfiles in /usr/lib/menu/ Update-menus[1760]: Reading menuentryfiles in /usr/lib/menu/default/ Update-menus[1760]: Running menu-methods in /home/coder/.menu-methods/ Update-menus[1760]: Running method:/home/coder/.menu-methods//fluxbox ^^! Пожалуйста, помогите!!! THX -- С уважением, php-coder (mailto:php-coder[at]ngs[dot]ru) Registered Linux User #327594 ALT Linux Master 2.2 (kernel 2.4.27) 010010010010010001010101100::Linux RuleZz!::10001001000100010001000111 --------------------------------------------------------- http://mobile.ngs.ru/games - Java-игры для мобильников и не только... http://love.ngs.ru - Знакомства в Новосибирске
reply other threads:[~2004-10-03 9:09 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=web-268856@mx1.intranet.ru \ --to=php-coder@ngs.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git