From 3919363aa32c911079502576f89794d270bbd972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Fri, 31 Jan 2014 20:07:56 +0100 Subject: [PATCH] Arguments not used in SetButtonAlphaImage The arguments for SetButtonAlphaImage() are not used, so can be removed to avoid compiler warnings. This patch removes these arguments, so the code in SetButtonAlphaImage(), not used, can be removed too. --- WPrefs.app/Appearance.c | 8 ++++---- WPrefs.app/WPrefs.c | 19 +++---------------- WPrefs.app/WPrefs.h | 3 +-- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index c9ff1820..3bd571a7 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -1688,7 +1688,7 @@ static void createPanel(Panel * p) WMSetButtonImagePosition(panel->newB, WIPAbove); WMSetButtonText(panel->newB, _("New")); WMSetButtonAction(panel->newB, newTexture, panel); - SetButtonAlphaImage(scr, panel->newB, TNEW_FILE, NULL, NULL); + SetButtonAlphaImage(scr, panel->newB, TNEW_FILE); WMSetBalloonTextForView(_("Create a new texture."), WMWidgetView(panel->newB)); @@ -1699,7 +1699,7 @@ static void createPanel(Panel * p) WMSetButtonImagePosition(panel->ripB, WIPAbove); WMSetButtonText(panel->ripB, _("Extract...")); WMSetButtonAction(panel->ripB, extractTexture, panel); - SetButtonAlphaImage(scr, panel->ripB, TEXTR_FILE, NULL, NULL); + SetButtonAlphaImage(scr, panel->ripB, TEXTR_FILE); WMSetBalloonTextForView(_("Extract texture(s) from a theme or a style file."), WMWidgetView(panel->ripB)); @@ -1711,7 +1711,7 @@ static void createPanel(Panel * p) WMSetButtonFont(panel->editB, font); WMSetButtonImagePosition(panel->editB, WIPAbove); WMSetButtonText(panel->editB, _("Edit")); - SetButtonAlphaImage(scr, panel->editB, TEDIT_FILE, NULL, NULL); + SetButtonAlphaImage(scr, panel->editB, TEDIT_FILE); WMSetButtonAction(panel->editB, editTexture, panel); WMSetBalloonTextForView(_("Edit the highlighted texture."), WMWidgetView(panel->editB)); @@ -1721,7 +1721,7 @@ static void createPanel(Panel * p) WMSetButtonFont(panel->delB, font); WMSetButtonImagePosition(panel->delB, WIPAbove); WMSetButtonText(panel->delB, _("Delete")); - SetButtonAlphaImage(scr, panel->delB, TDEL_FILE, NULL, NULL); + SetButtonAlphaImage(scr, panel->delB, TDEL_FILE); WMSetButtonEnabled(panel->delB, False); WMSetButtonAction(panel->delB, deleteTexture, panel); WMSetBalloonTextForView(_("Delete the highlighted texture."), WMWidgetView(panel->delB)); diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c index 138030f2..d788e068 100644 --- a/WPrefs.app/WPrefs.c +++ b/WPrefs.app/WPrefs.c @@ -448,7 +448,7 @@ static WMPixmap *makeTitledIcon(WMPixmap *icon) return WMRetainPixmap(icon); } -void SetButtonAlphaImage(WMScreen * scr, WMButton * bPtr, const char *file, const char *title1, const char *title2) +void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, const char *file) { WMPixmap *icon; WMPixmap *icon2; @@ -517,26 +517,13 @@ void AddSection(Panel * panel, const char *iconFile) WMHangData(bPtr, panel); WMSetBalloonTextForView(((PanelRec *) panel)->description, WMWidgetView(bPtr)); - - { - char *t1, *t2; - - t1 = wstrdup(((PanelRec *) panel)->sectionName); - t2 = strchr(t1, ' '); - if (t2) { - *t2 = 0; - t2++; - } - SetButtonAlphaImage(WMWidgetScreen(bPtr), bPtr, iconFile, t1, t2); - wfree(t1); - } + SetButtonAlphaImage(WMWidgetScreen(bPtr), bPtr, iconFile); WMMapWidget(bPtr); WPrefs.sectionB[WPrefs.sectionCount] = bPtr; - if (WPrefs.sectionCount > 0) { + if (WPrefs.sectionCount > 0) WMGroupButtons(WPrefs.sectionB[0], bPtr); - } WPrefs.sectionCount++; diff --git a/WPrefs.app/WPrefs.h b/WPrefs.app/WPrefs.h index 1db3a9bb..b72d1a70 100644 --- a/WPrefs.app/WPrefs.h +++ b/WPrefs.app/WPrefs.h @@ -75,8 +75,7 @@ void AddSection(Panel *panel, const char *iconFile); char *LocateImage(const char *name); -void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, const char *file, - const char *title1, const char *title2); +void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, const char *file); /* Loads `file' into `icon_normal'. If `icon_greyed' is not NULL, * combine `icon_normal' with some grey and then optionally with image