On Mon, 09 Sep 2013, Carlos R. Mafra escribió: > On Thu, 5 Sep 2013 at 21:08:22 +0200, Rodolfo García Peñas (kix) wrote: > > From: "Rodolfo García Peñas (kix)" <k...@kix.es> > > > > The new struct wks_nfo includes the global information > > for the workspaces. All information related with the workspaces > > should be included here. > > > > The first variable moved is workspace_name_font, included in this > > patch. This variable was included in the screen info, but the > > screen and the font used in the workspace name don't have any > > relationship. > > --- > > src/defaults.c | 10 +++++----- > > src/main.c | 4 ++++ > > src/screen.h | 2 -- > > src/workspace.c | 9 +++++---- > > src/workspace.h | 4 +++- > > 5 files changed, 17 insertions(+), 12 deletions(-) > > > > diff --git a/src/defaults.c b/src/defaults.c > > index 02f01a3..67ca62a 100644 > > --- a/src/defaults.c > > +++ b/src/defaults.c > > @@ -76,6 +76,7 @@ extern WDDomain *WDWindowMaker; > > extern WDDomain *WDWindowAttributes; > > extern WDDomain *WDRootMenu; > > extern int wScreenCount; > > +extern wks_info wks_nfo; > > extern WShortKey wKeyBindings[WKBD_LAST]; > > > > typedef struct _WDefaultEntry WDefaultEntry; > > @@ -2584,15 +2585,14 @@ static int setClipTitleFont(WScreen * scr, > > WDefaultEntry * entry, void *tdata, v > > return REFRESH_ICON_FONT; > > } > > > > -static int setLargeDisplayFont(WScreen * scr, WDefaultEntry * entry, void > > *tdata, void *foo) > > +static int setLargeDisplayFont(WScreen *scr, WDefaultEntry *entry, void > > *tdata, void *foo) > > { > > WMFont *font = tdata; > > > > - if (scr->workspace_name_font) { > > - WMReleaseFont(scr->workspace_name_font); > > - } > > + if (wks_nfo.workspace_name_font) > > + WMReleaseFont(wks_nfo.workspace_name_font); > > > > - scr->workspace_name_font = font; > > + wks_nfo.workspace_name_font = font; > > > > return 0; > > } > > diff --git a/src/main.c b/src/main.c > > index 69a68e2..18f6002 100644 > > --- a/src/main.c > > +++ b/src/main.c > > @@ -56,6 +56,7 @@ > > #include "dialog.h" > > #include "main.h" > > #include "monitor.h" > > +#include "workspace.h" > > > > #include <WINGs/WUtil.h> > > > > @@ -129,6 +130,9 @@ Atom _XA_WM_IGNORE_FOCUS_EVENTS; > > /* cursors */ > > Cursor wCursor[WCUR_LAST]; > > > > +/* Workspace information */ > > +wks_info wks_nfo; > > This patch is a great idea, but I feel the naming convention is > on the borderline of too cryptic. Perhaps it's just me, but > > wks_nfo > > is a bit disturbing and distracts a bit while reading the code. > > > > --- a/src/workspace.h > > +++ b/src/workspace.h > > @@ -22,7 +22,9 @@ > > #ifndef WMWORKSPACE_H_ > > #define WMWORKSPACE_H_ > > > > - > > +typedef struct wks_info { > > + WMFont *workspace_name_font; > > +} wks_info; > > > > typedef struct WWorkspace { > > char *name; > > > Perhaps 'typedef WWorkspace_info' would make > more sense? Note the extra "W" like in WWorkspace -- I think > it is good to have patterns like this. > > And then we could have > > WWorkspace_info wks_info; > > instead of > > wks_info wks_nfo; > > May I suggest you to rename this? Perhaps it makes more sense to > redo your last series altogether. Remove the troublesome patch about > True vs False and do the above renaming. > > Since it's on #next, I can freely substitute the old series by the new > one with rebase.
Hi, I did the change: kix@osaka:~/src/wmaker/git/wmaker-crm/snd/ch$ for i in `ls -1`; do sed -i 's/wks_info/WWorkspace_info/g' $i; done kix@osaka:~/src/wmaker/git/wmaker-crm/snd/ch$ for i in `ls -1`; do sed -i 's/wks_nfo/wks_info/g' $i; done :-) I tested it. They are ok. I sent these patches again, but I didn't change the filename (git am * works like a charm): kix@osaka:~/src/wmaker/git/wmaker-crm/snd/ch$ ls -1 0011-New-struct-wks_nfo.patch 0012-Variable-workspace_count-moved-to-wks_nfo.patch 0013-Variable-last_workspace-moved-to-wks_nfo.patch 0014-Variable-current_workspace-moved-to-wks_nfo.patch 0015-Variable-workspaces-moved-to-wks_nfo.patch 0016-Variable-workspace_menu-moved-to-wks_nfo.patch 0017-Clip-Dock-and-Drawers-menu-moved-to-wks_info.patch 0018-Removed-WScreen-args-not-used.patch 0019-AppIcon-list-moved-out-of-WScreen.patch 0020-Removed-unused-WScreen-variable-in-wIsADrawer.patch 0021-Variable-clip_icon-moved-to-wks_nfo.patch 0022-wClipIconPaint-appicon-argument-removed.patch kix@osaka:~/src/wmaker/git/wmaker-crm/snd/ch$ Cheers, kix. -- ||// //\\// Rodolfo "kix" Garcia ||\\// //\\ http://www.kix.es/ -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.