mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
configure.in fix, WPrefs updates
This commit is contained in:
@@ -45,6 +45,7 @@ typedef struct _Panel {
|
|||||||
/* texture list */
|
/* texture list */
|
||||||
WMLabel *texL;
|
WMLabel *texL;
|
||||||
WMList *texLs;
|
WMList *texLs;
|
||||||
|
WMLabel *texsL;
|
||||||
|
|
||||||
WMButton *newB;
|
WMButton *newB;
|
||||||
WMButton *editB;
|
WMButton *editB;
|
||||||
@@ -695,6 +696,9 @@ changePage(WMWidget *w, void *data)
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel*)data;
|
_Panel *panel = (_Panel*)data;
|
||||||
int section;
|
int section;
|
||||||
|
WMListItem *item;
|
||||||
|
TextureListItem *titem;
|
||||||
|
char *str;
|
||||||
|
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
|
|
||||||
@@ -702,6 +706,15 @@ changePage(WMWidget *w, void *data)
|
|||||||
|
|
||||||
WMSetListPosition(panel->texLs, panel->textureIndex[section]
|
WMSetListPosition(panel->texLs, panel->textureIndex[section]
|
||||||
- WMGetListNumberOfRows(panel->texLs)/2);
|
- WMGetListNumberOfRows(panel->texLs)/2);
|
||||||
|
|
||||||
|
item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
|
||||||
|
|
||||||
|
titem = (TextureListItem*)item->clientData;
|
||||||
|
|
||||||
|
str = wmalloc(strlen(titem->title) + strlen(titem->texture) + 4);
|
||||||
|
sprintf(str, "%s: %s", titem->title, titem->texture);
|
||||||
|
WMSetLabelText(panel->texsL, str);
|
||||||
|
free(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -736,6 +749,7 @@ textureDoubleClick(WMWidget *w, void *data)
|
|||||||
int i, section;
|
int i, section;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
TextureListItem *titem;
|
TextureListItem *titem;
|
||||||
|
char *str;
|
||||||
|
|
||||||
/* unselect old texture */
|
/* unselect old texture */
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
@@ -756,6 +770,11 @@ textureDoubleClick(WMWidget *w, void *data)
|
|||||||
panel->textureIndex[section] = i;
|
panel->textureIndex[section] = i;
|
||||||
|
|
||||||
WMRedisplayWidget(panel->texLs);
|
WMRedisplayWidget(panel->texLs);
|
||||||
|
|
||||||
|
str = wmalloc(strlen(titem->title) + strlen(titem->texture) + 4);
|
||||||
|
sprintf(str, "%s: %s", titem->title, titem->texture);
|
||||||
|
WMSetLabelText(panel->texsL, str);
|
||||||
|
free(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -941,6 +960,12 @@ createPanel(Panel *p)
|
|||||||
*/
|
*/
|
||||||
WMSetPopUpButtonAction(panel->secP, changePage, panel);
|
WMSetPopUpButtonAction(panel->secP, changePage, panel);
|
||||||
|
|
||||||
|
|
||||||
|
panel->texsL = WMCreateLabel(panel->frame);
|
||||||
|
WMResizeWidget(panel->texsL, 260, 20);
|
||||||
|
WMMoveWidget(panel->texsL, 15, 205);
|
||||||
|
WMSetLabelWraps(panel->texsL, False);
|
||||||
|
|
||||||
/* texture list */
|
/* texture list */
|
||||||
font = WMBoldSystemFontOfSize(scr, 12);
|
font = WMBoldSystemFontOfSize(scr, 12);
|
||||||
|
|
||||||
@@ -968,7 +993,7 @@ createPanel(Panel *p)
|
|||||||
WMHangData(panel->texLs, panel);
|
WMHangData(panel->texLs, panel);
|
||||||
WMSetListAction(panel->texLs, textureClick, panel);
|
WMSetListAction(panel->texLs, textureClick, panel);
|
||||||
WMSetListDoubleAction(panel->texLs, textureDoubleClick, panel);
|
WMSetListDoubleAction(panel->texLs, textureDoubleClick, panel);
|
||||||
|
|
||||||
/* command buttons */
|
/* command buttons */
|
||||||
|
|
||||||
font = WMSystemFontOfSize(scr, 10);
|
font = WMSystemFontOfSize(scr, 10);
|
||||||
@@ -1024,6 +1049,8 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
showData(panel);
|
showData(panel);
|
||||||
|
|
||||||
|
changePage(panel->secP, panel);
|
||||||
|
|
||||||
fillTextureList(panel->texLs);
|
fillTextureList(panel->texLs);
|
||||||
|
|
||||||
panel->texturePanel = CreateTexturePanel(panel->win);
|
panel->texturePanel = CreateTexturePanel(panel->win);
|
||||||
|
|||||||
@@ -707,8 +707,8 @@ ShowTexturePanel(TexturePanel *panel)
|
|||||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->win));
|
||||||
|
|
||||||
WMSetWindowUPosition(panel->win,
|
WMSetWindowUPosition(panel->win,
|
||||||
WidthOfScreen(DefaultScreenOfDisplay(dpy)),
|
WidthOfScreen(DefaultScreenOfDisplay(dpy))/2,
|
||||||
HeightOfScreen(DefaultScreenOfDisplay(dpy)));
|
HeightOfScreen(DefaultScreenOfDisplay(dpy))/2);
|
||||||
WMMapWidget(panel->win);
|
WMMapWidget(panel->win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ AC_CHECK_FUNCS(gethostname select poll strerror strncasecmp setpgid atexit)
|
|||||||
|
|
||||||
dnl Loading of dynamic libraries at runtime
|
dnl Loading of dynamic libraries at runtime
|
||||||
dnl =======================================
|
dnl =======================================
|
||||||
|
DLLIBS=""
|
||||||
|
|
||||||
AC_CHECK_FUNC(dlopen, [HAVEDL="yes"],
|
AC_CHECK_FUNC(dlopen, [HAVEDL="yes"],
|
||||||
AC_CHECK_LIB(dl, dlopen, [DLLIBS="-ldl" HAVEDL="yes"],
|
AC_CHECK_LIB(dl, dlopen, [DLLIBS="-ldl" HAVEDL="yes"],
|
||||||
DLLIBS="" ))
|
DLLIBS="" ))
|
||||||
@@ -169,8 +171,6 @@ dnl AM_GNU_GETTEXT
|
|||||||
|
|
||||||
|
|
||||||
INTLIBS=""
|
INTLIBS=""
|
||||||
DLLIBS=""
|
|
||||||
|
|
||||||
|
|
||||||
AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
|
AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
|
||||||
AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
|
AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
|
||||||
|
|||||||
Reference in New Issue
Block a user