Hello,

is there a legal way to disable e16 iconbox(es) ? Since I haven't found it,
I've implemented my own :-). I didn't test it too much, and I'm not sure
this is the Right Thing which needs to be included in e16. This is just
a simple solution which works for me.

Dmitry

diff -ur e16-0.16.8.4/src/container.c e16-0.16.8.4.devel/src/container.c
--- e16-0.16.8.4/src/container.c        2006-10-15 21:51:10.000000000 +0400
+++ e16-0.16.8.4.devel/src/container.c  2006-11-15 21:30:53.000000000 +0300
@@ -32,6 +32,12 @@
  #include "iclass.h"
  #include "menus.h"

+static struct
+{
+    char               iconbox_enable;
+    char               systray_enable;
+} Conf_containers;
+
  extern const ContainerOps IconboxOps;
  extern const ContainerOps SystrayOps;

@@ -65,8 +71,16 @@
  static Container   *
  ContainerCreate(const char *name)
  {
+   char               type;
     Container          *ct;

+   type = (name && !strcmp(name, "_ST_")) ?
+      IB_TYPE_SYSTRAY : IB_TYPE_ICONBOX;
+   if ((type == IB_TYPE_SYSTRAY) && !Conf_containers.systray_enable)
+      return NULL;
+   if ((type == IB_TYPE_ICONBOX) && !Conf_containers.iconbox_enable)
+      return NULL;
+
     if (ContainerFind(name))
        return NULL;

@@ -79,8 +93,7 @@
     ecore_list_append(container_list, ct);

     ct->name = Estrdup(name);
-   ct->type = (name && !strcmp(name, "_ST_")) ?
-      IB_TYPE_SYSTRAY : IB_TYPE_ICONBOX;
+   ct->type = type;
     ct->orientation = 0;
     ct->scrollbar_side = 1;
     ct->arrow_side = 1;
@@ -2007,22 +2020,21 @@
  };
  #define N_IPC_FUNCS (sizeof(ContainersIpcArray)/sizeof(IpcItem))

-#if 0
  /*
   * Configuration items
   */
  static const CfgItem ContainersCfgItems[] = {
-   CFG_ITEM_BOOL(Conf.iconboxes, enable, 1),
+   CFG_ITEM_BOOL(Conf_containers, iconbox_enable, 1),
+   CFG_ITEM_BOOL(Conf_containers, systray_enable, 0),
  };
  #define N_CFG_ITEMS (sizeof(ContainersCfgItems)/sizeof(CfgItem))
-#endif

  /*
   * Module descriptor
   */
-const EModule       ModIconboxes = {
-   "iconboxes", "ibox",
+const EModule       ModContainers = {
+   "containers", "containers",
     ContainersSighan,
     {N_IPC_FUNCS, ContainersIpcArray},
-   {0, NULL}
+   {N_CFG_ITEMS, ContainersCfgItems}
  };
diff -ur e16-0.16.8.4/src/mod-misc.c e16-0.16.8.4.devel/src/mod-misc.c
--- e16-0.16.8.4/src/mod-misc.c 2006-10-15 21:51:10.000000000 +0400
+++ e16-0.16.8.4.devel/src/mod-misc.c   2006-11-15 21:31:15.000000000 +0300
@@ -45,7 +45,7 @@
  extern const EModule ModFocus;
  extern const EModule ModGroups;
  extern const EModule ModImageclass;
-extern const EModule ModIconboxes;
+extern const EModule ModContainers;
  extern const EModule ModLocale;
  extern const EModule ModMenus;
  extern const EModule ModMisc;
@@ -75,7 +75,7 @@
     &ModEffects,
     &ModFocus,
     &ModGroups,
-   &ModIconboxes,
+   &ModContainers,
     &ModImageclass,
     &ModLocale,
     &ModMenus,

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to