mirror of
https://github.com/gryf/wmaker.git
synced 2026-04-26 19:01:25 +02:00
wmaker: Replaced local 'extern' definition of wPreferences by proper header usage
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
3803ae6493
commit
74cd836e48
+2
-2
@@ -297,7 +297,7 @@ typedef struct WCoord {
|
||||
int x, y;
|
||||
} WCoord;
|
||||
|
||||
typedef struct WPreferences {
|
||||
extern struct WPreferences {
|
||||
char *pixmap_path; /* : separated list of paths to find pixmaps */
|
||||
char *icon_path; /* : separated list of paths to find icons */
|
||||
WMArray *fallbackWMs; /* fallback window manager list */
|
||||
@@ -446,7 +446,7 @@ typedef struct WPreferences {
|
||||
#endif
|
||||
unsigned int restarting:2;
|
||||
} flags; /* internal flags */
|
||||
} WPreferences;
|
||||
} wPreferences;
|
||||
|
||||
/****** Global Variables ******/
|
||||
extern Display *dpy;
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
int ignore_wks_change = 0;
|
||||
extern Time LastTimestamp;
|
||||
extern Time LastFocusChange;
|
||||
extern WPreferences wPreferences;
|
||||
extern Atom _XA_WM_TAKE_FOCUS;
|
||||
|
||||
static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, int *new_y,
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
|
||||
/**** Global variables ****/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WPreferences wPreferences;
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
extern XContext wWinContext;
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
/******** Global Variables **********/
|
||||
extern Atom _XA_WINDOWMAKER_MENU;
|
||||
extern Time LastTimestamp;
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
typedef struct {
|
||||
short code;
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "workspace.h"
|
||||
#include "balloon.h"
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
typedef struct _WBalloon {
|
||||
Window window;
|
||||
|
||||
@@ -577,7 +577,6 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
|
||||
wAppMenuDestroy(wapp->menu);
|
||||
}
|
||||
if (wwin->fake_group) {
|
||||
extern WPreferences wPreferences;
|
||||
WScreen *scr = wwin->screen_ptr;
|
||||
WWindow *foo = scr->focused_window;
|
||||
WFakeGroupLeader *fPtr = wwin->fake_group;
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
#include "switchpanel.h"
|
||||
|
||||
/* Globals */
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
extern WShortKey wKeyBindings[WKBD_LAST];
|
||||
|
||||
static void raiseWindow(WSwitchPanel * swpanel, WWindow * wwin)
|
||||
|
||||
+2
-3
@@ -76,7 +76,6 @@ extern WDDomain *WDWindowMaker;
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
extern WDDomain *WDRootMenu;
|
||||
extern int wScreenCount;
|
||||
extern WPreferences wPreferences;
|
||||
extern WShortKey wKeyBindings[WKBD_LAST];
|
||||
|
||||
typedef struct _WDefaultEntry WDefaultEntry;
|
||||
@@ -3065,7 +3064,7 @@ static int setSwPOptions(WScreen * scr, WDefaultEntry * entry, void *tdata, void
|
||||
char *path;
|
||||
RImage *bgimage;
|
||||
int cwidth, cheight;
|
||||
WPreferences *prefs = foo;
|
||||
struct WPreferences *prefs = foo;
|
||||
|
||||
if (!WMIsPLArray(array) || WMGetPropListItemCount(array) == 0) {
|
||||
if (prefs->swtileImage)
|
||||
@@ -3182,7 +3181,7 @@ static int setModifierKeyLabels(WScreen * scr, WDefaultEntry * entry, void *tdat
|
||||
{
|
||||
WMPropList *array = tdata;
|
||||
int i;
|
||||
WPreferences *prefs = foo;
|
||||
struct WPreferences *prefs = foo;
|
||||
|
||||
if (!WMIsPLArray(array) || WMGetPropListItemCount(array) != 7) {
|
||||
wwarning(_("Value for option \"%s\" must be an array of 7 strings"), entry->key);
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include "actions.h"
|
||||
#include "xinerama.h"
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static WMPoint getCenter(WScreen * scr, int width, int height)
|
||||
{
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
|
||||
/**** Global variables ****/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WPreferences wPreferences;
|
||||
extern XContext wWinContext;
|
||||
extern void appIconMouseDown(WObjDescriptor *desc, XEvent *event);
|
||||
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
#include "framewin.h"
|
||||
#include "xinerama.h"
|
||||
|
||||
/**** Global variables ****/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static void updateCommand(WAppIcon * icon, char *command)
|
||||
{
|
||||
|
||||
@@ -87,8 +87,6 @@ extern int wScreenCount;
|
||||
extern Time LastTimestamp;
|
||||
extern Time LastFocusChange;
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
#define MOD_MASK wPreferences.modifier_mask
|
||||
|
||||
extern Atom _XA_WM_COLORMAP_NOTIFY;
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
|
||||
#define DBLCLICK_TIME wPreferences.dblclick_time
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static void handleExpose(WObjDescriptor * desc, XEvent * event);
|
||||
static void handleButtonExpose(WObjDescriptor * desc, XEvent * event);
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#include "winmenu.h"
|
||||
|
||||
/**** Global varianebles ****/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
#define MOD_MASK wPreferences.modifier_mask
|
||||
#define CACHE_ICON_PATH "/Library/WindowMaker/CachedPixmaps"
|
||||
|
||||
+2
-2
@@ -82,7 +82,7 @@ char *Locale = NULL;
|
||||
|
||||
int wScreenCount = 0;
|
||||
|
||||
WPreferences wPreferences;
|
||||
struct WPreferences wPreferences;
|
||||
|
||||
WShortKey wKeyBindings[WKBD_LAST];
|
||||
|
||||
@@ -599,7 +599,7 @@ int main(int argc, char **argv)
|
||||
/* setup common stuff for the monitor and wmaker itself */
|
||||
WMInitializeApplication("WindowMaker", &argc, argv);
|
||||
|
||||
memset(&wPreferences, 0, sizeof(WPreferences));
|
||||
memset(&wPreferences, 0, sizeof(wPreferences));
|
||||
|
||||
wPreferences.fallbackWMs = WMCreateArray(8);
|
||||
alt = getenv("WINDOWMAKER_ALT_WM");
|
||||
|
||||
@@ -51,8 +51,6 @@ extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
extern XContext wWinContext;
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
#define MOD_MASK wPreferences.modifier_mask
|
||||
|
||||
#define MENU_SCROLL_STEP menuScrollParameters[(int)wPreferences.menu_scroll_speed].steps
|
||||
|
||||
+1
-2
@@ -50,8 +50,7 @@
|
||||
#include "xutil.h"
|
||||
#include "xmodifier.h"
|
||||
|
||||
/**** global variables *****/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
#define ICON_SIZE wPreferences.icon_size
|
||||
|
||||
/**** Local prototypes *****/
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
#include "dialog.h"
|
||||
#include "main.h"
|
||||
|
||||
/****** Global Variables ******/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static int showCrashDialog(int sig)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
|
||||
/****** Global Variables ******/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "xinerama.h"
|
||||
#include "placement.h"
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
#define X_ORIGIN WMAX(usableArea.x1,\
|
||||
wPreferences.window_place_origin.x)
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
extern char *Locale;
|
||||
extern WDDomain *WDRootMenu;
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static WMenu *readMenuPipe(WScreen * scr, char **file_name);
|
||||
static WMenu *readPLMenuPipe(WScreen * scr, char **file_name);
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
|
||||
/**** Global variables ****/
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WPreferences wPreferences;
|
||||
extern Atom _XA_WINDOWMAKER_STATE;
|
||||
extern Atom _XA_WINDOWMAKER_NOTICEBOARD;
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
/*** Global Variables ***/
|
||||
extern XContext wStackContext;
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static void notifyStackChange(WCoreWindow * frame, char *detail)
|
||||
{
|
||||
WWindow *wwin = wWindowFor(frame->window);
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
#endif
|
||||
|
||||
/****** Global Variables ******/
|
||||
extern WPreferences wPreferences;
|
||||
extern WDDomain *WDWindowMaker;
|
||||
extern WDDomain *WDRootMenu;
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#define BOUNCE_DAMP 0.6
|
||||
#define URGENT_BOUNCE_DELAY 3000
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
void DoKaboom(WScreen * scr, Window win, int x, int y)
|
||||
{
|
||||
|
||||
@@ -44,9 +44,6 @@
|
||||
((w)->wm_gnustep_attr->window_level == WMMainMenuWindowLevel || \
|
||||
(w)->wm_gnustep_attr->window_level == WMSubmenuWindowLevel))
|
||||
|
||||
/********* Global Variables *******/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static int initialized = 0;
|
||||
static void observer(void *self, WMNotification * notif);
|
||||
static void wsobserver(void *self, WMNotification * notif);
|
||||
|
||||
@@ -66,8 +66,6 @@ struct SwitchPanel {
|
||||
WMColor *white;
|
||||
};
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
#define BORDER_SPACE 10
|
||||
#define ICON_SIZE 48
|
||||
#define ICON_TILE_SIZE 64
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "window.h"
|
||||
#include "misc.h"
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static void bevelImage(RImage * image, int relief);
|
||||
static RImage * get_texture_image(WScreen *scr, const char *pixmap_file);
|
||||
|
||||
@@ -79,8 +79,6 @@
|
||||
|
||||
#define MAX_SHORTCUT_LENGTH 32
|
||||
|
||||
/*** var ***/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
typedef struct {
|
||||
WScreen *screen;
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
#include "wcore.h"
|
||||
|
||||
/****** Global Variables ******/
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
/* cursors */
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern XContext wWinContext;
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
if (mask) mask->flag = 1;}
|
||||
|
||||
/* Global stuff */
|
||||
extern WPreferences wPreferences;
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
|
||||
/* Local stuff */
|
||||
|
||||
@@ -86,7 +86,6 @@ extern XContext wWinContext;
|
||||
extern Atom _XA_WM_DELETE_WINDOW;
|
||||
extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
||||
extern Atom _XA_WINDOWMAKER_STATE;
|
||||
extern WPreferences wPreferences;
|
||||
extern Time LastTimestamp;
|
||||
|
||||
/***** Local Stuff *****/
|
||||
|
||||
@@ -75,7 +75,6 @@ extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
||||
|
||||
extern WShortKey wKeyBindings[WKBD_LAST];
|
||||
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static void updateOptionsMenu(WMenu * menu, WWindow * wwin);
|
||||
|
||||
|
||||
@@ -116,7 +116,6 @@ typedef struct InspectorPanel {
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
static InspectorPanel *panelList = NULL;
|
||||
static WMPropList *ANoTitlebar = NULL;
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
/* Global variables */
|
||||
extern Atom _XA_WM_DELETE_WINDOW;
|
||||
extern Time LastTimestamp;
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
/* Root Window Properties */
|
||||
static Atom net_supported;
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#define WORKSPACE_NAME_DISPLAY_PADDING 32
|
||||
|
||||
extern int ignore_wks_change;
|
||||
extern WPreferences wPreferences;
|
||||
extern XContext wVEdgeContext;
|
||||
extern WShortKey wKeyBindings[WKBD_LAST];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user