mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-26 08:22:37 +01:00
Code refactoring: replaced macro 'XDND' by 'USE_DOCK_XDND' for consistency
The usual way to define a macro in is to name macro with 'USE_xxx' when they are used to enable a feature 'xxx'. As the feature concerns the Dock and not DnD in general (WINGs support is not disabled), make it a bit more clear in the macro name and document the configure flag in the Installation Manual. Took opportunity to compile the corresponding file only when the feature is not disabled. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
2ebfcd9c5c
commit
b4cf94aacd
@@ -66,7 +66,7 @@ static void updatePasteCommand(WAppIcon * icon, char *command)
|
||||
icon->paste_command = command;
|
||||
}
|
||||
|
||||
#ifdef XDND
|
||||
#ifdef USE_DOCK_XDND
|
||||
static void updateDNDCommand(WAppIcon * icon, char *command)
|
||||
{
|
||||
if (icon->dnd_command)
|
||||
@@ -77,7 +77,7 @@ static void updateDNDCommand(WAppIcon * icon, char *command)
|
||||
}
|
||||
icon->dnd_command = command;
|
||||
}
|
||||
#endif /* XDND */
|
||||
#endif /* USE_DOCK_XDND */
|
||||
|
||||
static void updateSettingsPanelIcon(AppSettingsPanel * panel)
|
||||
{
|
||||
@@ -199,7 +199,7 @@ static void panelBtnCallback(WMWidget * self, void *data)
|
||||
text = NULL;
|
||||
}
|
||||
updateCommand(panel->editedIcon, text);
|
||||
#ifdef XDND
|
||||
#ifdef USE_DOCK_XDND
|
||||
/* cannot free text from this, because it will be not be duplicated
|
||||
* in updateDNDCommand */
|
||||
text = WMGetTextFieldText(panel->dndCommandField);
|
||||
@@ -307,7 +307,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
|
||||
panel->dndCommandLabel = WMCreateLabel(panel->dndCommandFrame);
|
||||
WMResizeWidget(panel->dndCommandLabel, 256, 18);
|
||||
WMMoveWidget(panel->dndCommandLabel, 10, 45);
|
||||
#ifdef XDND
|
||||
#ifdef USE_DOCK_XDND
|
||||
WMSetTextFieldText(panel->dndCommandField, aicon->dnd_command);
|
||||
WMSetLabelText(panel->dndCommandLabel, _("%d will be replaced with the file name"));
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user