all repos — fluxbox @ ac7edef9ad73818435420479a0dfa9c5ed517a79

custom fork of the fluxbox windowmanager

make sure all menus have titles, make -version go to stdout
rathnor rathnor
commit

ac7edef9ad73818435420479a0dfa9c5ed517a79

parent

9ca1f367cb9eef78ee1871fe5b96298f8325d987

M ChangeLogChangeLog

@@ -1,6 +1,9 @@

(Format: Year/Month/Day) Changes for 0.9.5: *03/07/25: + * Make sure all the menus have titles, make -version go to stdout (Simon) + Screen.cc Slit.cc Toolbar.cc ToolbarHandler.cc Xinerama.hh + Workspace.cc main.cc * Fix pesky crash and phantom icons (diesig wasn't getting through) (Simon) ToolbarHandler.cc *03/07/24:
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.206 2003/07/20 08:12:36 rathnor Exp $ +// $Id: Screen.cc,v 1.207 2003/07/25 10:03:55 rathnor Exp $ #include "Screen.hh"

@@ -145,11 +145,14 @@

return -1; } -FbTk::Menu *createMenuFromScreen(BScreen &screen) { +FbTk::Menu *createMenuFromScreen(BScreen &screen, const char *label = 0) { FbTk::Menu *menu = new FbMenu(*screen.menuTheme(), screen.screenNumber(), screen.imageControl(), *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())); + if (label) + menu->setLabel(label); + return menu; }

@@ -412,7 +415,8 @@ //!! TODO: we shouldn't do this more than once, but since slit handles their

// own resources we must do this. fluxbox->load_rc(*this); - m_configmenu.reset(createMenuFromScreen(*this)); + // TODO: nls + m_configmenu.reset(createMenuFromScreen(*this, "Configuration")); setupConfigmenu(*m_configmenu.get()); m_configmenu->setInternalMenu();

@@ -1849,7 +1853,9 @@ FbTk::RefCount<FbTk::Command> save_and_reconfigure(s_a_reconf_macro);

// create focus menu // we don't set this to internal menu so will // be deleted toghether with the parent - FbTk::Menu *focus_menu = createMenuFromScreen(*this); + const char *focusmenu_label = i18n->getMessage(ConfigmenuSet, ConfigmenuFocusModel, + "Focus Model"); + FbTk::Menu *focus_menu = createMenuFromScreen(*this, focusmenu_label); focus_menu->insert(new FocusModelMenuItem(i18n->getMessage( ConfigmenuSet,

@@ -1881,10 +1887,7 @@ save_and_reconfigure));

focus_menu->update(); - menu.insert(i18n->getMessage( - ConfigmenuSet, ConfigmenuFocusModel, - "Focus Model"), - focus_menu); + menu.insert(focusmenu_label, focus_menu); #ifdef SLIT if (slit() != 0) { slit()->menu().setInternalMenu();
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.74 2003/07/23 10:42:12 fluxgen Exp $ +// $Id: Slit.cc,v 1.75 2003/07/25 10:03:55 rathnor Exp $ #include "Slit.hh"

@@ -314,6 +314,10 @@ screen().screenNumber()));

m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer)); moveToLayer((*m_rc_layernum).getNum()); + + // TODO: nls + if (m_layermenu.get()) + m_layermenu->setLabel("Slit Layer"); // Get client list for sorting purposes loadClientList(filename);

@@ -1219,12 +1223,14 @@ m_slitmenu.insert("Layer...", m_layermenu.get());

#ifdef XINERAMA if (screen().hasXinerama()) { + // TODO: nls (main label, plus menu heading) m_slitmenu.insert("On Head...", new XineramaHeadMenu<Slit>( *screen().menuTheme(), screen(), screen().imageControl(), *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), - *this + *this, + "Slit on Head" )); }
M src/Toolbar.ccsrc/Toolbar.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.102 2003/07/19 11:55:49 rathnor Exp $ +// $Id: Toolbar.cc,v 1.103 2003/07/25 10:03:55 rathnor Exp $ #include "Toolbar.hh"

@@ -283,6 +283,10 @@ // listen to screen reconfigure

screen().reconfigureSig().attach(&m_themelistener); moveToLayer((*m_rc_layernum).getNum()); + + // TODO: nls + m_layermenu.setLabel("Toolbar Layer"); + m_placementmenu.setLabel("Toolbar Placement"); m_layermenu.setInternalMenu(); m_placementmenu.setInternalMenu();

@@ -1392,12 +1396,14 @@ reconfig_toolbar_and_save_resource));

menu.insert("Layer...", &tbar.layermenu()); if (tbar.screen().hasXinerama()) { + // TODO: nls (main label plus menu heading menu.insert("On Head...", new XineramaHeadMenu<Toolbar>( *tbar.screen().menuTheme(), tbar.screen(), tbar.screen().imageControl(), *tbar.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), - tbar + tbar, + "Toolbar on Head" )); }
M src/ToolbarHandler.ccsrc/ToolbarHandler.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ToolbarHandler.cc,v 1.25 2003/07/25 08:46:51 rathnor Exp $ +// $Id: ToolbarHandler.cc,v 1.26 2003/07/25 10:03:55 rathnor Exp $ /** * The ToolbarHandler class acts as a rough interface to the toolbar.

@@ -117,6 +117,9 @@ void setupModeMenu(FbTk::Menu &menu, ToolbarHandler &handler) {

//I18n *i18n = I18n::instance(); //using namespace FBNLS; using namespace FbTk; + + // TODO: nls + menu.setLabel("Toolbar Mode"); RefCount<Command> saverc_cmd(new SimpleCommand<Fluxbox>( *Fluxbox::instance(),
M src/Workspace.ccsrc/Workspace.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.76 2003/06/24 18:34:01 fluxgen Exp $ +// $Id: Workspace.cc,v 1.77 2003/07/25 10:03:55 rathnor Exp $ #include "Workspace.hh"

@@ -131,6 +131,7 @@ m_cascade_x[i] = 32 + scrn.getHeadX(i);

m_cascade_y[i] = 32 + scrn.getHeadY(i); } m_clientmenu.setInternalMenu(); + setName(name); }
M src/Xinerama.hhsrc/Xinerama.hh

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Xinerama.hh,v 1.4 2003/07/19 11:55:49 rathnor Exp $ +// $Id: Xinerama.hh,v 1.5 2003/07/25 10:03:55 rathnor Exp $ #ifndef XINERAMA_HH #define XINERAMA_HH

@@ -65,7 +65,7 @@ template <typename ItemType>

class XineramaHeadMenu : public FbMenu { public: XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, - FbTk::XLayer &layer, ItemType &item); + FbTk::XLayer &layer, ItemType &item, const char * title); private: ItemType &m_object;

@@ -74,11 +74,12 @@

template <typename ItemType> XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, - FbTk::XLayer &layer, ItemType &item): + FbTk::XLayer &layer, ItemType &item, const char * title = 0): FbMenu(tm, screen.screenNumber(), imgctrl, layer), m_object(item) { - + if (title) + setLabel(title); FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( *Fluxbox::instance(), &Fluxbox::save_rc));
M src/main.ccsrc/main.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: main.cc,v 1.21 2003/07/18 15:44:36 rathnor Exp $ +// $Id: main.cc,v 1.22 2003/07/25 10:03:55 rathnor Exp $ #include "fluxbox.hh" #include "I18n.hh"

@@ -176,7 +176,7 @@ perror("putenv()");

} } else if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) { // print current version string - cerr<<"Fluxbox "<<__fluxbox_version<<" : (c) 2001-2003 Henrik Kinnunen "<<endl<<endl; + cout<<"Fluxbox "<<__fluxbox_version<<" : (c) 2001-2003 Henrik Kinnunen "<<endl<<endl; exit(0); } else if (strcmp(argv[i], "-log") == 0 ) { if (i + 1 >= argc) {