mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
get_icon_filename doesn't use WScreen
The function get_icon_filename now doesn't need the argument WScreen, so can be removed.
This commit is contained in:
committed by
Carlos R. Mafra
parent
453a0226ad
commit
278bf5ee7e
@@ -47,7 +47,7 @@ RImage *get_default_image(WScreen *scr);
|
||||
char *wDefaultGetIconFile(const char *instance, const char *class, Bool default_icon);
|
||||
|
||||
RImage *get_icon_image(WScreen *scr, const char *winstance, const char *wclass, int max_size);
|
||||
char *get_icon_filename(WScreen *scr, const char *winstance, const char *wclass, const char *command,
|
||||
char *get_icon_filename(const char *winstance, const char *wclass, const char *command,
|
||||
Bool default_icon);
|
||||
|
||||
|
||||
|
||||
@@ -1510,7 +1510,7 @@ static WMPixmap *getWindowMakerIconImage(WMScreen *scr)
|
||||
char *path = NULL;
|
||||
|
||||
/* Get the Logo icon, without the default icon */
|
||||
path = get_icon_filename(NULL, "Logo", "WMPanel", NULL, False);
|
||||
path = get_icon_filename("Logo", "WMPanel", NULL, False);
|
||||
|
||||
if (path) {
|
||||
RColor gray;
|
||||
|
||||
@@ -903,7 +903,7 @@ void set_icon_image_from_database(WIcon *icon, const char *wm_instance, const ch
|
||||
{
|
||||
char *file = NULL;
|
||||
|
||||
file = get_icon_filename(icon->core->screen_ptr, wm_instance, wm_class, command, False);
|
||||
file = get_icon_filename(wm_instance, wm_class, command, False);
|
||||
if (file) {
|
||||
icon->file = wstrdup(file);
|
||||
icon->file_image = get_rimage_from_file(icon->core->screen_ptr, icon->file, wPreferences.icon_size);
|
||||
|
||||
@@ -375,7 +375,7 @@ static WMPropList *get_generic_value(const char *instance, const char *class,
|
||||
}
|
||||
|
||||
/* Get the file name of the image, using instance and class */
|
||||
char *get_icon_filename(WScreen *scr, const char *winstance, const char *wclass, const char *command,
|
||||
char *get_icon_filename(const char *winstance, const char *wclass, const char *command,
|
||||
Bool default_icon)
|
||||
{
|
||||
char *file_name = NULL;
|
||||
@@ -390,7 +390,7 @@ char *get_icon_filename(WScreen *scr, const char *winstance, const char *wclass,
|
||||
|
||||
/* If the specific icon filename is not found, and command is specified,
|
||||
* then include the .app icons and re-do the search. */
|
||||
if ((!file_name || !file_path ) && scr && command) {
|
||||
if ((!file_name || !file_path ) && command) {
|
||||
wApplicationExtractDirPackIcon(command, winstance, wclass);
|
||||
file_name = wDefaultGetIconFile(winstance, wclass, False);
|
||||
}
|
||||
@@ -477,7 +477,7 @@ RImage *get_icon_image(WScreen *scr, const char *winstance, const char *wclass,
|
||||
char *file_name = NULL;
|
||||
|
||||
/* Get the file name of the image, using instance and class */
|
||||
file_name = get_icon_filename(scr, winstance, wclass, NULL, True);
|
||||
file_name = get_icon_filename(winstance, wclass, NULL, True);
|
||||
|
||||
return get_rimage_from_file(scr, file_name, max_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user