aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-07-25 10:03:55 (GMT)
committerrathnor <rathnor>2003-07-25 10:03:55 (GMT)
commitac7edef9ad73818435420479a0dfa9c5ed517a79 (patch)
tree4fd531858253a00bd36689153e6c83c65890df39 /src
parent9ca1f367cb9eef78ee1871fe5b96298f8325d987 (diff)
downloadfluxbox-ac7edef9ad73818435420479a0dfa9c5ed517a79.zip
fluxbox-ac7edef9ad73818435420479a0dfa9c5ed517a79.tar.bz2
make sure all menus have titles, make -version go to stdout
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc19
-rw-r--r--src/Slit.cc10
-rw-r--r--src/Toolbar.cc10
-rw-r--r--src/ToolbarHandler.cc5
-rw-r--r--src/Workspace.cc3
-rw-r--r--src/Xinerama.hh9
-rw-r--r--src/main.cc4
7 files changed, 40 insertions, 20 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 35added..880d769 100644
--- a/src/Screen.cc
+++ b/src/Screen.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: Screen.cc,v 1.206 2003/07/20 08:12:36 rathnor Exp $ 25// $Id: Screen.cc,v 1.207 2003/07/25 10:03:55 rathnor Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -145,11 +145,14 @@ int anotherWMRunning(Display *display, XErrorEvent *) {
145 return -1; 145 return -1;
146} 146}
147 147
148FbTk::Menu *createMenuFromScreen(BScreen &screen) { 148FbTk::Menu *createMenuFromScreen(BScreen &screen, const char *label = 0) {
149 FbTk::Menu *menu = new FbMenu(*screen.menuTheme(), 149 FbTk::Menu *menu = new FbMenu(*screen.menuTheme(),
150 screen.screenNumber(), 150 screen.screenNumber(),
151 screen.imageControl(), 151 screen.imageControl(),
152 *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())); 152 *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()));
153 if (label)
154 menu->setLabel(label);
155
153 return menu; 156 return menu;
154} 157}
155 158
@@ -412,7 +415,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
412 // own resources we must do this. 415 // own resources we must do this.
413 fluxbox->load_rc(*this); 416 fluxbox->load_rc(*this);
414 417
415 m_configmenu.reset(createMenuFromScreen(*this)); 418 // TODO: nls
419 m_configmenu.reset(createMenuFromScreen(*this, "Configuration"));
416 setupConfigmenu(*m_configmenu.get()); 420 setupConfigmenu(*m_configmenu.get());
417 m_configmenu->setInternalMenu(); 421 m_configmenu->setInternalMenu();
418 422
@@ -1849,7 +1853,9 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1849 // create focus menu 1853 // create focus menu
1850 // we don't set this to internal menu so will 1854 // we don't set this to internal menu so will
1851 // be deleted toghether with the parent 1855 // be deleted toghether with the parent
1852 FbTk::Menu *focus_menu = createMenuFromScreen(*this); 1856 const char *focusmenu_label = i18n->getMessage(ConfigmenuSet, ConfigmenuFocusModel,
1857 "Focus Model");
1858 FbTk::Menu *focus_menu = createMenuFromScreen(*this, focusmenu_label);
1853 1859
1854 focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( 1860 focus_menu->insert(new FocusModelMenuItem(i18n->getMessage(
1855 ConfigmenuSet, 1861 ConfigmenuSet,
@@ -1881,10 +1887,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1881 1887
1882 focus_menu->update(); 1888 focus_menu->update();
1883 1889
1884 menu.insert(i18n->getMessage( 1890 menu.insert(focusmenu_label, focus_menu);
1885 ConfigmenuSet, ConfigmenuFocusModel,
1886 "Focus Model"),
1887 focus_menu);
1888#ifdef SLIT 1891#ifdef SLIT
1889 if (slit() != 0) { 1892 if (slit() != 0) {
1890 slit()->menu().setInternalMenu(); 1893 slit()->menu().setInternalMenu();
diff --git a/src/Slit.cc b/src/Slit.cc
index 18a4c31..8b03749 100644
--- a/src/Slit.cc
+++ b/src/Slit.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: Slit.cc,v 1.74 2003/07/23 10:42:12 fluxgen Exp $ 25// $Id: Slit.cc,v 1.75 2003/07/25 10:03:55 rathnor Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -315,6 +315,10 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
315 m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer)); 315 m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer));
316 moveToLayer((*m_rc_layernum).getNum()); 316 moveToLayer((*m_rc_layernum).getNum());
317 317
318 // TODO: nls
319 if (m_layermenu.get())
320 m_layermenu->setLabel("Slit Layer");
321
318 // Get client list for sorting purposes 322 // Get client list for sorting purposes
319 loadClientList(filename); 323 loadClientList(filename);
320 324
@@ -1219,12 +1223,14 @@ void Slit::setupMenu() {
1219 1223
1220#ifdef XINERAMA 1224#ifdef XINERAMA
1221 if (screen().hasXinerama()) { 1225 if (screen().hasXinerama()) {
1226 // TODO: nls (main label, plus menu heading)
1222 m_slitmenu.insert("On Head...", new XineramaHeadMenu<Slit>( 1227 m_slitmenu.insert("On Head...", new XineramaHeadMenu<Slit>(
1223 *screen().menuTheme(), 1228 *screen().menuTheme(),
1224 screen(), 1229 screen(),
1225 screen().imageControl(), 1230 screen().imageControl(),
1226 *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), 1231 *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
1227 *this 1232 *this,
1233 "Slit on Head"
1228 )); 1234 ));
1229 } 1235 }
1230 1236
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 251d8dd..409181b 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.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: Toolbar.cc,v 1.102 2003/07/19 11:55:49 rathnor Exp $ 25// $Id: Toolbar.cc,v 1.103 2003/07/25 10:03:55 rathnor Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -284,6 +284,10 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
284 284
285 moveToLayer((*m_rc_layernum).getNum()); 285 moveToLayer((*m_rc_layernum).getNum());
286 286
287 // TODO: nls
288 m_layermenu.setLabel("Toolbar Layer");
289 m_placementmenu.setLabel("Toolbar Placement");
290
287 m_layermenu.setInternalMenu(); 291 m_layermenu.setInternalMenu();
288 m_placementmenu.setInternalMenu(); 292 m_placementmenu.setInternalMenu();
289 setupMenus(); 293 setupMenus();
@@ -1392,12 +1396,14 @@ void Toolbar::setupMenus() {
1392 menu.insert("Layer...", &tbar.layermenu()); 1396 menu.insert("Layer...", &tbar.layermenu());
1393 1397
1394 if (tbar.screen().hasXinerama()) { 1398 if (tbar.screen().hasXinerama()) {
1399 // TODO: nls (main label plus menu heading
1395 menu.insert("On Head...", new XineramaHeadMenu<Toolbar>( 1400 menu.insert("On Head...", new XineramaHeadMenu<Toolbar>(
1396 *tbar.screen().menuTheme(), 1401 *tbar.screen().menuTheme(),
1397 tbar.screen(), 1402 tbar.screen(),
1398 tbar.screen().imageControl(), 1403 tbar.screen().imageControl(),
1399 *tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), 1404 *tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
1400 tbar 1405 tbar,
1406 "Toolbar on Head"
1401 )); 1407 ));
1402 } 1408 }
1403 1409
diff --git a/src/ToolbarHandler.cc b/src/ToolbarHandler.cc
index d5682e9..6a3cd0b 100644
--- a/src/ToolbarHandler.cc
+++ b/src/ToolbarHandler.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: ToolbarHandler.cc,v 1.25 2003/07/25 08:46:51 rathnor Exp $ 23// $Id: ToolbarHandler.cc,v 1.26 2003/07/25 10:03:55 rathnor Exp $
24 24
25/** 25/**
26 * The ToolbarHandler class acts as a rough interface to the toolbar. 26 * The ToolbarHandler class acts as a rough interface to the toolbar.
@@ -118,6 +118,9 @@ void setupModeMenu(FbTk::Menu &menu, ToolbarHandler &handler) {
118 //using namespace FBNLS; 118 //using namespace FBNLS;
119 using namespace FbTk; 119 using namespace FbTk;
120 120
121 // TODO: nls
122 menu.setLabel("Toolbar Mode");
123
121 RefCount<Command> saverc_cmd(new SimpleCommand<Fluxbox>( 124 RefCount<Command> saverc_cmd(new SimpleCommand<Fluxbox>(
122 *Fluxbox::instance(), 125 *Fluxbox::instance(),
123 &Fluxbox::save_rc)); 126 &Fluxbox::save_rc));
diff --git a/src/Workspace.cc b/src/Workspace.cc
index 0628492..6b59a59 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.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: Workspace.cc,v 1.76 2003/06/24 18:34:01 fluxgen Exp $ 25// $Id: Workspace.cc,v 1.77 2003/07/25 10:03:55 rathnor Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -131,6 +131,7 @@ Workspace::Workspace(BScreen &scrn, FbTk::MultLayers &layermanager,
131 m_cascade_y[i] = 32 + scrn.getHeadY(i); 131 m_cascade_y[i] = 32 + scrn.getHeadY(i);
132 } 132 }
133 m_clientmenu.setInternalMenu(); 133 m_clientmenu.setInternalMenu();
134 setName(name);
134} 135}
135 136
136 137
diff --git a/src/Xinerama.hh b/src/Xinerama.hh
index 8bbd3d1..99c8705 100644
--- a/src/Xinerama.hh
+++ b/src/Xinerama.hh
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: Xinerama.hh,v 1.4 2003/07/19 11:55:49 rathnor Exp $ 23// $Id: Xinerama.hh,v 1.5 2003/07/25 10:03:55 rathnor Exp $
24 24
25#ifndef XINERAMA_HH 25#ifndef XINERAMA_HH
26#define XINERAMA_HH 26#define XINERAMA_HH
@@ -65,7 +65,7 @@ template <typename ItemType>
65class XineramaHeadMenu : public FbMenu { 65class XineramaHeadMenu : public FbMenu {
66public: 66public:
67 XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, 67 XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl,
68 FbTk::XLayer &layer, ItemType &item); 68 FbTk::XLayer &layer, ItemType &item, const char * title);
69 69
70private: 70private:
71 ItemType &m_object; 71 ItemType &m_object;
@@ -74,11 +74,12 @@ private:
74 74
75template <typename ItemType> 75template <typename ItemType>
76XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, 76XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl,
77 FbTk::XLayer &layer, ItemType &item): 77 FbTk::XLayer &layer, ItemType &item, const char * title = 0):
78 FbMenu(tm, screen.screenNumber(), imgctrl, layer), 78 FbMenu(tm, screen.screenNumber(), imgctrl, layer),
79 m_object(item) 79 m_object(item)
80{ 80{
81 81 if (title)
82 setLabel(title);
82 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( 83 FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>(
83 *Fluxbox::instance(), 84 *Fluxbox::instance(),
84 &Fluxbox::save_rc)); 85 &Fluxbox::save_rc));
diff --git a/src/main.cc b/src/main.cc
index 7a82857..ecaff6a 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: main.cc,v 1.21 2003/07/18 15:44:36 rathnor Exp $ 23// $Id: main.cc,v 1.22 2003/07/25 10:03:55 rathnor Exp $
24 24
25#include "fluxbox.hh" 25#include "fluxbox.hh"
26#include "I18n.hh" 26#include "I18n.hh"
@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
176 } 176 }
177 } else if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) { 177 } else if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) {
178 // print current version string 178 // print current version string
179 cerr<<"Fluxbox "<<__fluxbox_version<<" : (c) 2001-2003 Henrik Kinnunen "<<endl<<endl; 179 cout<<"Fluxbox "<<__fluxbox_version<<" : (c) 2001-2003 Henrik Kinnunen "<<endl<<endl;
180 exit(0); 180 exit(0);
181 } else if (strcmp(argv[i], "-log") == 0 ) { 181 } else if (strcmp(argv[i], "-log") == 0 ) {
182 if (i + 1 >= argc) { 182 if (i + 1 >= argc) {