Enlightenment CVS committal

Author  : handyande
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        Makefile.am config.c dock.c engage.h icon.c main.c 
        userconfig.c window.c wm.c 


Log Message:
MASSIVE changes to config system etc etc etc
Apps and mappings are now in e17 format (newer than _pre5 tarball tho)
read INSTALL for changes
removed dicons - just confusing really
update todo - bit out of date
only bug known: icon grabbing currently not working
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- Makefile.am 5 Aug 2004 17:43:06 -0000       1.8
+++ Makefile.am 5 Oct 2004 21:51:25 -0000       1.9
@@ -21,7 +21,10 @@
 wm.c \
 window.c \
 tray.c \
-userconfig.c
+userconfig.c \
+e17_tmp/e_object.c \
+e17_tmp/e_file.c \
+e17_tmp/e_apps.c
 
 
 engage_LDADD = @evas_libs@ @edje_libs@ @ecore_libs@ @imlib2_libs@ @ewl_libs@ \
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- config.c    29 Sep 2004 20:51:53 -0000      1.39
+++ config.c    5 Oct 2004 21:51:26 -0000       1.40
@@ -89,9 +89,9 @@
 
   ecore_config_int_create("engage.options.width", 1024, 'W', "width",
                           "The overall width of the application area");
-  ecore_config_int_create("engage.options.height", 110, 'H', "height",
+  ecore_config_int_create("engage.options.height", 130, 'H', "height",
                           "The overall height of the application area");
-  ecore_config_theme_create("engage.options.theme", "gentoo", 't', "theme",
+  ecore_config_theme_create("engage.options.theme", "none", 't', "theme",
                             "The theme name to use (minus path and extension)");
   /* not technically correct - iconsets should do this, but it looks better for
    * everything bar 'gentoo' - and we all have the others installed ;) */
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/dock.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- dock.c      21 Sep 2004 22:09:32 -0000      1.11
+++ dock.c      5 Oct 2004 21:51:26 -0000       1.12
@@ -23,7 +23,7 @@
   int             y;
   int             i;
 
-  dock.icons = dock.applnks = dock.dicons = dock.sysicons = dock.minwins = NULL;
+  dock.icons = dock.applnks = dock.sysicons = dock.minwins = NULL;
   dock.state = unzoomed;
   dock.zoom = 1.0;
   dock.x = 400.0;
@@ -81,12 +81,12 @@
       width += options.size * icon->scale + options.spacing;
       item = item->next;
     }
-    if (dock.dicons || dock.minwins)
+    if (dock.minwins)
       width += options.spacing + 1.0;   // separator
     if (dock.sysicons)
       width += options.spacing + 1.0;   // another spacer
   }
-  width += tray_width + 4;
+  width += tray_width + 8;
 
 #define POSITION(__icons) \
                { \
@@ -107,7 +107,6 @@
   x += 0.5 * options.spacing;
   dock.middle_pos = x;
   x += 1.0 + 0.5 * options.spacing;
-  POSITION(dock.dicons);
   POSITION(dock.minwins);
   x += 0.5 * options.spacing; 
   dock.middle2_pos = x;
@@ -185,7 +184,7 @@
                      options.height - options.size - 2.0 * options.arrow_size);
     evas_object_move(dock.background[OD_BG_RIGHT], dock.right_end,
                      options.height - options.size - 2.0 * options.arrow_size);
-    if (dock.dicons || dock.minwins) {
+    if (dock.minwins) {
       evas_object_move(dock.background[OD_BG_MIDDLE], middle,
                        options.height - options.size -
                        2.0 * options.arrow_size);
@@ -261,15 +260,6 @@
 }
 
 void
-od_dock_add_dicon(OD_Icon * dicon)
-{
-  dock.icons = evas_list_append(dock.icons, dicon);
-  dock.dicons = evas_list_append(dock.dicons, dicon);
-  dicon->state |= OD_ICON_STATE_USEABLE;
-  dicon->appear_timer = ecore_timer_add(0.05, od_dock_icon_appear, dicon);
-}
-
-void
 od_dock_add_sysicon(OD_Icon * sysicon)
 {
   dock.icons = evas_list_append(dock.icons, sysicon);
@@ -386,9 +376,6 @@
     case application_link:
       dock.applnks = evas_list_remove(dock.applnks, icon);
       break;
-    case docked_icon:
-      dock.dicons = evas_list_remove(dock.dicons, icon);
-      break;
     case system_icon:
       dock.sysicons = evas_list_remove(dock.sysicons, icon);
       break;
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- engage.h    21 Sep 2004 13:26:38 -0000      1.18
+++ engage.h    5 Oct 2004 21:51:26 -0000       1.19
@@ -9,6 +9,8 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#include "e17_tmp/e.h"
+
 typedef enum { false = 0, true = 1 } bool;
 typedef struct _OD_Options OD_Options;
 typedef struct _OD_Window OD_Window;
@@ -30,6 +32,8 @@
 extern bool     need_redraw;
 extern int      tray_width;
 
+extern E_App   *od_unmatched_app;
+
 int             od_config_init();
 void            od_config_menu_draw(Evas_Coord x, Evas_Coord y);
 
@@ -39,7 +43,6 @@
 
 void            od_dock_init();
 void            od_dock_add_applnk(OD_Icon * applnk);
-void            od_dock_add_dicon(OD_Icon * dicon);
 void            od_dock_add_minwin(OD_Icon * minwin);
 void            od_dock_del_icon(OD_Icon * icon);
 void            od_dock_redraw(Ecore_Evas * ee);
@@ -49,14 +52,11 @@
 void            od_tray_init();
 void            od_tray_move(double x);
 
-void            od_icon_mapping_add(const char *winclass, const char *name,
-                                    const char *icon_name);
-OD_Icon        *od_icon_new_applnk(const char *command, const char *winclass);
-OD_Icon        *od_icon_new_dicon(const char *command, const char *name,
-                                  const char *icon_name);
-OD_Icon        *od_icon_new_sysicon(const char *name, const char *icon_path,
-                                    Ecore_X_Window win);
-OD_Icon        *od_icon_new_minwin(Ecore_X_Window win);
+void            od_icon_mapping_add(E_App *app);
+E_App          *od_icon_mapping_get(const char *winclass);
+OD_Icon        *od_icon_new_applnk(E_App *app, char *name_override, char 
*class_override);
+OD_Icon        *od_icon_new_sysicon(const char *name, const char *icon_path);
+OD_Icon        *od_icon_new_minwin(Ecore_X_Window win, char *name_override, char 
*class_override);
 
 void            od_icon_grab(OD_Icon * icon, Ecore_X_Window win);
 void            od_icon_reload(OD_Icon * in);
@@ -108,7 +108,7 @@
 #define OD_BG_MIDDLE 3
 #define OD_BG_MIDDLE2 4
 struct _OD_Dock {
-  Evas_List      *icons, *applnks, *dicons, *minwins, *sysicons;
+  Evas_List      *icons, *applnks, *minwins, *sysicons;
   enum { unzoomed, zooming, zoomed, unzooming } state;
   double          zoom;
   double          x;            // current pointer x position
@@ -130,7 +130,7 @@
   double          scale;
   double          start_time;
   Ecore_Timer    *appear_timer;
-  enum { application_link, docked_icon, minimised_window, system_icon } type;
+  enum { application_link, minimised_window, system_icon } type;
   union {
     struct {
       char           *command;
@@ -138,9 +138,6 @@
       int             count;
     } applnk;
     struct {
-      char           *command;
-    } dicon;
-    struct {
       Ecore_X_Window  window;
     } minwin;
   } data;
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- icon.c      5 Aug 2004 17:43:06 -0000       1.34
+++ icon.c      5 Oct 2004 21:51:26 -0000       1.35
@@ -18,10 +18,8 @@
 Evas_List      *icon_mappings = NULL;
 Evas_List      *icon_paths = NULL;
 
-static OD_Icon *od_icon_new(const char *winclass, const char *name,
-                            const char *icon_path, int type);
-static void     od_icon_mapping_get(const char *winclass, char **name, char 
**icon_name);       // DON'T free returned
-static char    *od_icon_path_get(const char *icon_name);
+static OD_Icon *od_icon_new(E_App *app, char *name_override,
+                            char *class_override, int type);
 static void     od_icon_edje_app_cb(void *data, Evas_Object * obj,
                                     const char *emission, const char *source);
 static void     od_icon_edje_win_minimize_cb(void *data, Evas_Object * obj,
@@ -32,59 +30,43 @@
                                           const char *source);
 
 OD_Icon        *
-od_icon_new_applnk(const char *command, const char *winclass)
+od_icon_new_applnk(E_App *app, char *name_override, char *class_override)
 {
   OD_Icon        *ret = NULL;
-  char           *name = NULL;
-  char           *icon_name = NULL;
-  char           *icon_path = NULL;
+  char           *winclass;
 
-  od_icon_mapping_get(winclass, &name, &icon_name);
-  icon_path = od_icon_path_get(icon_name);
-  ret = od_icon_new(winclass, name, icon_path, application_link);
+  ret = od_icon_new(app, name_override, class_override, application_link);
 
-  ret->data.applnk.command = strdup(command);
-  ret->data.applnk.winclass = strdup(winclass);
+  ret->data.applnk.command = strdup(app->exe);
+  ret->data.applnk.winclass = strdup(class_override? class_override : app->winclass);
   ret->data.applnk.count = 0;
-  free(icon_path);
-  return ret;
-}
-
-OD_Icon        *
-od_icon_new_dicon(const char *command, const char *name, const char *icon_name)
-{
-  char           *icon_path = od_icon_path_get(icon_name);
-  OD_Icon        *ret = od_icon_new(name, name, icon_path, docked_icon);
-
-  ret->data.applnk.command = strdup(command);
-  free(icon_path);
   return ret;
 }
 
 OD_Icon        *
-od_icon_new_sysicon(const char *name, const char *icon_name, Ecore_X_Window win)
+od_icon_new_sysicon(const char *name, const char *icon_name)
 {
-    OD_Icon        *ret = od_icon_new(name, name, icon_name, system_icon);
-    ret->data.minwin.window = win;
+  OD_Icon        *ret = od_icon_new(od_unmatched_app, name, NULL, system_icon);
+  ret->icon_file = strdup(icon_name);
+  od_icon_reload(ret);
   return ret;
 }
 
 
 OD_Icon        *
-od_icon_new_minwin(Ecore_X_Window win)
+od_icon_new_minwin(Ecore_X_Window win, char *name_override, char *class_override)
 {
   OD_Icon        *ret = NULL;
   char           *icon_path = NULL;
   char           *name = NULL, *icon_name = NULL;
   char           *winclass = NULL;
   char           *title = NULL;
+  E_App          *app;
 
   winclass = od_wm_get_winclass(win);
-  title = od_wm_get_title(win);
-  od_icon_mapping_get(winclass, &name, &icon_name);
-  icon_path = od_icon_path_get(icon_name);
+  app = od_icon_mapping_get(winclass);
 
-  if ((ret = od_icon_new(winclass, title, icon_path, minimised_window))) {
+  if ((ret = od_icon_new(app, name_override, class_override, minimised_window))) {
 #ifdef HAVE_IMLIB
     if (options.grab_min_icons != 0)
       od_icon_grab(ret, win);
@@ -94,10 +76,6 @@
 
   if (winclass)
     free(winclass);
-  if (title)
-    free(title);
-  if (icon_path)
-    free(icon_path);
   return ret;
 }
 
@@ -211,7 +189,7 @@
     path = strdup(icon_file);
   }
 
-  if (edje_object_file_set(icon, path, "Main") > 0) {
+  if (edje_object_file_set(icon, path, "Main")) {
 #if 0
     fprintf(stderr, "Trying to find part for %s\n", winclass);
 #endif
@@ -231,7 +209,8 @@
       }
     } else {
       pic = edje_object_add(evas_object_evas_get(icon));
-      if (edje_object_file_set(pic, path, "Unknown") > 0) {
+      if (edje_object_file_set(pic, icon_file, "icon") > 0 ||
+          edje_object_file_set(pic, path, "Unknown") > 0) {
 #if 0
         fprintf(stderr, "Didn't Find icon part for %s\n", name);
 #endif
@@ -240,6 +219,7 @@
         pic = NULL;
       }
     }
+
     if (!pic) {
       pic = evas_object_image_add(evas);
       evas_object_image_file_set(pic, icon_file, NULL);
@@ -300,24 +280,23 @@
 }
 
 OD_Icon        *
-od_icon_new(const char *winclass, const char *name, const char *icon_file,
-            int type)
+od_icon_new(E_App *app, char *name_override, char *class_override, int type)
 {
   OD_Icon        *ret = NULL;
-
-  assert(winclass);
-  assert(name);
-  assert(icon_file);
+  assert(app->winclass);
+  assert(app->name);
+  assert(app->path);
 
   ret = (OD_Icon *) malloc(sizeof(OD_Icon));
   memset(ret, 0, sizeof(OD_Icon));
-  ret->winclass = strdup(winclass);
-  ret->name = strdup(name);
-  ret->icon_file = strdup(icon_file);
+  ret->winclass = strdup(class_override ? class_override : app->winclass);
+  ret->name = strdup(name_override ? name_override : app->name);
+  ret->icon_file = strdup(app->path);
   ret->icon = edje_object_add(evas);
   ret->type = type;
 
-  od_icon_reload(ret);
+  if (type != system_icon)
+    od_icon_reload(ret);
   if (ret->icon) {
     edje_object_signal_callback_add(ret->icon, "engage,app,*", "*",
                                     od_icon_edje_app_cb, ret);
@@ -341,10 +320,6 @@
     free(icon->data.applnk.command);
     free(icon->data.applnk.winclass);
     break;
-  case docked_icon:
-    assert(icon->data.applnk.command);
-    free(icon->data.dicon.command);
-    break;
   case minimised_window:
     break;
   }
@@ -443,66 +418,31 @@
 }
 
 void
-od_icon_mapping_add(const char *winclass, const char *name,
-                    const char *icon_name)
+od_icon_mapping_add(E_App *app)
 {
-  icon_mappings = evas_list_append(icon_mappings, strdup(winclass));
-  icon_mappings = evas_list_append(icon_mappings, strdup(name));
-  icon_mappings = evas_list_append(icon_mappings, strdup(icon_name));
+  icon_mappings = evas_list_append(icon_mappings, app);
 }
 
-void
-od_icon_mapping_get(const char *winclass, char **name, char **icon_name)
+E_App *
+od_icon_mapping_get(const char *winclass)
 {
   Evas_List      *item = icon_mappings;
+  E_App *app;
 
 #if 0
   printf("getting mapping for %s\n", winclass);
 #endif
   while (item) {
-    if (strcmp(winclass, (char *) item->data) == 0) {
-      if (item->next) {
-        *name = (char *) item->next->data;
-        if (item->next->next) {
-          *icon_name = (char *) item->next->next->data;
-        } else {
-          fprintf(stderr, "corrupt icon mapping for %s (icon_name)\n",
-                  winclass);
-        }
-      } else {
-        fprintf(stderr, "corrupt icon mapping for %s (name)\n", winclass);
-      }
-      return;
+    app = item->data;
+    if (strcmp(winclass, app->winclass) == 0) {
+      break;
     }
     item = item->next;
   }
-  *name = strdup(winclass);
-  *icon_name = strdup(winclass);
-}
+  if (!item)
+    return od_unmatched_app;
 
-char           *
-od_icon_path_get(const char *icon_name)
-{
-  Evas_List      *item = icon_paths;
-
-  while (item) {
-    char           *path = (char *) item->data;
-    char            buffer[strlen(path) + strlen(icon_name) + strlen(".png") + 2];    
  // one extra for '/', another for '\0'
-    struct stat     dummy;
-
-    strcpy(buffer, path);
-    strcat(buffer, "/");
-    strcat(buffer, icon_name);
-    strcat(buffer, ".png\0");
-    if (stat(buffer, &dummy) == 0)
-      return strdup(buffer);
-    item = item->next;
-  }
-
-  if (strcmp(icon_name, "xapp") != 0)
-    return od_icon_path_get("xapp");
-  else
-    return NULL;
+  return app;
 }
 
 void
@@ -553,7 +493,6 @@
     if (!strcmp(emission, "engage,app,open")) {
       switch (icon->type) {
       case application_link:
-      case docked_icon:
         edje_object_signal_emit(obj, "engage,app,open,ok", "");
         ecore_exe_run(icon->data.applnk.command, NULL);
         break;
@@ -595,15 +534,12 @@
           }
         }
         break;
-      case docked_icon:
-        break;
       case minimised_window:
         break;
       }
     } else if (!strcmp(emission, "engage,window,minimize,all")) {
       switch (icon->type) {
       case application_link:
-      case docked_icon:
       case minimised_window:
         for (l = clients; l; l = l->next) {
           OD_Window      *win = (OD_Window *) l->data;
@@ -635,7 +571,6 @@
     if (!strcmp(emission, "engage,window,raise")) {
       switch (icon->type) {
       case application_link:
-      case docked_icon:
       case minimised_window:
         for (l = clients; l; l = l->next) {
           win = (OD_Window *) l->data;
@@ -662,7 +597,6 @@
     } else if (!strcmp(emission, "engage,window,raise,next")) {
       switch (icon->type) {
       case application_link:
-      case docked_icon:
         if (icon->data.applnk.winclass) {
           winclass = icon->data.applnk.winclass;
           if ((win = od_wm_window_next_by_window_class_get(winclass))) {
@@ -678,7 +612,6 @@
     } else if (!strcmp(emission, "engage,window,raise,prev")) {
       switch (icon->type) {
       case application_link:
-      case docked_icon:
         if (icon->data.applnk.winclass) {
           winclass = icon->data.applnk.winclass;
           if ((win = od_wm_window_prev_by_window_class_get(winclass))) {
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/main.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- main.c      21 Sep 2004 22:00:34 -0000      1.10
+++ main.c      5 Oct 2004 21:51:26 -0000       1.11
@@ -39,6 +39,7 @@
     ecore_shutdown();
     exit(0);
   }
+  e_app_init();
 
   ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_cb, NULL);
   ecore_evas_init();
@@ -66,6 +67,7 @@
   edje_shutdown();
   ewl_shutdown();
   ecore_evas_shutdown();
+  e_app_shutdown();
   ecore_config_save();
   ecore_config_shutdown();
   ecore_x_shutdown();
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/userconfig.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- userconfig.c        5 Aug 2004 17:43:06 -0000       1.6
+++ userconfig.c        5 Oct 2004 21:51:26 -0000       1.7
@@ -7,79 +7,58 @@
 
 #include "engage.h"
 
-/* name of the config file with directory to show in the tree */
-#define engage_conf "/.e/apps/engage/applinks"
-#define engage_mappings "/.e/apps/engage/mappings"
+E_App *od_unmatched_app;
 
 static void
-userconfig_mappings_load(FILE * fp)
+userconfig_mappings_load(char* fp)
 {
-  char           *line = NULL;
-  size_t          len = 0;
-  size_t          read = 0;
-  char           *name = NULL;
-  char           *class = NULL;
-  char           *icon = NULL;
-
-  while ((read = getline(&line, &len, fp)) != -1) {
-    if (*line == '#' || *line == '\n')
-      continue;
-    /* stripping line return */
-    line[strlen(line) - 1] = 0;
-    /* split of the line */
-    class = (char *) strtok(line, "|");
-    name = (char *) strtok(NULL, "|");
-    icon = (char *) strtok(NULL, "|");
-
-#if 0
-    printf("line [%s]\n", line);
-#endif
-
-    if (class != NULL && name != NULL && icon != NULL) {
-      od_icon_mapping_add(class, name, icon);
-    }
-  }
-  /* cleaning memory */
-  if (line)
-    free(line);
-  line = NULL;
+  E_App          *maplist;
+  Evas_List      *l;
+
+  od_unmatched_app = e_app_new(PACKAGE_DATA_DIR "/icons/xapp.eet", 0);
+  if (!od_unmatched_app) {
+    printf("ERROR, you must make install\n");
+    ecore_main_loop_quit();
+    exit(1);
+  }
+
+  maplist = e_app_new(fp, 1);
+  if (!maplist) {
+    printf("You should _really_ create %s and populate it\n", fp);
+    return;
+  }
+
+  /*FIXME: only 1 level deep... */
+  l = maplist->subapps;
+  while(l) {
+    E_App *ptr = l->data;
+
+    od_icon_mapping_add(ptr);
+    l = l->next;
+  }
+
 }
 
 static void
-userconfig_applinks_load(FILE * fp)
+userconfig_applinks_load(char* fp)
 {
-  char           *line = NULL;
-  size_t          len = 0;
-  size_t          read = 0;
-  char           *exe = NULL;
-  char           *name = NULL;
-  char           *icon = NULL;
-
-  while ((read = getline(&line, &len, fp)) != -1) {
-    if (*line == '#' || *line == '\n')
-      continue;
-    /* stripping line return */
-    line[strlen(line) - 1] = 0;
-    /* split of the line */
-    exe = (char *) strtok(line, "|");
-    name = (char *) strtok(NULL, "|");
-    icon = (char *) strtok(NULL, "|");
-
-#if 0
-    printf("line [%s]\n", line);
-#endif
-
-    if (exe != NULL && name != NULL && exe[strlen(exe) - 1] != '#') {
-      od_dock_add_applnk(od_icon_new_applnk(exe, name));
-    } else if (exe != NULL && name != NULL && icon != NULL &&
-               exe[strlen(exe) - 1] == '#') {
-      exe[strlen(exe) - 1] = 0;
-      od_dock_add_dicon(od_icon_new_dicon(exe, name, icon));
-    }
-  }
-  /* cleaning memory */
-  if (line)
-    free(line);
+  E_App          *applist;
+  Evas_List      *l;
+
+  applist = e_app_new(fp, 0);
+  if (!applist) {
+    printf("You should _really_ create %s and populate it\n", fp);
+    return;
+  }
+  e_app_subdir_scan(applist, 0);
+  
+  l = applist->subapps;
+  while(l) {
+    E_App *ptr = l->data;
+
+    od_dock_add_applnk(od_icon_new_applnk(ptr, NULL, NULL));
+    l = l->next;
+  }
 }
 
 static void
@@ -90,7 +69,7 @@
   DIR            *dp;
   char           *file_title, *file_path;
   int             title_len;
-
+  
   snprintf(path, PATH_MAX, "%s/.e/apps/engage/sysicons", getenv("HOME"));
   dp = opendir((const char *) path);
 
@@ -110,7 +89,7 @@
     strncpy(file_title, next->d_name, title_len);
     *(file_title + title_len) = '\0';
 
-    od_dock_add_sysicon(od_icon_new_sysicon(""/*file_title*/, file_path, NULL));
+    od_dock_add_sysicon(od_icon_new_sysicon("", file_path));
 
     free(file_path);
     free(file_title);
@@ -122,19 +101,13 @@
 int
 userconfig_load()
 {
-  FILE           *fd = NULL;
   char            filename[PATH_MAX];
 
-  snprintf(filename, PATH_MAX, "%s/.e/apps/engage/mappings", getenv("HOME"));
-  if ((fd = fopen(filename, "r"))) {
-    userconfig_mappings_load(fd);
-    fclose(fd);
-  }
-  snprintf(filename, PATH_MAX, "%s/.e/apps/engage/applinks", getenv("HOME"));
-  if ((fd = fopen(filename, "r"))) {
-    userconfig_applinks_load(fd);
-    fclose(fd);
-  }
+  snprintf(filename, PATH_MAX, "%s/.e/apps/engage/mapping", getenv("HOME"));
+  userconfig_mappings_load(filename);
+
+  snprintf(filename, PATH_MAX, "%s/.e/apps/engage/launcher", getenv("HOME"));
+  userconfig_applinks_load(filename);
 
   userconfig_sysicons_load();
   /* nothing special */
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- window.c    26 Jul 2004 20:52:28 -0000      1.22
+++ window.c    5 Oct 2004 21:51:26 -0000       1.23
@@ -287,10 +287,6 @@
         item = evas_list_next(item);
       }
     }
-  } else if (icon->type == docked_icon) {
-    if (ev->button == 1) {
-      system(icon->data.dicon.command);
-    }
   } else if (icon->type == minimised_window) {
     if (ev->button == 1) {
       od_wm_activate_window(icon->data.minwin.window);
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/wm.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- wm.c        17 Sep 2004 23:41:35 -0000      1.17
+++ wm.c        5 Oct 2004 21:51:26 -0000       1.18
@@ -294,7 +294,8 @@
       if ((owd = evas_hash_find(clients_hash, buf))) {
         dirty = evas_list_remove(dirty, owd);
         if (!owd->minwin && od_wm_iconified(owd->id)) {
-          owd->minwin = od_icon_new_minwin(owd->id);
+          owd->minwin = od_icon_new_minwin(owd->id, od_wm_get_title(owd->id),
+                                           od_wm_get_winclass(owd->id));
           od_dock_add_minwin(owd->minwin);
         } else if (owd->minwin && !od_wm_iconified(owd->id)) {
           od_dock_del_icon(owd->minwin);
@@ -361,7 +362,6 @@
 
       while (item) {
         OD_Icon        *applnk = (OD_Icon *) item->data;
-
         if (strcmp(applnk->data.applnk.winclass, winclass) == 0) {
           owd->applnk = applnk;
           break;
@@ -369,14 +369,14 @@
         item = item->next;
       }
       if (!owd->applnk) {
-        owd->applnk = od_icon_new_applnk("", winclass);
+        owd->applnk = od_icon_new_applnk(od_icon_mapping_get(winclass), title, 
winclass);
         od_dock_add_applnk(owd->applnk);
       }
       owd->applnk->data.applnk.count++;
       if (owd->applnk->data.applnk.count == 1)
         od_icon_arrow_show(owd->applnk);
       if (od_wm_iconified(owd->id)) {
-        owd->minwin = od_icon_new_minwin(owd->id);
+        owd->minwin = od_icon_new_minwin(owd->id, title, winclass);
         od_dock_add_minwin(owd->minwin);
       }
 #ifdef HAVE_IMLIB




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to