From 3b013f90b1b83a5d134e86e86ca9358034b3f80b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 15 Dec 2007 16:25:54 +0100 Subject: [PATCH] cosmetic and don't cast for nothing --- widgets/focustitle.c | 2 +- widgets/taglist.c | 17 +++++++---------- widgets/textbox.c | 16 +++++++--------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/widgets/focustitle.c b/widgets/focustitle.c index 8cd5e3a5..265d82c2 100644 --- a/widgets/focustitle.c +++ b/widgets/focustitle.c @@ -38,7 +38,7 @@ focustitle_new(Statusbar *statusbar) { Widget *w; w = p_new(Widget, 1); - w->draw = (void*) focustitle_draw; + w->draw = focustitle_draw; w->statusbar = statusbar; w->name = name; w->alignment = AlignFlex; diff --git a/widgets/taglist.c b/widgets/taglist.c index 58d4f8ce..85e73c2c 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -22,15 +22,14 @@ isoccupied(TagClientLink *tc, int screen, Client *head, Tag *t) return False; } - static int taglist_draw(DrawCtx *ctx, - awesome_config *awesomeconf, - VirtScreen vscreen, - int screen, - int offset, - int used __attribute__ ((unused)), - int align __attribute__ ((unused))) + awesome_config *awesomeconf, + VirtScreen vscreen, + int screen, + int offset, + int used __attribute__ ((unused)), + int align __attribute__ ((unused))) { Tag *tag; Client *sel = awesomeconf->focus->client; @@ -65,17 +64,15 @@ taglist_draw(DrawCtx *ctx, return width; } - Widget * taglist_new(Statusbar *statusbar) { Widget *w; w = p_new(Widget, 1); - w->draw = (void*) taglist_draw; + w->draw = taglist_draw; w->statusbar = statusbar; w->name = name; return w; } - // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 diff --git a/widgets/textbox.c b/widgets/textbox.c index 505f0363..7e82acc0 100644 --- a/widgets/textbox.c +++ b/widgets/textbox.c @@ -1,17 +1,16 @@ #include "util.h" #include "widget.h" - static char name[] = "textbox"; static int textbox_draw(DrawCtx *ctx, - awesome_config *awesomeconf __attribute__ ((unused)), - VirtScreen vscreen, - int screen __attribute__ ((unused)), - int offset, - int used __attribute__ ((unused)), - int align) + awesome_config *awesomeconf __attribute__ ((unused)), + VirtScreen vscreen, + int screen __attribute__ ((unused)), + int offset, + int used __attribute__ ((unused)), + int align) { int width = textwidth(ctx, vscreen.font, vscreen.statustext); int location = calculate_offset(vscreen.statusbar.width, width, offset, align); @@ -20,13 +19,12 @@ textbox_draw(DrawCtx *ctx, return width; } - Widget * textbox_new(Statusbar *statusbar) { Widget *w; w = p_new(Widget, 1); - w->draw = (void*) textbox_draw; + w->draw = textbox_draw; w->statusbar = statusbar; w->name = name; return w;