[Pkg-wmaker-commits] [wmaker] 18/24: WPrefs: Add support for fpixmap ("fillscale") texture.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Mar 24 20:09:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch upstream
in repository wmaker.
commit cb1760dc0bdf89c67c62a76ab1e8e6686775a0c8
Author: Doug Torrance <dtorrance at piedmont.edu>
Date: Sun Jan 24 01:32:29 2016 -0500
WPrefs: Add support for fpixmap ("fillscale") texture.
---
WPrefs.app/TexturePanel.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/WPrefs.app/TexturePanel.c b/WPrefs.app/TexturePanel.c
index c105a3a..6dd3747 100644
--- a/WPrefs.app/TexturePanel.c
+++ b/WPrefs.app/TexturePanel.c
@@ -117,16 +117,21 @@ typedef struct _TexturePanel {
} _TexturePanel;
-#define TYPE_SOLID 0
-#define TYPE_GRADIENT 1
-#define TYPE_SGRADIENT 2
-#define TYPE_TGRADIENT 3
-#define TYPE_PIXMAP 4
-
-#define PTYPE_TILE 0
-#define PTYPE_SCALE 1
-#define PTYPE_CENTER 2
-#define PTYPE_MAXIMIZE 3
+enum {
+ TYPE_SOLID,
+ TYPE_GRADIENT,
+ TYPE_SGRADIENT,
+ TYPE_TGRADIENT,
+ TYPE_PIXMAP
+};
+
+enum {
+ PTYPE_TILE,
+ PTYPE_SCALE,
+ PTYPE_CENTER,
+ PTYPE_MAXIMIZE,
+ PTYPE_FILL
+};
/*
*--------------------------------------------------------------------------
@@ -941,6 +946,9 @@ void SetTexturePanelTexture(TexturePanel *panel, const char *name, WMPropList *t
case 'M':
WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_MAXIMIZE);
break;
+ case 'F':
+ WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_FILL);
+ break;
default:
case 'T':
WMSetPopUpButtonSelectedItem(panel->arrP, PTYPE_TILE);
@@ -1026,6 +1034,10 @@ WMPropList *GetTexturePanelTexture(TexturePanel *panel)
prop = WMCreatePLArray(WMCreatePLString("mpixmap"),
WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
break;
+ case PTYPE_FILL:
+ prop = WMCreatePLArray(WMCreatePLString("fpixmap"),
+ WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
+ break;
case PTYPE_CENTER:
prop = WMCreatePLArray(WMCreatePLString("cpixmap"),
WMCreatePLString(panel->imageFile), WMCreatePLString(str), NULL);
@@ -1394,6 +1406,7 @@ TexturePanel *CreateTexturePanel(WMWindow *keyWindow)
WMAddPopUpButtonItem(panel->arrP, _("Scale"));
WMAddPopUpButtonItem(panel->arrP, _("Center"));
WMAddPopUpButtonItem(panel->arrP, _("Maximize"));
+ WMAddPopUpButtonItem(panel->arrP, _("Fill"));
WMSetPopUpButtonSelectedItem(panel->arrP, 0);
WMMapSubwidgets(panel->imageF);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmaker.git
More information about the Pkg-wmaker-commits
mailing list