Enlightenment CVS committal

Author  : atmosphere
Project : e17
Module  : apps/iconbar

Dir     : e17/apps/iconbar/src


Modified Files:
        main.c prefs.c 


Log Message:
allow for themes to specified whether they're shaped or transparent
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/iconbar/src/main.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- main.c      20 Feb 2004 03:23:49 -0000      1.24
+++ main.c      26 Mar 2004 20:50:02 -0000      1.25
@@ -22,10 +22,12 @@
 {
   int x, y, w, h;
   char buf[2048];
+  Ecore_X_Window win;
   Evas_List *l = NULL;
   Evas_Object *o = NULL;
+  Evas_Object *trans = NULL;
   Ecore_Evas *ee = NULL;
-  Ecore_X_Window win;
+  const char *str = NULL;
   Evas_Coord edjew = 0, edjeh = 0;
   Evas_Object *iconbar = NULL;
 
@@ -56,7 +58,6 @@
   ecore_evas_name_class_set(ee, "Iconbar", "Rephorm");
   ecore_evas_title_set(ee, "Iconbar");
   ecore_evas_borderless_set(ee, iconbar_config_borderless_get());
-  ecore_evas_shaped_set(ee, iconbar_config_shaped_get());
   ecore_evas_withdrawn_set(ee, iconbar_config_withdrawn_get());
   ecore_evas_sticky_set(ee, iconbar_config_sticky_get());
   ecore_evas_avoid_damage_set(ee, 1);
@@ -64,22 +65,6 @@
   //ecore_x_window_prop_layer_set(win, 1);
 
   iconbar_config_ecore_evas_set(ee);
-#ifdef HAVE_TRANS_BG
-  {
-    if(!iconbar_config_shaped_get())
-    {
-       ecore_evas_geometry_get(ee, &x, &y, &w, &h);
-       o = esmart_trans_x11_new(ecore_evas_get(ee));
-       evas_object_layer_set(o, 0);
-       evas_object_move(o, 0, 0);
-       evas_object_resize(o, w, h);
-       evas_object_name_set(o, "trans");
-    
-       esmart_trans_x11_freshen(o, x, y, w, h);
-       evas_object_show(o);
-    }
-  }
-#endif
 
   for(l = iconbar_config_font_path_get(); l; l = l->next)
   {
@@ -120,6 +105,37 @@
            edje_object_signal_emit(o, "window,borderless,on", "");
        else
            edje_object_signal_emit(o, "window,borderless,off", "");
+       if((str = edje_object_data_get(o, "iconbar,window")))
+       {
+           fprintf(stderr, "iconbar,window is %s\n", str);
+#ifdef HAVE_TRANS_BG
+           if(!strcmp(str, "trans"))
+           {
+               ecore_evas_geometry_get(ee, &x, &y, &w, &h);
+               trans = esmart_trans_x11_new(ecore_evas_get(ee));
+               evas_object_layer_set(trans, 0);
+               evas_object_move(trans, 0, 0);
+               evas_object_resize(trans, w, h);
+               evas_object_name_set(trans, "trans");
+    
+               esmart_trans_x11_freshen(trans, x, y, w, h);
+               evas_object_show(trans);
+           }
+#else 
+           if(!strcmp(str, "trans"))
+           {
+               fprintf(stderr,"iconbar compiled without trans support\n");
+           }
+#endif
+           if(!strcmp(str, "shaped"))
+           {
+               ecore_evas_shaped_set(ee, 1);
+           }
+       }
+       else
+       {
+               ecore_evas_shaped_set(ee, 1);
+       }
     }
   }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/iconbar/src/prefs.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- prefs.c     20 Jan 2004 06:20:40 -0000      1.7
+++ prefs.c     26 Mar 2004 20:50:02 -0000      1.8
@@ -16,7 +16,6 @@
     Evas_List *fonts;
     Evas_List *icons;
     int x, y, w, h;
-    int shaped;
     int transparent;
     int raise;
     int borderless;
@@ -71,8 +70,6 @@
                ibprefs->withdrawn = 0;
            if(!e_db_int_get(db, "/iconbar/sticky", &ibprefs->sticky))
                ibprefs->sticky = 1;
-           if(!e_db_int_get(db, "/iconbar/shaped", &ibprefs->shaped))
-               ibprefs->shaped = 1;
            if(!e_db_int_get(db, "/iconbar/borderless", &ibprefs->borderless))
                ibprefs->borderless = 1;
            if(!e_db_int_get(db, "/iconbar/x", &ibprefs->x))
@@ -126,8 +123,6 @@
            e_db_int_set(db, "/iconbar/sticky", ecore_evas_sticky_get(ee));
            e_db_int_set(db, "/iconbar/withdrawn", 
                                        ecore_evas_withdrawn_get(ee));
-           e_db_int_set(db, "/iconbar/shaped", 
-                                       ecore_evas_shaped_get(ee));
            e_db_int_set(db, "/iconbar/borderless", 
                                        ecore_evas_borderless_get(ee));
            e_db_int_set(db, "/iconbar/x", ibprefs->x);
@@ -238,17 +233,6 @@
     }
 }
 void
-iconbar_config_shaped_set(int on)
-{
-    if(ibprefs && ibprefs->ee)
-    {
-       ibprefs->shaped = ecore_evas_shaped_get(ibprefs->ee);
-       if(ibprefs->shaped != on)
-           ecore_evas_shaped_set(ibprefs->ee, on);
-       ibprefs->shaped = on;
-    }
-}
-void
 iconbar_config_raise_lower_set(int raise)
 {
     if(ibprefs && ibprefs->ee)
@@ -336,13 +320,6 @@
     return(0);
 }
 int
-iconbar_config_shaped_get(void)
-{
-    if(ibprefs)
-       return(ibprefs->shaped);
-    return(0);
-}
-int
 iconbar_config_borderless_get(void)
 {
     if(ibprefs)
@@ -429,7 +406,6 @@
 
        e_db_int_set(db, "/iconbar/raise", 0);
        e_db_int_set(db, "/iconbar/withdrawn", 0);
-       e_db_int_set(db, "/iconbar/shaped", 1);
        e_db_int_set(db, "/iconbar/borderless", 1);
 
        e_db_int_set(db, "/iconbar/x", 0);




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to