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, next has been updated
via d53b43608ac2c514e212d35ec3f485d08d250da1 (commit)
via def62293e9be7935adf47230c1acf19bdd59acf9 (commit)
via 089c99941fe4b63b462e57631960053ee333ed3a (commit)
via ee450acb30fa488bc43e26f9c1f9423441bbee84 (commit)
via 50765fab84889ae71c4a54afec75dd66250f3100 (commit)
via fbd9c12cd04e5d26a491506f16077f806c17154e (commit)
via e3b9026532021161bfeaceafe3b27d58407cc461 (commit)
via 1fbce07805f3598d64fb0aa0e1a1654af797d248 (commit)
via bc0700e016c67791d3e3eab855543d849f4ce786 (commit)
via a08adcd2835ad6c4d4e21b052376e46b246be15a (commit)
via f8158d047aec5b373bdaf011885104780220608d (commit)
via de68ee6f1b7f67e20bfb43db42df44fa6784ff1d (commit)
via f44944c18da6d34d56de7bfc71d96b34b7511104 (commit)
from 7f022f1c8f2e8f905f28bdceea54277ad551f242 (commit)
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/d53b43608ac2c514e212d35ec3f485d08d250da1
commit d53b43608ac2c514e212d35ec3f485d08d250da1
Author: Alexey I. Froloff <[email protected]>
Date: Tue Jun 19 02:25:14 2012 +0400
wmmenugen: properly skip NoDispaly entries
Last group from a desktop file is always added to menu regardless of
NoDisplay property. Properly handle the NoDisplay and Hidden properties
at the end of file.
Signed-off-by: Alexey I. Froloff <[email protected]>
diff --git a/util/wmmenugen_parse_xdg.c b/util/wmmenugen_parse_xdg.c
index f39a83e..f5cdb58 100644
--- a/util/wmmenugen_parse_xdg.c
+++ b/util/wmmenugen_parse_xdg.c
@@ -119,13 +119,11 @@ void parse_xdg(const char *file, void
(*addWMMenuEntryCallback)(WMMenuEntry *aEn
continue;
if (strcmp(p, "[Desktop Entry]") == 0) {
- if (InGroup) {
- /* if currently processing a group, we've just
hit the
- * end of its definition, try processing it
- */
- if (xdg_to_wm(&xdg, &wm)) {
- (*addWMMenuEntryCallback)(wm);
- }
+ /* if currently processing a group, we've just hit the
+ * end of its definition, try processing it
+ */
+ if (InGroup && xdg_to_wm(&xdg, &wm)) {
+ (*addWMMenuEntryCallback)(wm);
}
init_xdg_storage(&xdg);
init_wm_storage(&wm);
@@ -180,8 +178,10 @@ void parse_xdg(const char *file, void
(*addWMMenuEntryCallback)(WMMenuEntry *aEn
fclose(fp);
- /* at the end of the file, might as well try to menuize what we have */
- if (xdg_to_wm(&xdg, &wm))
+ /* at the end of the file, might as well try to menuize what we have
+ * unless there was no group at all or it was marked as hidden
+ */
+ if (InGroup && xdg_to_wm(&xdg, &wm))
(*addWMMenuEntryCallback)(wm);
}
http://repo.or.cz/w/wmaker-crm.git/commit/def62293e9be7935adf47230c1acf19bdd59acf9
commit def62293e9be7935adf47230c1acf19bdd59acf9
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Sun Jun 17 10:54:45 2012 +0200
New debian version 0.95.3-2
* Hardening
* Upload allowed for maintainers
diff --git a/debian/changelog b/debian/changelog
index 756f0a6..2c08e36 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+wmaker (0.95.3-2) unstable; urgency=low
+
+ * Hardened. debian/rules changed.
+ * DM-Upload-Allowed set.
+
+ -- Rodolfo GarcÃa Peñas (kix) <[email protected]> Thu, 10 Jun 2012 23:35:31 +0200
+
wmaker (0.95.3-1) unstable; urgency=low
* New upstream release 0.95.3
diff --git a/debian/control b/debian/control
index 3af1f8f..5bb23fe 100644
--- a/debian/control
+++ b/debian/control
@@ -3,6 +3,7 @@ Section: x11
Priority: optional
Maintainer: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Standards-Version: 3.9.3
+DM-Upload-Allowed: yes
Build-Depends: debhelper (>= 7.0.50~), automake (>= 1:1.11), gettext,
libfontconfig1-dev, libjpeg-dev, libpng-dev, libsm-dev, libtiff4-dev,
libtool, libgif-dev, libx11-dev, libxext-dev, libxft-dev, libxinerama-dev,
diff --git a/debian/rules b/debian/rules
index ffb48ec..9884737 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,17 +1,9 @@
#!/usr/bin/make -f
# export DH_VERBOSE=1
-
-CFLAGS = -g -Wall -DGLOBAL_DEFAULTS_SUBDIR="\"GNUstep/Defaults\""
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -DDEBUG
-endif
+export CFLAGS = `dpkg-buildflags --get CFLAGS`
+export DEB_CFLAGS_MAINT_APPEND += -Wall
-DGLOBAL_DEFAULTS_SUBDIR="\"GNUstep/Defaults\""
+export LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+export CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
@@ -65,7 +57,7 @@ COMMON_OPTIONS := --prefix=$(BASEDIR)
override_dh_auto_configure:
./autogen.sh
LINGUAS="$(LINGUAS)" ./configure $(COMMON_OPTIONS) -
$(WMAKER_OPTIONS) CFLAGS="$(CFLAGS)"
+ $(WMAKER_OPTIONS) $(shell dpkg-buildflags --export=configure)
override_dh_installmenu:
dh_installmenu -a --noscripts
http://repo.or.cz/w/wmaker-crm.git/commit/089c99941fe4b63b462e57631960053ee333ed3a
commit 089c99941fe4b63b462e57631960053ee333ed3a
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Fri Jun 15 22:58:15 2012 +0200
Icon painting moved to makeAppIconFor()
The icon painting is moved to the function makeAppIconFor()
including the check for no_appicon.
wAppIconCreate is now static because is only used in makeAppIconFor()
diff --git a/src/appicon.c b/src/appicon.c
index ce910dd..2be3eab 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -67,6 +67,7 @@ void appIconMouseDown(WObjDescriptor * desc, XEvent * event);
static void iconDblClick(WObjDescriptor * desc, XEvent * event);
static void iconExpose(WObjDescriptor * desc, XEvent * event);
static void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
char *wm_class);
+static WAppIcon *wAppIconCreate(WWindow * leader_win);
/* This function is used if the application is a .app. It checks if it has an
icon in it
* like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff
@@ -161,13 +162,12 @@ void makeAppIconFor(WApplication * wapp)
if (wapp->app_icon)
return;
- if (!WFLAGP(wapp->main_window_desc, no_appicon))
- wapp->app_icon = wAppIconCreate(wapp->main_window_desc);
- else
- wapp->app_icon = NULL;
+ /* Create the icon */
+ wapp->app_icon = wAppIconCreate(wapp->main_window_desc);
/* Now, paint the icon */
- paint_app_icon(wapp);
+ if (!WFLAGP(wapp->main_window_desc, no_appicon))
+ paint_app_icon(wapp);
}
void paint_app_icon(WApplication *wapp)
@@ -236,7 +236,7 @@ void removeAppIconFor(WApplication * wapp)
wArrangeIcons(wapp->main_window_desc->screen_ptr, True);
}
-WAppIcon *wAppIconCreate(WWindow * leader_win)
+static WAppIcon *wAppIconCreate(WWindow * leader_win)
{
WAppIcon *aicon;
WScreen *scr = leader_win->screen_ptr;
@@ -991,6 +991,6 @@ void app_icon_create_from_docks(WWindow *wwin, WApplication
*wapp, Window main_w
wAppIconPaint(wapp->app_icon);
wAppIconSave(wapp->app_icon);
} else {
- wapp->app_icon = wAppIconCreate(wapp->main_window_desc);
+ makeAppIconFor(wapp);
}
}
diff --git a/src/appicon.h b/src/appicon.h
index e401696..421ba47 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -69,7 +69,6 @@ typedef struct WAppIcon {
unsigned int lock:1; /* do not allow to be destroyed */
} WAppIcon;
-WAppIcon *wAppIconCreate(WWindow *leader_win);
WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance,
char *wm_class, int tile);
diff --git a/src/application.c b/src/application.c
index 43803c2..33ee7ba 100644
--- a/src/application.c
+++ b/src/application.c
@@ -151,10 +151,6 @@ WApplication *wApplicationCreate(WWindow * wwin)
/* Save the app_icon in a file */
save_app_icon(wapp);
- /* Now, paint the icon */
- if (!WFLAGP(wapp->main_window_desc, no_appicon))
- paint_app_icon(wapp);
-
return wapp;
}
http://repo.or.cz/w/wmaker-crm.git/commit/ee450acb30fa488bc43e26f9c1f9423441bbee84
commit ee450acb30fa488bc43e26f9c1f9423441bbee84
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 11:59:36 2012 +0200
Change a small comment in icon.c
The path of the CacheIcons is defined at CACHE_ICON_PATH. The path
~/GNUstep/Library/WindowMaker/CachedPixmaps can be changed in a future
and the comment is incorrect.
diff --git a/src/icon.c b/src/icon.c
index 59161d3..a270a35 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -469,7 +469,7 @@ static RImage *get_wwindow_image_from_wmhints(WWindow
*wwin, WIcon *icon)
/*
* wIconStore--
- * Stores the client supplied icon at
~/GNUstep/Library/WindowMaker/CachedPixmaps
+ * Stores the client supplied icon at CACHE_ICON_PATH
* and returns the path for that icon. Returns NULL if there is no
* client supplied icon or on failure.
*
http://repo.or.cz/w/wmaker-crm.git/commit/50765fab84889ae71c4a54afec75dd66250f3100
commit 50765fab84889ae71c4a54afec75dd66250f3100
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 11:57:41 2012 +0200
GetProgramNameForWindow removed
The function GetProgramNameForWindow is no longer used, so it can be
removed.
diff --git a/src/funcs.h b/src/funcs.h
index e827504..48fd5b3 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -111,7 +111,6 @@ Bool wGetIconName(Display *dpy, Window win, char
**iconname);
/* Free returned string it when done. (applies to the next 2 functions) */
char * GetCommandForWindow(Window win);
-char * GetProgramNameForWindow(Window win);
Bool GetCommandForPid(int pid, char ***argv, int *argc);
diff --git a/src/misc.c b/src/misc.c
index fd283c2..389ad00 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1094,9 +1094,3 @@ char *GetCommandForWindow(Window win)
{
return getCommandForWindow(win, 0);
}
-
-/* Free result when done */
-char *GetProgramNameForWindow(Window win)
-{
- return getCommandForWindow(win, 1);
-}
http://repo.or.cz/w/wmaker-crm.git/commit/fbd9c12cd04e5d26a491506f16077f806c17154e
commit fbd9c12cd04e5d26a491506f16077f806c17154e
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 11:54:18 2012 +0200
Do static icon functions
The functions wApplicationSaveIconPathFor() and
wApplicationExtractDirPackIcon()
are now used only in appicon.c and can be static.
diff --git a/src/appicon.c b/src/appicon.c
index a2c47d3..ce910dd 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -66,11 +66,12 @@ extern WDDomain *WDWindowAttributes;
void appIconMouseDown(WObjDescriptor * desc, XEvent * event);
static void iconDblClick(WObjDescriptor * desc, XEvent * event);
static void iconExpose(WObjDescriptor * desc, XEvent * event);
+static void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
char *wm_class);
/* This function is used if the application is a .app. It checks if it has an
icon in it
* like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff
*/
-void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char
*wm_instance, char *wm_class)
+static void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char
*wm_instance, char *wm_class)
{
char *iconPath = NULL;
char *tmp = NULL;
@@ -890,7 +891,7 @@ void appIconMouseDown(WObjDescriptor * desc, XEvent * event)
}
/* This function save the application icon and store the path in the
Dictionary */
-void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char
*wm_class)
+static void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
char *wm_class)
{
WMPropList *dict = WDWindowAttributes->dictionary;
WMPropList *adict, *key, *iconk;
diff --git a/src/appicon.h b/src/appicon.h
index 0785295..e401696 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -81,9 +81,5 @@ void makeAppIconFor(WApplication * wapp);
void removeAppIconFor(WApplication * wapp);
void save_app_icon(WApplication *wapp);
void paint_app_icon(WApplication *wapp);
-void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
- char *wm_class);
-void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
- char *wm_class);
void wAppIconSave(WAppIcon *aicon);
#endif
http://repo.or.cz/w/wmaker-crm.git/commit/e3b9026532021161bfeaceafe3b27d58407cc461
commit e3b9026532021161bfeaceafe3b27d58407cc461
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 11:51:57 2012 +0200
save_app_icon WWindow argument removed
The argument wwin (WWindow) is not used in save_app_icon, so it can
be removed.
diff --git a/src/appicon.c b/src/appicon.c
index 9201f8d..a2c47d3 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -931,7 +931,7 @@ void wApplicationSaveIconPathFor(char *iconPath, char
*wm_instance, char *wm_cla
/* Save the application icon */
/* This function is used by normal windows */
-void save_app_icon(WWindow *wwin, WApplication *wapp)
+void save_app_icon(WApplication *wapp)
{
if (!wapp->app_icon)
return;
diff --git a/src/appicon.h b/src/appicon.h
index d532c10..0785295 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -79,7 +79,7 @@ void wAppIconPaint(WAppIcon *aicon);
void wAppIconMove(WAppIcon *aicon, int x, int y);
void makeAppIconFor(WApplication * wapp);
void removeAppIconFor(WApplication * wapp);
-void save_app_icon(WWindow *wwin, WApplication *wapp);
+void save_app_icon(WApplication *wapp);
void paint_app_icon(WApplication *wapp);
void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
char *wm_class);
diff --git a/src/application.c b/src/application.c
index dee6fcc..43803c2 100644
--- a/src/application.c
+++ b/src/application.c
@@ -149,7 +149,7 @@ WApplication *wApplicationCreate(WWindow * wwin)
app_icon_create_from_docks(wwin, wapp, main_window);
/* Save the app_icon in a file */
- save_app_icon(wwin, wapp);
+ save_app_icon(wapp);
/* Now, paint the icon */
if (!WFLAGP(wapp->main_window_desc, no_appicon))
http://repo.or.cz/w/wmaker-crm.git/commit/1fbce07805f3598d64fb0aa0e1a1654af797d248
commit 1fbce07805f3598d64fb0aa0e1a1654af797d248
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 11:47:44 2012 +0200
extractIcon removed.
The function extractIcon is removed, and its behaviour is moved to
save_app_icon, because this function is always called.
To do that, save_app_icon doesn't need to check if the icon is saved (it's
done at wIconStore). The icon now is saved always (if it doesn't exist),
like extractIcon() used to do.
diff --git a/src/appicon.c b/src/appicon.c
index b46bf72..9201f8d 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -929,34 +929,14 @@ void wApplicationSaveIconPathFor(char *iconPath, char
*wm_instance, char *wm_cla
UpdateDomainFile(WDWindowAttributes);
}
+/* Save the application icon */
+/* This function is used by normal windows */
void save_app_icon(WWindow *wwin, WApplication *wapp)
{
- char *tmp, *path;
- struct stat dummy;
- WScreen *scr = NULL;
-
if (!wapp->app_icon)
return;
- scr = wwin->screen_ptr;
- tmp = wDefaultGetIconFile(scr, wapp->app_icon->wm_instance,
wapp->app_icon->wm_class, True);
-
- /* If the icon was saved by us from the client supplied icon, but is
- * missing, recreate it. */
- if (tmp && strstr(tmp, "Library/WindowMaker/CachedPixmaps") != NULL &&
- stat(tmp, &dummy) != 0 && errno == ENOENT) {
- wmessage(_("recreating missing icon '%s'"), tmp);
- path = wIconStore(wapp->app_icon->icon);
- if (path)
- wfree(path);
-
- wIconUpdate(wapp->app_icon->icon);
- wAppIconPaint(wapp->app_icon);
- }
-
- /* if the displayed icon was supplied by the client, save the icon */
- if (!tmp || strstr(tmp, "Library/WindowMaker/CachedPixmaps") != NULL)
- wAppIconSave(wapp->app_icon);
+ save_app_icon_core(wapp->app_icon);
}
static WAppIcon *findDockIconFor(WDock *dock, Window main_window)
diff --git a/src/application.c b/src/application.c
index f29e90f..dee6fcc 100644
--- a/src/application.c
+++ b/src/application.c
@@ -77,19 +77,6 @@ WApplication *wApplicationOf(Window window)
return wapp;
}
-static void extractIcon(WWindow * wwin)
-{
- char *progname;
-
- /* Get the application name */
- progname = GetProgramNameForWindow(wwin->client_win);
- if (progname) {
- /* Save the icon path if the application is ".app" */
- wApplicationExtractDirPackIcon(wwin->screen_ptr, progname,
wwin->wm_instance, wwin->wm_class);
- wfree(progname);
- }
-}
-
WApplication *wApplicationCreate(WWindow * wwin)
{
WScreen *scr = wwin->screen_ptr;
@@ -137,8 +124,6 @@ WApplication *wApplicationCreate(WWindow * wwin)
wapp->main_window_desc->fake_group = wwin->fake_group;
wapp->main_window_desc->net_icon_image =
RRetainImage(wwin->net_icon_image);
- extractIcon(wapp->main_window_desc);
-
leader = wWindowFor(main_window);
if (leader)
leader->main_window = main_window;
http://repo.or.cz/w/wmaker-crm.git/commit/bc0700e016c67791d3e3eab855543d849f4ce786
commit bc0700e016c67791d3e3eab855543d849f4ce786
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 11:15:19 2012 +0200
Create WAppIcon always
When the application is created, the WAppIcon now is created always,
but it is only painted if the flag is not set.
The icon initialization to NULL can be done now at
app_icon_create_from_docks
because it is always called.
diff --git a/src/appicon.c b/src/appicon.c
index cccfa6b..b46bf72 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -975,6 +975,9 @@ void app_icon_create_from_docks(WWindow *wwin, WApplication
*wapp, Window main_w
{
WScreen *scr = wwin->screen_ptr;
+ /* Create the application icon */
+ wapp->app_icon = NULL;
+
if (scr->last_dock)
wapp->app_icon = findDockIconFor(scr->last_dock, main_window);
diff --git a/src/application.c b/src/application.c
index be305b2..f29e90f 100644
--- a/src/application.c
+++ b/src/application.c
@@ -158,20 +158,17 @@ WApplication *wApplicationCreate(WWindow * wwin)
/* application descriptor */
XSaveContext(dpy, main_window, wAppWinContext, (XPointer) wapp);
- /* Create the application icon */
- wapp->app_icon = NULL;
- if (!WFLAGP(wapp->main_window_desc, no_appicon)) {
- /* Create the application icon using the icon from docks
- * If not found in docks, create a new icon
- * using the function wAppIconCreate() */
- app_icon_create_from_docks(wwin, wapp, main_window);
-
- /* Now, paint the icon */
- paint_app_icon(wapp);
+ /* Create the application icon using the icon from docks
+ * If not found in docks, create a new icon
+ * using the function wAppIconCreate() */
+ app_icon_create_from_docks(wwin, wapp, main_window);
- /* Save the app_icon in a file */
- save_app_icon(wwin, wapp);
- }
+ /* Save the app_icon in a file */
+ save_app_icon(wwin, wapp);
+
+ /* Now, paint the icon */
+ if (!WFLAGP(wapp->main_window_desc, no_appicon))
+ paint_app_icon(wapp);
return wapp;
}
http://repo.or.cz/w/wmaker-crm.git/commit/a08adcd2835ad6c4d4e21b052376e46b246be15a
commit a08adcd2835ad6c4d4e21b052376e46b246be15a
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 10:35:18 2012 +0200
app_icon_create_from_docks moved to appicon.c
The function app_icon_create_from_docks is moved to appicon.c, because
it is a function to create application icons.
The static function findDockIconFor is moved too because it is only used
at app_icon_create_from_docks().
diff --git a/src/appicon.c b/src/appicon.c
index 3e391eb..cccfa6b 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -958,3 +958,55 @@ void save_app_icon(WWindow *wwin, WApplication *wapp)
if (!tmp || strstr(tmp, "Library/WindowMaker/CachedPixmaps") != NULL)
wAppIconSave(wapp->app_icon);
}
+
+static WAppIcon *findDockIconFor(WDock *dock, Window main_window)
+{
+ WAppIcon *aicon = NULL;
+
+ aicon = wDockFindIconForWindow(dock, main_window);
+ if (!aicon) {
+ wDockTrackWindowLaunch(dock, main_window);
+ aicon = wDockFindIconForWindow(dock, main_window);
+ }
+ return aicon;
+}
+
+void app_icon_create_from_docks(WWindow *wwin, WApplication *wapp, Window
main_window)
+{
+ WScreen *scr = wwin->screen_ptr;
+
+ if (scr->last_dock)
+ wapp->app_icon = findDockIconFor(scr->last_dock, main_window);
+
+ /* check main dock if we did not find it in last dock */
+ if (!wapp->app_icon && scr->dock)
+ wapp->app_icon = findDockIconFor(scr->dock, main_window);
+
+ /* finally check clips */
+ if (!wapp->app_icon) {
+ int i;
+ for (i = 0; i < scr->workspace_count; i++) {
+ WDock *dock = scr->workspaces[i]->clip;
+ if (dock)
+ wapp->app_icon = findDockIconFor(dock,
main_window);
+ if (wapp->app_icon)
+ break;
+ }
+ }
+
+ /* If created, then set some flags */
+ if (wapp->app_icon) {
+ WWindow *mainw = wapp->main_window_desc;
+
+ wapp->app_icon->running = 1;
+ wapp->app_icon->icon->force_paint = 1;
+ wapp->app_icon->icon->owner = mainw;
+ if (mainw->wm_hints && (mainw->wm_hints->flags &
IconWindowHint))
+ wapp->app_icon->icon->icon_win =
mainw->wm_hints->icon_window;
+
+ wAppIconPaint(wapp->app_icon);
+ wAppIconSave(wapp->app_icon);
+ } else {
+ wapp->app_icon = wAppIconCreate(wapp->main_window_desc);
+ }
+}
diff --git a/src/appicon.h b/src/appicon.h
index 1f0eb7c..d532c10 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -73,6 +73,7 @@ WAppIcon *wAppIconCreate(WWindow *leader_win);
WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance,
char *wm_class, int tile);
+void app_icon_create_from_docks(WWindow *wwin, WApplication *wapp, Window
main_window);
void wAppIconDestroy(WAppIcon *aicon);
void wAppIconPaint(WAppIcon *aicon);
void wAppIconMove(WAppIcon *aicon, int x, int y);
diff --git a/src/application.c b/src/application.c
index c3c46d5..be305b2 100644
--- a/src/application.c
+++ b/src/application.c
@@ -77,18 +77,6 @@ WApplication *wApplicationOf(Window window)
return wapp;
}
-static WAppIcon *findDockIconFor(WDock * dock, Window main_window)
-{
- WAppIcon *aicon = NULL;
-
- aicon = wDockFindIconForWindow(dock, main_window);
- if (!aicon) {
- wDockTrackWindowLaunch(dock, main_window);
- aicon = wDockFindIconForWindow(dock, main_window);
- }
- return aicon;
-}
-
static void extractIcon(WWindow * wwin)
{
char *progname;
@@ -101,45 +89,6 @@ static void extractIcon(WWindow * wwin)
wfree(progname);
}
}
-static void app_icon_create_from_docks(WWindow *wwin, WApplication *wapp,
Window main_window)
-{
- WScreen *scr = wwin->screen_ptr;
-
- if (scr->last_dock)
- wapp->app_icon = findDockIconFor(scr->last_dock, main_window);
-
- /* check main dock if we did not find it in last dock */
- if (!wapp->app_icon && scr->dock)
- wapp->app_icon = findDockIconFor(scr->dock, main_window);
-
- /* finally check clips */
- if (!wapp->app_icon) {
- int i;
- for (i = 0; i < scr->workspace_count; i++) {
- WDock *dock = scr->workspaces[i]->clip;
- if (dock)
- wapp->app_icon = findDockIconFor(dock,
main_window);
- if (wapp->app_icon)
- break;
- }
- }
-
- /* If created, then set some flags */
- if (wapp->app_icon) {
- WWindow *mainw = wapp->main_window_desc;
-
- wapp->app_icon->running = 1;
- wapp->app_icon->icon->force_paint = 1;
- wapp->app_icon->icon->owner = mainw;
- if (mainw->wm_hints && (mainw->wm_hints->flags &
IconWindowHint))
- wapp->app_icon->icon->icon_win =
mainw->wm_hints->icon_window;
-
- wAppIconPaint(wapp->app_icon);
- wAppIconSave(wapp->app_icon);
- } else {
- wapp->app_icon = wAppIconCreate(wapp->main_window_desc);
- }
-}
WApplication *wApplicationCreate(WWindow * wwin)
{
http://repo.or.cz/w/wmaker-crm.git/commit/f8158d047aec5b373bdaf011885104780220608d
commit f8158d047aec5b373bdaf011885104780220608d
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 10:26:17 2012 +0200
wAppIconSave splitted
The function wAppIconSave is splitted in two functions:
wAppIconSave() + save_app_icon_core()
The function save_app_icon_core will be used in other functions as
common code.
diff --git a/src/appicon.c b/src/appicon.c
index d776ce4..3e391eb 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -396,13 +396,11 @@ void wAppIconPaint(WAppIcon * aicon)
0, 0, wPreferences.icon_size,
wPreferences.icon_size);
}
-void wAppIconSave(WAppIcon *aicon)
+/* Internal application to save the application icon */
+static void save_app_icon_core(WAppIcon *aicon)
{
char *path;
- if (!aicon->docked || aicon->attracted)
- return;
-
path = wIconStore(aicon->icon);
if (!path)
return;
@@ -410,7 +408,16 @@ void wAppIconSave(WAppIcon *aicon)
wApplicationSaveIconPathFor(path, aicon->wm_instance, aicon->wm_class);
wfree(path);
- return;
+}
+
+/* Save the application icon */
+/* This function is used when the icon doesn't have window, like dock or clip
*/
+void wAppIconSave(WAppIcon *aicon)
+{
+ if (!aicon->docked || aicon->attracted)
+ return;
+
+ save_app_icon_core(aicon);
}
#define canBeDocked(wwin) ((wwin) && ((wwin)->wm_class||(wwin)->wm_instance))
http://repo.or.cz/w/wmaker-crm.git/commit/de68ee6f1b7f67e20bfb43db42df44fa6784ff1d
commit de68ee6f1b7f67e20bfb43db42df44fa6784ff1d
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 10:18:50 2012 +0200
wAppIconSave is now void
The Bool value is not used, therefore it suffices to return void.
wAppIconChangeImage is removed from appicon.h, because it is not
implemented.
Small code cleanup for wAppIconCreateForDock at appicon.h.
diff --git a/src/appicon.c b/src/appicon.c
index c2707a8..d776ce4 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -396,20 +396,21 @@ void wAppIconPaint(WAppIcon * aicon)
0, 0, wPreferences.icon_size,
wPreferences.icon_size);
}
-Bool wAppIconSave(WAppIcon *aicon)
+void wAppIconSave(WAppIcon *aicon)
{
char *path;
- if (!aicon->docked || aicon->attracted) return True;
+ if (!aicon->docked || aicon->attracted)
+ return;
path = wIconStore(aicon->icon);
if (!path)
- return False;
+ return;
wApplicationSaveIconPathFor(path, aicon->wm_instance, aicon->wm_class);
wfree(path);
- return True;
+ return;
}
#define canBeDocked(wwin) ((wwin) && ((wwin)->wm_class||(wwin)->wm_instance))
diff --git a/src/appicon.h b/src/appicon.h
index b9e9636..1f0eb7c 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -70,8 +70,8 @@ typedef struct WAppIcon {
} WAppIcon;
WAppIcon *wAppIconCreate(WWindow *leader_win);
-WAppIcon * wAppIconCreateForDock(WScreen *scr, char *command, char
*wm_instance,
- char *wm_class, int tile);
+WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance,
+ char *wm_class, int tile);
void wAppIconDestroy(WAppIcon *aicon);
void wAppIconPaint(WAppIcon *aicon);
@@ -84,7 +84,5 @@ void wApplicationSaveIconPathFor(char *iconPath, char
*wm_instance,
char *wm_class);
void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
char *wm_class);
-
-Bool wAppIconChangeImage(WAppIcon *icon, char *file);
-Bool wAppIconSave(WAppIcon *aicon);
+void wAppIconSave(WAppIcon *aicon);
#endif
http://repo.or.cz/w/wmaker-crm.git/commit/f44944c18da6d34d56de7bfc71d96b34b7511104
commit f44944c18da6d34d56de7bfc71d96b34b7511104
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Mon Jun 18 08:47:15 2012 +0200
Icon functions moved to appicon.c
The icon functions wApplicationExtractDirPackIcon()
wApplicationSaveIconPathFor()
are moved to appicon.c from application.c.
This functions are Application Icon related and should be included in
appicon.
diff --git a/src/appicon.c b/src/appicon.c
index 0083944..c2707a8 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -26,6 +26,7 @@
#include <X11/Xutil.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <errno.h>
@@ -58,6 +59,7 @@
/**** Global variables ****/
extern Cursor wCursor[WCUR_LAST];
extern WPreferences wPreferences;
+extern WDDomain *WDWindowAttributes;
#define MOD_MASK wPreferences.modifier_mask
@@ -65,6 +67,41 @@ void appIconMouseDown(WObjDescriptor * desc, XEvent * event);
static void iconDblClick(WObjDescriptor * desc, XEvent * event);
static void iconExpose(WObjDescriptor * desc, XEvent * event);
+/* This function is used if the application is a .app. It checks if it has an
icon in it
+ * like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff
+ */
+void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char
*wm_instance, char *wm_class)
+{
+ char *iconPath = NULL;
+ char *tmp = NULL;
+
+ if (strstr(path, ".app")) {
+ tmp = wmalloc(strlen(path) + 16);
+
+ if (scr->flags.supports_tiff) {
+ strcpy(tmp, path);
+ strcat(tmp, ".tiff");
+ if (access(tmp, R_OK) == 0)
+ iconPath = tmp;
+ }
+
+ if (!iconPath) {
+ strcpy(tmp, path);
+ strcat(tmp, ".xpm");
+ if (access(tmp, R_OK) == 0)
+ iconPath = tmp;
+ }
+
+ if (!iconPath)
+ wfree(tmp);
+
+ if (iconPath) {
+ wApplicationSaveIconPathFor(iconPath, wm_instance,
wm_class);
+ wfree(iconPath);
+ }
+ }
+}
+
WAppIcon *wAppIconCreateForDock(WScreen * scr, char *command, char
*wm_instance, char *wm_class, int tile)
{
WAppIcon *dicon;
@@ -844,6 +881,46 @@ void appIconMouseDown(WObjDescriptor * desc, XEvent *
event)
}
}
+/* This function save the application icon and store the path in the
Dictionary */
+void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char
*wm_class)
+{
+ WMPropList *dict = WDWindowAttributes->dictionary;
+ WMPropList *adict, *key, *iconk;
+ WMPropList *val;
+ char *tmp;
+
+ tmp = get_name_for_instance_class(wm_instance, wm_class);
+ key = WMCreatePLString(tmp);
+ wfree(tmp);
+
+ adict = WMGetFromPLDictionary(dict, key);
+ iconk = WMCreatePLString("Icon");
+
+ if (adict) {
+ val = WMGetFromPLDictionary(adict, iconk);
+ } else {
+ /* no dictionary for app, so create one */
+ adict = WMCreatePLDictionary(NULL, NULL);
+ WMPutInPLDictionary(dict, key, adict);
+ WMReleasePropList(adict);
+ val = NULL;
+ }
+
+ if (!val) {
+ val = WMCreatePLString(iconPath);
+ WMPutInPLDictionary(adict, iconk, val);
+ WMReleasePropList(val);
+ } else {
+ val = NULL;
+ }
+
+ WMReleasePropList(key);
+ WMReleasePropList(iconk);
+
+ if (val && !wPreferences.flags.noupdates)
+ UpdateDomainFile(WDWindowAttributes);
+}
+
void save_app_icon(WWindow *wwin, WApplication *wapp)
{
char *tmp, *path;
diff --git a/src/appicon.h b/src/appicon.h
index 774c3e3..b9e9636 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -80,6 +80,10 @@ void makeAppIconFor(WApplication * wapp);
void removeAppIconFor(WApplication * wapp);
void save_app_icon(WWindow *wwin, WApplication *wapp);
void paint_app_icon(WApplication *wapp);
+void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
+ char *wm_class);
+void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
+ char *wm_class);
Bool wAppIconChangeImage(WAppIcon *icon, char *file);
Bool wAppIconSave(WAppIcon *aicon);
diff --git a/src/application.c b/src/application.c
index ca47203..c3c46d5 100644
--- a/src/application.c
+++ b/src/application.c
@@ -21,9 +21,7 @@
#include "wconfig.h"
#include <X11/Xlib.h>
-
#include <string.h>
-#include <unistd.h>
#include "WindowMaker.h"
#include "menu.h"
@@ -35,8 +33,6 @@
#include "application.h"
#include "appmenu.h"
#include "properties.h"
-#include "stacking.h"
-#include "actions.h"
#include "workspace.h"
#include "dock.h"
@@ -44,8 +40,6 @@
extern XContext wAppWinContext;
extern XContext wWinContext;
-extern WPreferences wPreferences;
-extern WDDomain *WDWindowAttributes;
/******** Local variables ********/
@@ -107,81 +101,6 @@ static void extractIcon(WWindow * wwin)
wfree(progname);
}
}
-
-void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char
*wm_class)
-{
- WMPropList *dict = WDWindowAttributes->dictionary;
- WMPropList *adict, *key, *iconk;
- WMPropList *val;
- char *tmp;
-
- tmp = get_name_for_instance_class(wm_instance, wm_class);
- key = WMCreatePLString(tmp);
- wfree(tmp);
-
- adict = WMGetFromPLDictionary(dict, key);
- iconk = WMCreatePLString("Icon");
-
- if (adict) {
- val = WMGetFromPLDictionary(adict, iconk);
- } else {
- /* no dictionary for app, so create one */
- adict = WMCreatePLDictionary(NULL, NULL);
- WMPutInPLDictionary(dict, key, adict);
- WMReleasePropList(adict);
- val = NULL;
- }
-
- if (!val) {
- val = WMCreatePLString(iconPath);
- WMPutInPLDictionary(adict, iconk, val);
- WMReleasePropList(val);
- } else {
- val = NULL;
- }
-
- WMReleasePropList(key);
- WMReleasePropList(iconk);
-
- if (val && !wPreferences.flags.noupdates)
- UpdateDomainFile(WDWindowAttributes);
-}
-
-/* This function is used if the application is a .app. It checks if it has an
icon in it
- * like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff
- */
-void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char
*wm_instance, char *wm_class)
-{
- char *iconPath = NULL;
- char *tmp = NULL;
-
- if (strstr(path, ".app")) {
- tmp = wmalloc(strlen(path) + 16);
-
- if (scr->flags.supports_tiff) {
- strcpy(tmp, path);
- strcat(tmp, ".tiff");
- if (access(tmp, R_OK) == 0)
- iconPath = tmp;
- }
-
- if (!iconPath) {
- strcpy(tmp, path);
- strcat(tmp, ".xpm");
- if (access(tmp, R_OK) == 0)
- iconPath = tmp;
- }
-
- if (!iconPath)
- wfree(tmp);
-
- if (iconPath) {
- wApplicationSaveIconPathFor(iconPath, wm_instance,
wm_class);
- wfree(iconPath);
- }
- }
-}
-
static void app_icon_create_from_docks(WWindow *wwin, WApplication *wapp,
Window main_window)
{
WScreen *scr = wwin->screen_ptr;
@@ -381,4 +300,3 @@ void wApplicationDeactivate(WApplication *wapp)
}
#endif
}
-
diff --git a/src/application.h b/src/application.h
index 31cbe68..1a95999 100644
--- a/src/application.h
+++ b/src/application.h
@@ -48,10 +48,6 @@ typedef struct WApplication {
WApplication *wApplicationCreate(struct WWindow *wwin);
WApplication *wApplicationOf(Window window);
void wApplicationDestroy(WApplication *wapp);
-void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
- char *wm_class);
-void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance,
- char *wm_class);
void wAppBounce(WApplication *);
void wAppBounceWhileUrgent(WApplication *);
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 7 ++
debian/control | 1 +
debian/rules | 18 +---
src/appicon.c | 179 ++++++++++++++++++++++++++++++++++++-------
src/appicon.h | 12 +--
src/application.c | 167 ++---------------------------------------
src/application.h | 4 -
src/funcs.h | 1 -
src/icon.c | 2 +-
src/misc.c | 6 --
util/wmmenugen_parse_xdg.c | 18 ++--
11 files changed, 184 insertions(+), 231 deletions(-)
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].