aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/matchbox-panel/matchbox-panel-0.9.2
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/matchbox-panel/matchbox-panel-0.9.2
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/matchbox-panel/matchbox-panel-0.9.2')
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.2/add_hostap.patch24
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.2/kernel2.6.patch226
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.2/mb-applet-battery-repaint.patch43
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-allow-disabling-menu-panel.patch33
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-multi-category-matching.patch32
-rw-r--r--recipes/matchbox-panel/matchbox-panel-0.9.2/system-monitor-crash-fix.patch195
6 files changed, 553 insertions, 0 deletions
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.2/add_hostap.patch b/recipes/matchbox-panel/matchbox-panel-0.9.2/add_hostap.patch
new file mode 100644
index 0000000000..94cc08364b
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.2/add_hostap.patch
@@ -0,0 +1,24 @@
+--- matchbox-panel-0.9.2/applets/mb-applet-wireless.c.old 2005-04-05 19:55:39.000000000 +0200
++++ matchbox-panel-0.9.2/applets/mb-applet-wireless.c 2005-12-17 14:00:01.000000000 +0100
+@@ -354,8 +354,19 @@
+ if (Mwd.iface != NULL)
+ return 0;
+
+- /* mark first found as one to monitor */
+- Mwd.iface = strdup(ifname);
++ if(iw_get_range_info(Wfd, ifname, &(WInfo.range)) >= 0)
++ WInfo.has_range = 1;
++
++ if (iw_get_stats(Wfd, ifname,
++ &(WInfo.stats),
++ &(WInfo.range), WInfo.has_range) >= 0)
++ {
++ Mwd.iface = strdup(ifname);
++ }
++ else
++ {
++ Mwd.iface = "wlan0";
++ }
+
+ return 0;
+ }
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.2/kernel2.6.patch b/recipes/matchbox-panel/matchbox-panel-0.9.2/kernel2.6.patch
new file mode 100644
index 0000000000..f849c8a41e
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.2/kernel2.6.patch
@@ -0,0 +1,226 @@
+--- matchbox-panel-0.9.2/applets/mb-applet-system-monitor.c.old 2005-03-20 18:43:31.000000000 +0100
++++ matchbox-panel-0.9.2/applets/mb-applet-system-monitor.c 2005-12-21 10:24:18.000000000 +0100
+@@ -37,6 +37,11 @@
+ # define _(text) (text)
+ #endif
+
++#include <linux/version.h>
++#ifndef KERNEL_VERSION
++#define KERNEL_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c))
++#endif
++
+ #ifdef MB_HAVE_PNG
+ #define IMG_EXT "png"
+ #else
+@@ -112,71 +117,148 @@
+
+ int system_memory(void)
+ {
+- u_int64_t my_mem_used, my_mem_max;
+- u_int64_t my_swap_max;
+-
+- static int mem_delay = 0;
+- FILE *mem;
+- static u_int64_t total, used, mfree, shared, buffers, cached,
+- cache_total, cache_used;
+-
+- /* put this in permanent storage instead of stack */
+- static char not_needed[2048];
+-
+- if (mem_delay-- <= 0) {
+- if ((mem = fopen("/proc/meminfo", "r")) == NULL)
+- {
+- fprintf(stderr, "mb-applet-system-monitor: failed to open /proc/meminfo. Exiting.\n");
+- exit(1);
+- }
+-
+-
+-
+- fgets(not_needed, 2048, mem);
+-
+- /*
+- total: used: free: shared: buffers: cached:
+- */
+-
+- fscanf(mem, "%*s %Ld %Ld %Ld %Ld %Ld %Ld", &total, &used, &mfree,
+- &shared, &buffers, &cached);
+-
+- fscanf(mem, "%*s %Ld %Ld", &cache_total, &cache_used);
+-
+- fclose(mem);
+- mem_delay = 25;
+-
+- /* calculate it */
+- my_mem_max = total;
+- my_swap_max = cache_total;
+-
+- my_mem_used = cache_used + used - cached - buffers;
+-
+- /* No swap on ipaq
+- if (my_mem_used > my_mem_max) {
+- my_swap_used = my_mem_used - my_mem_max;
+- my_mem_used = my_mem_max;
+- } else {
+- my_swap_used = 0;
+- }
+- */
+-
+- msd.mem_used = my_mem_used;
+- msd.mem_max = my_mem_max;
+- //msd.swap_used = my_swap_used;
+- //msd.swap_max = my_swap_max;
+-
+- msd.mem_percent = (100 * msd.mem_used) / msd.mem_max;
+- //msd.swap_percent = (100 * msd.swap_used) / msd.swap_max;
+-
+- /* memory info changed - update things */
+- return 1;
+- }
+- /* nothing new */
+- return 0;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
++ u_int64_t total, mfree, buffers, cached, used, shared,
++ cache_total, cache_free, cache_used;
++
++ u_int64_t my_mem_used, my_mem_max;
++ u_int64_t my_swap_max;
++
++ static int mem_delay = 0;
++ FILE *mem;
++
++ /* put this in permanent storage instead of stack */
++ static char not_needed[2048];
++
++ if (mem_delay-- <= 0) {
++ if ((mem = fopen("/proc/meminfo", "r")) == NULL) {
++ fprintf(stderr, "mb-applet-system-monitor: failed to open /proc/meminfo. Exiting.\n");
++ exit(1);
++ }
++
++ fgets(not_needed, 2048, mem);
++
++ rewind (mem);
++
++ fscanf (mem, "%*s %Ld %*s", &total);
++ fscanf (mem, "%*s %Ld %*s", &mfree);
++ fscanf (mem, "%*s %Ld %*s", &buffers);
++ fscanf (mem, "%*s %Ld %*s", &cached);
++ fscanf (mem, "%*s %Ld %*s", &shared);
++ fscanf (mem, "%*s %Ld %*s", &used);
++ fscanf (mem, "%*s %*Ld %*s");
++ fscanf (mem, "%*s %*Ld %*s");
++ fscanf (mem, "%*s %*Ld %*s");
++ fscanf (mem, "%*s %*Ld %*s");
++ fscanf (mem, "%*s %*Ld %*s");
++ fscanf (mem, "%*s %Ld %*s", &cache_total);
++ fscanf (mem, "%*s %Ld %*s", &cache_free);
++
++ fclose (mem);
++
++ total = total * 1024;
++ mfree = mfree * 1024;
++ buffers = buffers * 1024;
++ cached = cached * 1024;
++ used = used * 1024;
++ shared = shared * 1024;
++ cache_total = cache_total * 1024;
++ cache_used = cache_total - (cache_free * 1024);
++
++ mem_delay = 25;
++
++ /* calculate it */
++ my_mem_max = total;
++ my_swap_max = cache_total;
++
++ my_mem_used = cache_used + used - cached - buffers;
++
++ /* No swap on ipaq
++ if (my_mem_used > my_mem_max) {
++ my_swap_used = my_mem_used - my_mem_max;
++ my_mem_used = my_mem_max;
++ } else {
++ my_swap_used = 0;
++ }
++ */
++
++ msd.mem_used = my_mem_used;
++ msd.mem_max = my_mem_max;
++ //msd.swap_used = my_swap_used;
++ //msd.swap_max = my_swap_max;
++
++ msd.mem_percent = (100 * msd.mem_used) / msd.mem_max;
++ //msd.swap_percent = (100 * msd.swap_used) / msd.swap_max;
++
++ /* memory info changed - update things */
++ return 1;
++ }
++ /* nothing new */
++ return 0;
++ #else
++ static u_int64_t total, used, mfree, shared, buffers, cached,
++ cache_total, cache_used;
++
++ u_int64_t my_mem_used, my_mem_max;
++ u_int64_t my_swap_max;
++
++ static int mem_delay = 0;
++ FILE *mem;
++
++ /* put this in permanent storage instead of stack */
++ static char not_needed[2048];
++
++ if (mem_delay-- <= 0) {
++ if ((mem = fopen("/proc/meminfo", "r")) == NULL) {
++ fprintf(stderr, "mb-applet-system-monitor: failed to open /proc/meminfo. Exiting.\n");
++ exit(1);
++ }
++
++ fgets(not_needed, 2048, mem);
++
++ /*
++ total: used: free: shared: buffers: cached:
++ */
++ fscanf(mem, "%*s %Ld %Ld %Ld %Ld %Ld %Ld", &total, &used, &mfree,
++ &shared, &buffers, &cached);
++
++ fscanf(mem, "%*s %Ld %Ld", &cache_total, &cache_used);
++
++ fclose(mem);
++
++ mem_delay = 25;
++
++ /* calculate it */
++ my_mem_max = total;
++ my_swap_max = cache_total;
++
++ my_mem_used = cache_used + used - cached - buffers;
++
++ /* No swap on ipaq
++ if (my_mem_used > my_mem_max) {
++ my_swap_used = my_mem_used - my_mem_max;
++ my_mem_used = my_mem_max;
++ } else {
++ my_swap_used = 0;
++ }
++ */
++
++ msd.mem_used = my_mem_used;
++ msd.mem_max = my_mem_max;
++ //msd.swap_used = my_swap_used;
++ //msd.swap_max = my_swap_max;
++
++ msd.mem_percent = (100 * msd.mem_used) / msd.mem_max;
++ //msd.swap_percent = (100 * msd.swap_used) / msd.swap_max;
++
++ /* memory info changed - update things */
++ return 1;
++ }
++ /* nothing new */
++ return 0;
++ #endif
+ }
+
+-
+ void
+ paint_callback (MBTrayApp *app, Drawable drw )
+ {
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-applet-battery-repaint.patch b/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-applet-battery-repaint.patch
new file mode 100644
index 0000000000..7d5c53f165
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-applet-battery-repaint.patch
@@ -0,0 +1,43 @@
+--- matchbox-panel-0.9.2/applets/mb-applet-battery.c.orig 2005-04-06 22:20:45.000000000 +0200
++++ matchbox-panel-0.9.2/applets/mb-applet-battery.c 2006-02-01 01:21:17.000000000 +0100
+@@ -200,23 +200,12 @@
+ void
+ paint_callback (MBTrayApp *app, Drawable drw )
+ {
+-
+-
+ int power_pixels = 0;
+ unsigned char r = 0, g = 0, b = 0;
+ int x, y;
+ int bar_width, bar_height, bar_x, bar_y;
+
+ MBPixbufImage *img_backing = NULL;
+-
+-
+-
+-
+- while (!read_apm(apm_vals))
+- usleep(50000L);
+-
+- if (last_percentage == apm_vals[PERCENTAGE] && last_ac == apm_vals[AC_POWER])
+- return;
+
+ img_backing = mb_tray_app_get_background (app, pb);
+
+@@ -409,10 +398,12 @@
+
+ }
+
+-void
+-timeout_callback ( MBTrayApp *app )
+-{
+- mb_tray_app_repaint (app);
++void timeout_callback (MBTrayApp *app) {
++ while (!read_apm(apm_vals))
++ usleep(50000L);
++
++ if (last_percentage != apm_vals[PERCENTAGE] || last_ac != apm_vals[AC_POWER])
++ mb_tray_app_repaint (app);
+ }
+
+ void
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-allow-disabling-menu-panel.patch b/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-allow-disabling-menu-panel.patch
new file mode 100644
index 0000000000..fb1a021c31
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-allow-disabling-menu-panel.patch
@@ -0,0 +1,33 @@
+--- matchbox-panel-0.9.2.multi/applets/mb-applet-menu-launcher.c 2006-02-16 00:43:28.000000000 +0100
++++ matchbox-panel-0.9.2/applets/mb-applet-menu-launcher.c 2006-02-17 20:25:14.000000000 +0100
+@@ -392,7 +392,8 @@
+ FILE *fp;
+ char *buf;
+ int len;
+- MBMenuMenu *menu_panel;
++ MBMenuMenu *menu_panel = NULL;
++ char *menu_panel_disabled = getenv ("MB_MENU_PANEL_DISABLED");
+ char *tmp_path = NULL, *tmp_path2 = NULL ;
+
+ char vfolder_path_root[512];
+@@ -453,8 +454,8 @@
+
+ }
+
+- menu_panel = mb_menu_add_path(app_data->mbmenu, "Utilities/Panel" , NULL, MBMENU_NO_SORT );
+-
++ if (!menu_panel_disabled)
++ menu_panel = mb_menu_add_path(app_data->mbmenu, "Utilities/Panel" , NULL, MBMENU_NO_SORT );
+
+ tmp_path = mb_dot_desktop_icon_get_full_path (app_data->theme_name,
+ 16,
+@@ -620,6 +621,9 @@
+ && !strcmp(mb_dotdesktop_get(dd, "Type"),
+ "PanelApp"))
+ {
++ if (menu_panel_disabled)
++ continue;
++
+ m = menu_panel;
+ }
+
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-multi-category-matching.patch b/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-multi-category-matching.patch
new file mode 100644
index 0000000000..3bd5d915b5
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.2/mb-panel-multi-category-matching.patch
@@ -0,0 +1,32 @@
+--- matchbox-panel-0.9.2/applets/mb-applet-menu-launcher.c 2005-04-06 22:13:00.000000000 +0200
++++ matchbox-panel-0.9.2.new/applets/mb-applet-menu-launcher.c 2006-02-16 00:43:28.000000000 +0100
+@@ -566,7 +566,28 @@
+ {
+ fallback = menu_lookup[i].item;
+ }
+- if (strstr(category,
++ if (strstr(menu_lookup[i].match_str, ";"))
++ {
++ char *s;
++ char *match_str = menu_lookup[i].match_str;
++
++ while (s = strstr(match_str, ";"))
++ {
++ size_t len = s - match_str;
++ char *tok = (char *) malloc (sizeof (char) * (len + 1));
++
++ strncpy (tok, match_str, len);
++ tok[len] = 0;
++ match_str = s + 1;
++
++ if (strstr (category, tok))
++ {
++ m = menu_lookup[i].item;
++ }
++ free (tok);
++ }
++ }
++ else if (strstr(category,
+ menu_lookup[i].match_str))
+ {
+ m = menu_lookup[i].item;
diff --git a/recipes/matchbox-panel/matchbox-panel-0.9.2/system-monitor-crash-fix.patch b/recipes/matchbox-panel/matchbox-panel-0.9.2/system-monitor-crash-fix.patch
new file mode 100644
index 0000000000..51c141db03
--- /dev/null
+++ b/recipes/matchbox-panel/matchbox-panel-0.9.2/system-monitor-crash-fix.patch
@@ -0,0 +1,195 @@
+--- matchbox-panel-0.9.2/applets/mb-applet-system-monitor.c.orig 2006-02-07 20:08:09.000000000 +0200
++++ matchbox-panel-0.9.2/applets/mb-applet-system-monitor.c 2006-02-07 20:53:20.000000000 +0200
+@@ -37,6 +37,7 @@
+ # define _(text) (text)
+ #endif
+
++
+ #ifdef MB_HAVE_PNG
+ #define IMG_EXT "png"
+ #else
+@@ -66,8 +67,30 @@
+ MBPixbufImage *ImgIcon = NULL, *ImgIconScaled = NULL, *ImgGraph = NULL;
+
+ int GraphHeight = 0, GraphWidth = 0;
+-
+ char *ThemeName;
++static int kernelver = 0;
++
++/* returns 1 if the kernel version is 2.6, 0 otherwise */
++int kernel_version(void)
++{
++ float v_nr=0;
++ FILE *version;
++
++ if ((version = fopen("/proc/version", "r")) == NULL)
++ {
++ fprintf(stderr, "mb-applet-system-monitor: failed to open /proc/version. Exiting\n");
++ exit(1);
++ }
++ fscanf(version, "%*s %*s %f", &v_nr);
++ fclose(version);
++
++ if (v_nr > 2.5)
++ return 1;
++ else
++ return 0;
++}
++
++
+
+ /* returns current CPU load in percent, 0 to 100 */
+ int system_cpu(void)
+@@ -112,71 +135,86 @@
+
+ int system_memory(void)
+ {
+- u_int64_t my_mem_used, my_mem_max;
+- u_int64_t my_swap_max;
+-
+- static int mem_delay = 0;
+- FILE *mem;
+- static u_int64_t total, used, mfree, shared, buffers, cached,
+- cache_total, cache_used;
+-
+- /* put this in permanent storage instead of stack */
+- static char not_needed[2048];
+-
+- if (mem_delay-- <= 0) {
+- if ((mem = fopen("/proc/meminfo", "r")) == NULL)
++ u_int64_t total, mfree, buffers, cached, used, shared,
++ cache_total, cache_free, cache_used, uneeded = 0;
++
++ u_int64_t my_mem_used, my_mem_max;
++ u_int64_t my_swap_max;
++
++ static int mem_delay = 0;
++ FILE *mem;
++
++ /* put this in permanent storage instead of stack */
++ static char not_needed[2048];
++
++ if (mem_delay-- <= 0)
++ {
++ if ((mem = fopen("/proc/meminfo", "r")) == NULL)
+ {
+ fprintf(stderr, "mb-applet-system-monitor: failed to open /proc/meminfo. Exiting.\n");
+ exit(1);
+- }
+-
+-
+-
+- fgets(not_needed, 2048, mem);
+-
+- /*
+- total: used: free: shared: buffers: cached:
+- */
+-
+- fscanf(mem, "%*s %Ld %Ld %Ld %Ld %Ld %Ld", &total, &used, &mfree,
+- &shared, &buffers, &cached);
+-
+- fscanf(mem, "%*s %Ld %Ld", &cache_total, &cache_used);
+-
+- fclose(mem);
+- mem_delay = 25;
+-
+- /* calculate it */
+- my_mem_max = total;
+- my_swap_max = cache_total;
+-
+- my_mem_used = cache_used + used - cached - buffers;
+-
+- /* No swap on ipaq
+- if (my_mem_used > my_mem_max) {
+- my_swap_used = my_mem_used - my_mem_max;
+- my_mem_used = my_mem_max;
+- } else {
+- my_swap_used = 0;
+ }
+- */
+-
+- msd.mem_used = my_mem_used;
+- msd.mem_max = my_mem_max;
+- //msd.swap_used = my_swap_used;
+- //msd.swap_max = my_swap_max;
++
++ fgets(not_needed, 2048, mem);
+
+- msd.mem_percent = (100 * msd.mem_used) / msd.mem_max;
+- //msd.swap_percent = (100 * msd.swap_used) / msd.swap_max;
++/*if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)*/
+
+- /* memory info changed - update things */
+- return 1;
+- }
+- /* nothing new */
+- return 0;
++ if(kernelver)
++ {
++ rewind (mem);
++
++ fscanf (mem, "%*s %Ld %*s", &total);
++ fscanf (mem, "%*s %Ld %*s", &mfree);
++ fscanf (mem, "%*s %Ld %*s", &buffers);
++ fscanf (mem, "%*s %Ld %*s", &cached);
++ fscanf (mem, "%*s %Ld %*s", &shared);
++ fscanf (mem, "%*s %Ld %*s", &used);
++ fscanf (mem, "%*s %Ld %*s", &uneeded);
++ fscanf (mem, "%*s %Ld %*s", &uneeded);
++ fscanf (mem, "%*s %Ld %*s", &uneeded);
++ fscanf (mem, "%*s %Ld %*s", &uneeded);
++ fscanf (mem, "%*s %Ld %*s", &uneeded);
++ fscanf (mem, "%*s %Ld %*s", &cache_total);
++ fscanf (mem, "%*s %Ld %*s", &cache_free);
++
++ total = total * 1024;
++ mfree = mfree * 1024;
++ buffers = buffers * 1024;
++ cached = cached * 1024;
++ used = used * 1024;
++ shared = shared * 1024;
++ cache_total = cache_total * 1024;
++ cache_used = cache_total - (cache_free * 1024);
++ }
++else
++ {
++ /*
++ total: used: free: shared: buffers: cached:
++ */
++ fscanf(mem, "%*s %Ld %Ld %Ld %Ld %Ld %Ld", &total, &used, &mfree,
++ &shared, &buffers, &cached);
++ fscanf(mem, "%*s %Ld %Ld", &cache_total, &cache_used);
++ }
++
++ fclose(mem);
++
++ mem_delay = 25;
++
++ /* calculate it */
++ my_mem_max = total;
++ my_swap_max = cache_total;
++ my_mem_used = cache_used + used - cached - buffers;
++ msd.mem_used = my_mem_used;
++ msd.mem_max = my_mem_max;
++ msd.mem_percent = (100 * msd.mem_used) / msd.mem_max;
++
++ /* memory info changed - update things */
++ return 1;
++ }
++ /* nothing new */
++ return 0;
+ }
+
+-
+ void
+ paint_callback (MBTrayApp *app, Drawable drw )
+ {
+@@ -340,6 +378,8 @@
+ &argc,
+ &argv );
+
++ kernelver = kernel_version();
++
+ msd.samples = 16;
+
+ if (msd.load) {