Enlightenment CVS committal

Author  : handyande
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        Makefile.am config.c engage.h 
Added Files:
        config_menu.c 


Log Message:
Move the config menu to a new file and add some cool stuff, just placeholders 
now - but it looks good :)

===================================================================
RCS file: /cvs/e/misc/engage/src/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- Makefile.am 6 Sep 2006 21:23:45 -0000       1.19
+++ Makefile.am 6 Sep 2006 21:27:18 -0000       1.20
@@ -30,6 +30,7 @@
 battery.h \
 main.c \
 config.c \
+config_menu.c \
 dock.c \
 icon.c \
 wm.c \
===================================================================
RCS file: /cvs/e/misc/engage/src/config.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- config.c    4 Sep 2006 19:29:01 -0000       1.62
+++ config.c    6 Sep 2006 21:27:18 -0000       1.63
@@ -4,13 +4,6 @@
 #include "dmalloc.h"
 #endif
 
-#ifdef HAVE_ETK
-#include <Etk.h>
-
-Etk_Widget *_od_config_menu = NULL;
-Etk_Widget *_od_config_menu_app;
-#endif
-
 typedef enum od_config_colors {
   TT_TXT,
   TT_SHD,
@@ -188,76 +181,4 @@
   options.use_composite = 
ecore_config_boolean_get("engage.options.use_composite");
   return ret;
 }
-
-#ifdef HAVE_ETK
-void _od_config_menu_zooming_cb(Etk_Object *object, void *data) {
-  ecore_config_int_set("engage.options.zoom", options.zoom ? 0 : 1);
-}
-
-void _od_config_menu_config_cb(Etk_Object *object, void *data) {
-  if (!ecore_exe_run("examine engage", NULL))
-    fprintf(stderr, "'examine' could not be launched - is it in your 
path?\n"); 
-}
-
-void _od_config_menu_quit_cb(Etk_Object *object, void *data) {
-  ecore_main_loop_quit();
-}
-
-void od_config_menu_init(void) {
-  Etk_Widget *menu, *menu_item;
-
-  menu = etk_menu_new();
-  menu_item = etk_menu_item_new_with_label("<App name here>");
-  etk_menu_shell_append(ETK_MENU_SHELL(menu), ETK_MENU_ITEM(menu_item));
-//  etk_signal_connect("activated", ETK_OBJECT(menu_item), 
ETK_CALLBACK(_od_config_menu_app_cb), NULL);
-  _od_config_menu_app = menu_item;
-
-  menu_item = etk_menu_item_new_with_label("Icon Zooming");
-  etk_menu_shell_append(ETK_MENU_SHELL(menu), ETK_MENU_ITEM(menu_item));
-  etk_signal_connect("activated", ETK_OBJECT(menu_item), 
ETK_CALLBACK(_od_config_menu_zooming_cb), NULL);
-  menu_item = etk_menu_item_new_with_label("Configuration");
-  etk_menu_shell_append(ETK_MENU_SHELL(menu), ETK_MENU_ITEM(menu_item));
-  etk_signal_connect("activated", ETK_OBJECT(menu_item), 
ETK_CALLBACK(_od_config_menu_config_cb), NULL);
-  menu_item = etk_menu_item_separator_new();
-  etk_menu_shell_append(ETK_MENU_SHELL(menu), ETK_MENU_ITEM(menu_item));
-  menu_item = etk_menu_item_new_with_label("Quit");
-  etk_menu_shell_append(ETK_MENU_SHELL(menu), ETK_MENU_ITEM(menu_item));
-  etk_signal_connect("activated", ETK_OBJECT(menu_item), 
ETK_CALLBACK(_od_config_menu_quit_cb), NULL);
-  etk_widget_show(menu);
-
-  _od_config_menu  = menu;
-}
-
-void od_config_menu_draw(Evas_Coord x, Evas_Coord y) {
-  Evas_List      *l;
-  Evas_Coord      minx, maxx;
-  char           *label;
-
-  if (_od_config_menu == NULL)
-    od_config_menu_init();
-
-  minx = x - options.size / 2;
-  maxx = x + options.size / 2;
-  label = "Not over icon";
-  etk_widget_hide(_od_config_menu_app);
-
-  l = dock.icons;
-  while (l) {
-    OD_Icon *icon;
-    icon = l->data;
-    if (icon->x >= minx && icon->x <= maxx) {
-      int len;
-      char *full;
-      label = icon->a->name;
-      etk_widget_show(_od_config_menu_app);
-      break;
-    }
-    l = l->next;
-  }
-
-  etk_menu_item_label_set(ETK_MENU_ITEM(_od_config_menu_app), label);
-  etk_menu_popup_in_direction(ETK_MENU(_od_config_menu), 
ETK_POPUP_ABOVE_RIGHT);
-}
-
-#endif
 
===================================================================
RCS file: /cvs/e/misc/engage/src/engage.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- engage.h    1 Sep 2006 16:03:58 -0000       1.32
+++ engage.h    6 Sep 2006 21:27:18 -0000       1.33
@@ -39,7 +39,9 @@
 extern E_App   *od_unmatched_app;
 
 int             od_config_init();
+#ifdef HAVE_ETK
 void            od_config_menu_draw(Evas_Coord x, Evas_Coord y);
+#endif
 
 void            od_window_init();
 void            od_window_hide();



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to