all repos — fluxbox @ 7f6880bbac9ffec3b6221eb04e0977b9a9c669b7

custom fork of the fluxbox windowmanager

slit theme, which falls back on toolbar theme if it does not exist
fluxgen fluxgen
commit

7f6880bbac9ffec3b6221eb04e0977b9a9c669b7

parent

47d27a0bab8d6585d3031b7945c7ee6718f8d228

3 files changed, 27 insertions(+), 18 deletions(-)

jump to
M src/Slit.ccsrc/Slit.cc

@@ -19,7 +19,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.18 2002/07/23 17:11:59 fluxgen Exp $ +// $Id: Slit.cc,v 1.19 2002/07/23 18:38:31 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -408,7 +408,7 @@ XMapWindow(display, frame.window);

Pixmap tmp = frame.pixmap; BImageControl *image_ctrl = screen->getImageControl(); - FbTk::Texture *texture = &(screen->getToolbarStyle()->toolbar); + const FbTk::Texture *texture = &(screen->getTheme()->getSlitTexture()); if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { frame.pixmap = None; XSetWindowBackground(display, frame.window,
M src/Theme.ccsrc/Theme.cc

@@ -41,7 +41,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: Theme.cc,v 1.23 2002/07/23 17:11:59 fluxgen Exp $ +// $Id: Theme.cc,v 1.24 2002/07/23 18:38:31 fluxgen Exp $ #ifndef _GNU_SOURCE #define _GNU_SOURCE

@@ -286,7 +286,7 @@ if (!m_database)

m_database = XrmGetFileDatabase(DEFAULTSTYLE); loadMenuStyle(); - loadToolbarStyle(); + loadToolbarStyle(); loadWindowStyle(); loadTabStyle(); loadRootCommand();

@@ -665,7 +665,7 @@ #endif

} -void Theme::loadMisc(void) { +void Theme::loadMisc() { unsigned int screen_width_div2 = WidthOfScreen(ScreenOfDisplay(m_display, m_screennum)) / 2; XrmValue value; char *value_type=0;

@@ -705,6 +705,14 @@ m_frame_width = m_bevel_width;

readDatabaseColor("borderColor", "BorderColor", &m_border_color, BlackPixel(m_display, m_screennum)); + + // load slit style, if it wasn't found fall back to toolbarstyle + if (!readDatabaseTexture("slit", "Slit", + &m_slit_texture, + BlackPixel(m_display, m_screennum)) ) { + m_slit_texture = m_toolbarstyle.toolbar; + } + }

@@ -807,7 +815,7 @@ delete [] colortoname;

} if (!retval) - fprintf(stderr, "Faild in readTexture\n"); + cerr<<"Failed to load texture for: "<<rname<<endl; return retval; }
M src/Theme.hhsrc/Theme.hh

@@ -42,7 +42,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: Theme.hh,v 1.11 2002/07/23 17:11:59 fluxgen Exp $ +// $Id: Theme.hh,v 1.12 2002/07/23 18:38:31 fluxgen Exp $ #ifndef THEME_HH #define THEME_HH

@@ -111,16 +111,17 @@ GC l_text_gc, w_text_gc, c_text_gc, b_pic_gc;

DrawUtil::Font font; } ToolbarStyle; - - inline WindowStyle &getWindowStyle(void) { return m_windowstyle; } - inline MenuStyle &getMenuStyle(void) { return m_menustyle; } - inline ToolbarStyle &getToolbarStyle(void) { return m_toolbarstyle; } - inline unsigned int getBevelWidth(void) const { return m_bevel_width; } - inline unsigned int getBorderWidth(void) const { return m_border_width; } - inline unsigned int getHandleWidth(void) const { return m_handle_width; } - inline unsigned int getFrameWidth(void) const { return m_frame_width; } - inline const GC &getOpGC(void) const { return m_opgc; } - inline const FbTk::Color &getBorderColor(void) const { return m_border_color; } + + inline WindowStyle &getWindowStyle() { return m_windowstyle; } + inline MenuStyle &getMenuStyle() { return m_menustyle; } + inline ToolbarStyle &getToolbarStyle() { return m_toolbarstyle; } + inline const FbTk::Texture &getSlitTexture() const { return m_slit_texture; } + inline unsigned int getBevelWidth() const { return m_bevel_width; } + inline unsigned int getBorderWidth() const { return m_border_width; } + inline unsigned int getHandleWidth() const { return m_handle_width; } + inline unsigned int getFrameWidth() const { return m_frame_width; } + inline GC getOpGC() const { return m_opgc; } + inline const FbTk::Color &getBorderColor() const { return m_border_color; } void load(const char *filename); void reconfigure();

@@ -164,7 +165,7 @@ XrmDatabase m_database;

Colormap m_colormap; int m_screennum; std::string m_rootcommand; - + FbTk::Texture m_slit_texture; };