This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, master has been updated
discards 2bd63949e99e978e9009f567b5081b21abad64db (commit)
discards aa6d7ac7c61d2a23986f4046cda6e5231717a316 (commit)
discards 705bf49c7383f2d9017159939608bd1b974538f6 (commit)
via 809c536879ebe339a5e4388669a389cb26835b3d (commit)
via 69d2e5187613a41b0f883885fb3575a43f7f2226 (commit)
via 171eca8b64a024e6f08c1026dd49599a6742ccac (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (2bd63949e99e978e9009f567b5081b21abad64db)
N -- N -- N (809c536879ebe339a5e4388669a389cb26835b3d)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/809c536879ebe339a5e4388669a389cb26835b3d
commit 809c536879ebe339a5e4388669a389cb26835b3d
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Tue Jan 17 19:32:44 2012 +0100
WINGs: Remove proplist-compat.h
It is not needed to compile Window Maker and it is not used by other
applications (tested in Debian). Therefore the file should be removed.
diff --git a/WINGs/WINGs/Makefile.am b/WINGs/WINGs/Makefile.am
index b77333b..088f1fe 100644
--- a/WINGs/WINGs/Makefile.am
+++ b/WINGs/WINGs/Makefile.am
@@ -5,4 +5,4 @@ AUTOMAKE_OPTIONS =
# is this a kluge? if so, how should i do it?
includedir = @includedir@/WINGs
-include_HEADERS = WINGs.h WUtil.h WINGsP.h proplist-compat.h
+include_HEADERS = WINGs.h WUtil.h WINGsP.h
diff --git a/WINGs/WINGs/proplist-compat.h b/WINGs/WINGs/proplist-compat.h
deleted file mode 100644
index 18ec457..0000000
--- a/WINGs/WINGs/proplist-compat.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * This header file is provided for old libPropList compatibility.
- * DO _NOT_ USE this except for letting your old libPropList-based code to
- * work with the new property list code from WINGs, with minimal changes.
- *
- * All code written with old libPropList functions should work, given
- * that the following changes are made:
- *
- * 1. Replace all
- * #include <proplist.h>
- * with
- * #include <WINGs/proplist-compat.h>
- * in your code.
- *
- * 2. Change all calls to PLSave() to have the extra filename parameter like:
- * PLSave(proplist_t proplist, char* filename, Bool atomically)
- *
- * 3. The PLSetStringCmpHook() function is no longer available. There is a
- * similar but simpler function provided which is enough for practical
- * purposes:
- * PLSetCaseSensitive(Bool caseSensitive)
- *
- * 4. The following functions do no longer exist. They were removed because
- * they were based on concepts borrowed from UserDefaults which conflict
- * with the retain/release mechanism:
- * PLSynchronize(), PLDeepSynchronize(), PLShallowSynchronize()
- * PLSetFilename(), PLGetFilename()
- * PLGetContainer()
- * You should change your code to not use them anymore.
- *
- * 5. The following functions are no longer available. They were removed
- * because they also used borrowed concepts which have no place in a
- * property list as defined in the OpenStep specifications. Also these
- * functions were hardly ever used in programs to our knowledge.
- * PLGetDomainNames(), PLGetDomain(), PLSetDomain(), PLDeleteDomain()
- * PLRegister(), PLUnregister()
- * You should also change your code to not use them anymore (in case you
- * ever used them anyway ;-) ).
- *
- * 6. Link your program with libWINGs or libWUtil instead of libPropList.
- * (libWINGs should be used for GUI apps, while libWUtil for non-GUI apps)
- *
- *
- * Our recommandation is to rewrite your code to use the new functions and
- * link against libWINGs/libWUtil. We do not recommend you to keep using old
- * libPropList function names. This file is provided just to allow existing
- * libropList based applications to run with minimal changes with the new
- * proplist code from WINGs before their authors get the time to rewrite
- * them. New proplist code from WINGs provide a better integration with the
- * other data types from WINGs, not to mention that the proplist code in WINGs
- * is actively maintained while the old libPropList is dead.
- *
- */
-
-
-#ifndef _PROPLIST_COMPAT_H_
-#define _PROPLIST_COMPAT_H_
-
-#include <WINGs/WUtil.h>
-
-
-typedef WMPropList* proplist_t;
-
-
-#ifndef YES
-#define YES True
-#endif
-
-#ifndef NO
-#define NO False
-#endif
-
-
-#define PLSetCaseSensitive(c) WMPLSetCaseSensitive(c)
-
-#define PLMakeString(bytes) WMCreatePLString(bytes)
-#define PLMakeData(bytes, length) WMCreatePLDataWithBytes(bytes, length)
-#define PLMakeArrayFromElements WMCreatePLArray
-#define PLMakeDictionaryFromEntries WMCreatePLDictionary
-
-#define PLRetain(pl) WMRetainPropList(pl)
-#define PLRelease(pl) WMReleasePropList(pl)
-
-#define PLInsertArrayElement(array, pl, pos) WMInsertInPLArray(array, pos, pl)
-#define PLAppendArrayElement(array, pl) WMAddToPLArray(array, pl)
-#define PLRemoveArrayElement(array, pos) WMDeleteFromPLArray(array, pos)
-#define PLInsertDictionaryEntry(dict, key, value) WMPutInPLDictionary(dict,
key, value)
-#define PLRemoveDictionaryEntry(dict, key) WMRemoveFromPLDictionary(dict, key)
-#define PLMergeDictionaries(dest, source) WMMergePLDictionaries(dest, source,
False)
-
-#define PLGetNumberOfElements(pl) WMGetPropListItemCount(pl)
-
-#define PLIsString(pl) WMIsPLString(pl)
-#define PLIsData(pl) WMIsPLData(pl)
-#define PLIsArray(pl) WMIsPLArray(pl)
-#define PLIsDictionary(pl) WMIsPLDictionary(pl)
-#define PLIsSimple(pl) (WMIsPLString(pl) || WMIsPLData(pl))
-#define PLIsCompound(pl) (WMIsPLArray(pl) || WMIsPLDictionary(pl))
-#define PLIsEqual(pl1, pl2) WMIsPropListEqualTo(pl1, pl2)
-
-#define PLGetString(pl) WMGetFromPLString(pl)
-#define PLGetDataBytes(pl) WMGetPLDataBytes(pl)
-#define PLGetDataLength(pl) WMGetPLDataLength(pl)
-#define PLGetArrayElement(pl, index) WMGetFromPLArray(pl, index)
-#define PLGetDictionaryEntry(pl, key) WMGetFromPLDictionary(pl, key)
-#define PLGetAllDictionaryKeys(pl) WMGetPLDictionaryKeys(pl)
-
-#define PLShallowCopy(pl) WMShallowCopyPropList(pl)
-#define PLDeepCopy(pl) WMDeepCopyPropList(pl)
-
-#define PLGetProplistWithDescription(desc)
WMCreatePropListFromDescription(desc)
-#define PLGetDescriptionIndent(pl, level) WMGetPropListDescription(pl, True)
-#define PLGetDescription(pl) WMGetPropListDescription(pl, False)
-#define PLGetStringDescription(pl) WMGetPropListDescription(pl, False)
-#define PLGetDataDescription(pl) WMGetPropListDescription(pl, False)
-
-#define PLGetProplistWithPath(file) WMReadPropListFromFile(file)
-#define PLSave(pl, file, atm) WMWritePropListToFile(pl, file)
-
-
-/* Unsupported functions. Do not ask for them. They're evil :P */
-#define PLSetStringCmpHook(fn) error_PLSetStringCmpHook_is_not_supported
-#define PLDeepSynchronize(pl) error_PLDeepSynchronize_is_not_supported
-#define PLSynchronize(pl) error_PLSynchronize_is_not_supported
-#define PLShallowSynchronize(pl) error_PLShallowSynchronize_is_not_supported
-#define PLSetFilename(pl, filename) error_PLSetFilename_is_not_supported
-#define PLGetFilename(pl, filename) error_PLGetFilename_is_not_supported
-#define PLGetContainer(pl) error_PLGetContainer_is_not_supported
-
-#define PLGetDomainNames error_PLGetDomainNames_is_not_supported
-#define PLGetDomain(name) error_PLGetDomain_is_not_supported
-#define PLSetDomain(name, value, kickme) error_PLSetDomain_is_not_supported
-#define PLDeleteDomain(name, kickme) error_PLDeleteDomain_is_not_supported
-#define PLRegister(name, callback) error_PLRegister_is_not_supported
-#define PLUnregister(name) error_PLUnregister_is_not_supported
-
-
-#endif
http://repo.or.cz/w/wmaker-crm.git/commit/69d2e5187613a41b0f883885fb3575a43f7f2226
commit 69d2e5187613a41b0f883885fb3575a43f7f2226
Author: Carlos R. Mafra <[email protected]>
Date: Thu Jan 19 01:12:58 2012 +0000
WPrefs: Remove trimstr() and use wtrimspace() from WINGs
There's no need to have a private function while there's one in WINGs.
Besides that, it does not remove trailing whitespaces appropriately as I
just tested by adding trailing space in the shortcut captured by WPrefs.
It is not trimmed before saving it:
[mafra@Pilar:Defaults]$ grep CloseKey WindowMaker
CloseKey = "Mod1+C ";
Using wtrimspace() fixes that and even saves 208 bytes of code:
[mafra@Pilar:WPrefs.app]$ size KeyboardShortcuts.o.*
text data bss dec hex filename
7703 0 0 7703 1e17 KeyboardShortcuts.o.new
7911 0 0 7911 1ee7 KeyboardShortcuts.o.old
Signed-off-by: Carlos R. Mafra <[email protected]>
diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c
index 1d70854..4ea7fa4 100644
--- a/WPrefs.app/KeyboardShortcuts.c
+++ b/WPrefs.app/KeyboardShortcuts.c
@@ -359,23 +359,6 @@ static void listClick(WMWidget * w, void *data)
WMSetTextFieldText(panel->shoT, panel->shortcuts[row]);
}
-static char *trimstr(char *str)
-{
- char *p = str;
- int i;
-
- while (isspace(*p))
- p++;
- p = wstrdup(p);
- i = strlen(p);
- while (isspace(p[i]) && i > 0) {
- p[i] = 0;
- i--;
- }
-
- return p;
-}
-
static void showData(_Panel * panel)
{
char *str;
@@ -387,7 +370,7 @@ static void showData(_Panel * panel)
if (panel->shortcuts[i])
wfree(panel->shortcuts[i]);
if (str)
- panel->shortcuts[i] = trimstr(str);
+ panel->shortcuts[i] = wtrimspace(str);
else
panel->shortcuts[i] = NULL;
@@ -574,7 +557,7 @@ static void storeData(_Panel * panel)
for (i = 0; i < panel->actionCount; i++) {
str = NULL;
if (panel->shortcuts[i]) {
- str = trimstr(panel->shortcuts[i]);
+ str = wtrimspace(panel->shortcuts[i]);
if (strlen(str) == 0) {
wfree(str);
str = NULL;
http://repo.or.cz/w/wmaker-crm.git/commit/171eca8b64a024e6f08c1026dd49599a6742ccac
commit 171eca8b64a024e6f08c1026dd49599a6742ccac
Author: Carlos R. Mafra <[email protected]>
Date: Tue Jan 17 15:34:15 2012 +0000
Get rid of cropline(), use wtrimspace() instead
There is code duplication with the cropline() function, so get rid
of it and use WINGs wtrimspace() instead.
Signed-off-by: Carlos R. Mafra <[email protected]>
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 0ecd3b4..cccbab8 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -473,25 +473,6 @@ static Bool addShortcut(char *file, char
*shortcutDefinition, WMenu * menu, WMen
return True;
}
-/*******************************/
-
-static char *cropline(char *line)
-{
- char *end;
-
- if (strlen(line) == 0)
- return line;
-
- end = &(line[strlen(line)]) - 1;
- while (isspace(*line) && *line != 0)
- line++;
- while (end > line && isspace(*end)) {
- *end = 0;
- end--;
- }
- return line;
-}
-
static char *next_token(char *line, char **next)
{
char *tmp, c;
@@ -1020,14 +1001,14 @@ static WMenu *parseCascade(WScreen * scr, WMenu * menu,
FILE * file, char *file_
ok = 0;
fgets(linebuf, MAXLINE, file);
- line = cropline(linebuf);
+ line = wtrimspace(linebuf);
lsize = strlen(line);
do {
if (line[lsize - 1] == '\') {
char *line2;
int lsize2;
fgets(elinebuf, MAXLINE, file);
- line2 = cropline(elinebuf);
+ line2 = wtrimspace(elinebuf);
lsize2 = strlen(line2);
if (lsize2 + lsize > MAXLINE) {
wwarning(_("%s:maximal line size
exceeded in menu config: %s"),
@@ -1129,7 +1110,7 @@ static WMenu *readMenuFile(WScreen * scr, char *file_name)
while (!feof(file)) {
if (!fgets(linebuf, MAXLINE, file))
break;
- line = cropline(linebuf);
+ line = wtrimspace(linebuf);
if (line[0] == 0 || line[0] == '#' || (line[0] == '/' &&
line[1] == '/'))
continue;
@@ -1223,7 +1204,7 @@ static WMenu *readMenuPipe(WScreen * scr, char
**file_name)
while (!feof(file)) {
if (!fgets(linebuf, MAXLINE, file))
break;
- line = cropline(linebuf);
+ line = wtrimspace(linebuf);
if (line[0] == 0 || line[0] == '#' || (line[0] == '/' &&
line[1] == '/'))
continue;
diff --git a/src/workspace.c b/src/workspace.c
index c0493f3..dc53d03 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -645,23 +645,6 @@ static void newWSCommand(WMenu * menu, WMenuEntry * foo)
} */
}
-static char *cropline(char *line)
-{
- char *end;
-
- if (strlen(line) == 0)
- return line;
-
- end = &(line[strlen(line)]) - 1;
- while (isspace(*line) && *line != 0)
- line++;
- while (isspace(*end) && end != line) {
- *end = 0;
- end--;
- }
- return line;
-}
-
void wWorkspaceRename(WScreen * scr, int workspace, char *name)
{
char buf[MAX_WORKSPACENAME_WIDTH + 1];
@@ -671,7 +654,7 @@ void wWorkspaceRename(WScreen * scr, int workspace, char
*name)
return;
/* trim white spaces */
- tmp = cropline(name);
+ tmp = wtrimspace(name);
if (strlen(tmp) == 0) {
snprintf(buf, sizeof(buf), _("Workspace %i"), workspace + 1);
-----------------------------------------------------------------------
Summary of changes:
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].