diff --git a/libXmd/src/Replicant.c b/libXmd/src/Replicant.c index 413817c..56805d6 100644 --- a/libXmd/src/Replicant.c +++ b/libXmd/src/Replicant.c @@ -105,7 +105,7 @@ String XmdReplicantResolveName (ConstString rawName) { String name = NULL; XtAsprintf(&name, "%s.so", rawName); if (list == NULL) list = defaultReplicantPath; - + while (file == NULL) { char ch = *list; if (dirBuffer == NULL) dirBuffer = XmdBufferNew(char); @@ -120,6 +120,7 @@ String XmdReplicantResolveName (ConstString rawName) { } else { XmdBufferPush(dirBuffer, &ch); } + if (ch == 0) break; list ++; } XtFree(name); @@ -355,7 +356,9 @@ static replicantSource *sourceGet (ConstString name) { if (source != NULL) return source; /* open the source */ - return sourceOpen(name); + source = sourceOpen(name); + XmdStringMapSet(resident, name, source); + return source; } static String scanDir (ConstString path, ConstString name) { diff --git a/replicants/Launcher/src/main.c b/replicants/Launcher/src/main.c index 3b75ad7..2443705 100644 --- a/replicants/Launcher/src/main.c +++ b/replicants/Launcher/src/main.c @@ -50,8 +50,9 @@ void handleDestroyFreePixmap ( Widget Launcher_XmdReplicantCreate ( XtAppContext application, Widget parent, - XmdReplicantState *state, + XmdReplicantState *state ) { + (void)(application); String iconName = XmdReplicantStateQuery(state, "Icon"); Pixmap icon; #define iconCase(name) if (strcmp(#name, iconName) == 0) {\ diff --git a/xmpanel/src/main.c b/xmpanel/src/main.c index 7ff22a7..dc38ec5 100644 --- a/xmpanel/src/main.c +++ b/xmpanel/src/main.c @@ -65,7 +65,8 @@ static void loadReplicants (Widget parent) { XtAsprintf ( &fullName, "%s/%s", replicantsDir, entry->d_name); - XmdReplicantOpen(parent, fullName); + XmdReplicantOpen ( + application, parent, fullName); XtFree(fullName); } }