[emptybox] Remove

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-28 12:03:11 +02:00
parent bc0f8cc178
commit 26621fd598
4 changed files with 0 additions and 96 deletions

View file

@ -34,7 +34,6 @@ WIDGETS += widgets/focusicon.c
WIDGETS += widgets/progressbar.c WIDGETS += widgets/progressbar.c
WIDGETS += widgets/tasklist.c WIDGETS += widgets/tasklist.c
WIDGETS += widgets/graph.c WIDGETS += widgets/graph.c
WIDGETS += widgets/emptybox.c
WIDGETS += widgets/common.c widgets/common.h WIDGETS += widgets/common.c widgets/common.h

View file

@ -319,23 +319,6 @@ cfg_opt_t widget_textbox_opts[] =
CFG_ALIGNMENT((char *) "text_align", (char *) "center", CFGF_NONE), CFG_ALIGNMENT((char *) "text_align", (char *) "center", CFGF_NONE),
CFG_AWESOME_END() CFG_AWESOME_END()
}; };
/** This section defines emptybox widget options. */
cfg_opt_t widget_emptybox_opts[] =
{
/** X coordinate, do not set for auto. */
CFG_INT((char *) "x", 0xffffffff, CFGF_NONE),
/** Y coordinate, do not set for auto. */
CFG_INT((char *) "y", 0xffffffff, CFGF_NONE),
/** Widget alignment. */
CFG_ALIGNMENT((char *) "align", (char *) "auto", CFGF_NONE),
/** Mouse bindings. */
CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI),
/** Widget width. Set to 0 for auto. */
CFG_INT((char *) "width", 0, CFGF_NONE),
/** Style to use for drawing. */
CFG_SEC((char *) "style", style_opts, CFGF_NONE),
CFG_AWESOME_END()
};
/** This section defines tasklist widget options */ /** This section defines tasklist widget options */
cfg_opt_t widget_tasklist_opts[] = cfg_opt_t widget_tasklist_opts[] =
{ {
@ -460,8 +443,6 @@ cfg_opt_t statusbar_opts[] =
CFG_INT((char *) "width", 0, CFGF_NONE), CFG_INT((char *) "width", 0, CFGF_NONE),
/** Textbox widget(s). */ /** Textbox widget(s). */
CFG_SEC((char *) "textbox", widget_textbox_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), CFG_SEC((char *) "textbox", widget_textbox_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES),
/** Emptybox widget(s). */
CFG_SEC((char *) "emptybox", widget_emptybox_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES),
/** Taglist widget(s). */ /** Taglist widget(s). */
CFG_SEC((char *) "taglist", widget_taglist_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES), CFG_SEC((char *) "taglist", widget_taglist_opts, CFGF_TITLE | CFGF_MULTI | CFGF_NO_TITLE_DUPES),
/** Layoutinfo widget(s). */ /** Layoutinfo widget(s). */
@ -748,7 +729,6 @@ cfg_new(void)
cfg_set_validate_func(cfg, "rules|rule|titlebar|height", config_validate_unsigned_int); cfg_set_validate_func(cfg, "rules|rule|titlebar|height", config_validate_unsigned_int);
cfg_set_validate_func(cfg, "rules|rule|screen", config_validate_unsigned_int); cfg_set_validate_func(cfg, "rules|rule|screen", config_validate_unsigned_int);
cfg_set_validate_func(cfg, "screen|statusbar|textbox|width", config_validate_unsigned_int); cfg_set_validate_func(cfg, "screen|statusbar|textbox|width", config_validate_unsigned_int);
cfg_set_validate_func(cfg, "screen|statusbar|emptybox|width", config_validate_unsigned_int);
cfg_set_validate_func(cfg, "screen|statusbar|graph|width", config_validate_unsigned_int); cfg_set_validate_func(cfg, "screen|statusbar|graph|width", config_validate_unsigned_int);
cfg_set_validate_func(cfg, "screen|statusbar|progressbar|width", config_validate_unsigned_int); cfg_set_validate_func(cfg, "screen|statusbar|progressbar|width", config_validate_unsigned_int);
cfg_set_validate_func(cfg, "screen|statusbar|progressbar|border_width", config_validate_unsigned_int); cfg_set_validate_func(cfg, "screen|statusbar|progressbar|border_width", config_validate_unsigned_int);

View file

@ -42,7 +42,6 @@ void widget_common_new(widget_t*, statusbar_t *, cfg_t *);
WidgetConstructor layoutinfo_new; WidgetConstructor layoutinfo_new;
WidgetConstructor taglist_new; WidgetConstructor taglist_new;
WidgetConstructor textbox_new; WidgetConstructor textbox_new;
WidgetConstructor emptybox_new;
WidgetConstructor iconbox_new; WidgetConstructor iconbox_new;
WidgetConstructor focusicon_new; WidgetConstructor focusicon_new;
WidgetConstructor progressbar_new; WidgetConstructor progressbar_new;

View file

@ -1,74 +0,0 @@
/*
* emptybox.c - empty widget
*
* Copyright © 2008 Julien Danjou <julien@danjou.info>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#include "widget.h"
#include "common/configopts.h"
extern AwesomeConf globalconf;
typedef struct
{
style_t style;
} Data;
static int
emptybox_draw(widget_t *widget, DrawCtx *ctx, int offset,
int used __attribute__ ((unused)))
{
Data *d = widget->data;
if(!widget->user_supplied_x)
widget->area.x = widget_calculate_offset(widget->statusbar->width,
widget->area.width,
offset,
widget->alignment);
if(!widget->user_supplied_y)
widget->area.y = 0;
draw_rectangle(ctx, widget->area, 1.0, true, d->style.bg);
return widget->area.width;
}
widget_t *
emptybox_new(statusbar_t *statusbar, cfg_t *config)
{
widget_t *w;
Data *d;
w = p_new(widget_t, 1);
widget_common_new(w, statusbar, config);
w->draw = emptybox_draw;
w->alignment = cfg_getalignment(config, "align");
w->data = d = p_new(Data, 1);
draw_style_init(globalconf.connection, statusbar->phys_screen,
cfg_getsec(config, "style"),
&d->style,
&globalconf.screens[statusbar->screen].styles.normal);
w->area.width = cfg_getint(config, "width");
w->area.height = statusbar->height;
return w;
}
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80