mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
New function create_logo_image
New function create_logo_image to set the logo image.
This commit is contained in:
committed by
Carlos R. Mafra
parent
202b9eadc5
commit
21a5f41c08
@@ -969,22 +969,12 @@ void wDefaultsCheckDomains(void* arg)
|
|||||||
for (i = 0; i < wScreenCount; i++) {
|
for (i = 0; i < wScreenCount; i++) {
|
||||||
scr = wScreenWithNumber(i);
|
scr = wScreenWithNumber(i);
|
||||||
if (scr) {
|
if (scr) {
|
||||||
RImage *image;
|
|
||||||
|
|
||||||
wDefaultUpdateIcons(scr);
|
wDefaultUpdateIcons(scr);
|
||||||
|
|
||||||
/* Update the panel image if changed */
|
/* Update the panel image if changed */
|
||||||
/* Don't worry. If the image is the same these
|
/* Don't worry. If the image is the same these
|
||||||
* functions will have no performance impact. */
|
* functions will have no performance impact. */
|
||||||
image = wDefaultGetImage(scr, "Logo", "WMPanel", wPreferences.icon_size);
|
create_logo_image(scr);
|
||||||
|
|
||||||
if (!image) {
|
|
||||||
wwarning(_("could not load logo image for panels: %s"),
|
|
||||||
RMessageForError(RErrorCode));
|
|
||||||
} else {
|
|
||||||
WMSetApplicationIconImage(scr->wmscreen, image);
|
|
||||||
RReleaseImage(image);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
src/screen.c
18
src/screen.c
@@ -359,7 +359,6 @@ static void allocGCs(WScreen * scr)
|
|||||||
static void createPixmaps(WScreen * scr)
|
static void createPixmaps(WScreen * scr)
|
||||||
{
|
{
|
||||||
WPixmap *pix;
|
WPixmap *pix;
|
||||||
RImage *image;
|
|
||||||
|
|
||||||
/* load pixmaps */
|
/* load pixmaps */
|
||||||
pix = wPixmapCreateFromXBMData(scr, (char *)MENU_RADIO_INDICATOR_XBM_DATA,
|
pix = wPixmapCreateFromXBMData(scr, (char *)MENU_RADIO_INDICATOR_XBM_DATA,
|
||||||
@@ -402,7 +401,17 @@ static void createPixmaps(WScreen * scr)
|
|||||||
pix->shared = 1;
|
pix->shared = 1;
|
||||||
scr->menu_shade_indicator = pix;
|
scr->menu_shade_indicator = pix;
|
||||||
|
|
||||||
image = wDefaultGetImage(scr, "Logo", "WMPanel", wPreferences.icon_size);
|
create_logo_image(scr);
|
||||||
|
|
||||||
|
scr->dock_dots = make3Dots(scr);
|
||||||
|
|
||||||
|
/* titlebar button pixmaps */
|
||||||
|
allocButtonPixmaps(scr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void create_logo_image(WScreen *scr)
|
||||||
|
{
|
||||||
|
RImage *image = wDefaultGetImage(scr, "Logo", "WMPanel", wPreferences.icon_size);
|
||||||
|
|
||||||
if (!image) {
|
if (!image) {
|
||||||
wwarning(_("could not load logo image for panels: %s"), RMessageForError(RErrorCode));
|
wwarning(_("could not load logo image for panels: %s"), RMessageForError(RErrorCode));
|
||||||
@@ -410,11 +419,6 @@ static void createPixmaps(WScreen * scr)
|
|||||||
WMSetApplicationIconImage(scr->wmscreen, image);
|
WMSetApplicationIconImage(scr->wmscreen, image);
|
||||||
RReleaseImage(image);
|
RReleaseImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
scr->dock_dots = make3Dots(scr);
|
|
||||||
|
|
||||||
/* titlebar button pixmaps */
|
|
||||||
allocButtonPixmaps(scr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ WScreen *wScreenSearchForRootWindow(Window window);
|
|||||||
WScreen *wScreenForWindow(Window window); /* slower than above functions */
|
WScreen *wScreenForWindow(Window window); /* slower than above functions */
|
||||||
|
|
||||||
void wScreenFinish(WScreen *scr);
|
void wScreenFinish(WScreen *scr);
|
||||||
|
|
||||||
void wScreenUpdateUsableArea(WScreen *scr);
|
void wScreenUpdateUsableArea(WScreen *scr);
|
||||||
|
|
||||||
|
void create_logo_image(WScreen *scr);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user