bad formie! u broke the app loading to lot load names if LANG is set AND no
authorCarsten Haitzler <raster@rasterman.com>
Sat, 11 Dec 2004 04:02:26 +0000 (04:02 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Sat, 11 Dec 2004 04:02:26 +0000 (04:02 +0000)
specific language info field exists.

also.. windows shade. just. primitively.

SVN revision: 12446

data/themes/default.edc
src/bin/e_apps.c
src/bin/e_border.c
src/bin/e_border.h
src/bin/e_main.c

index 6f0ecb4..cbbf589 100644 (file)
@@ -1435,7 +1435,7 @@ collections {
         }
         program {
            name:    "shade_action";
-           signal:  "mouse,clicked,1,double";
+           signal:  "mouse,down,1,double";
            source:  "title";
            action:  SIGNAL_EMIT "action" "shade";
         }
index 15b691f..77fd4f0 100644 (file)
@@ -367,6 +367,7 @@ _e_app_fields_fill(E_App *a, char *path)
      {
        snprintf(buf, sizeof(buf), "app/info/name[%s]", lang);
        v = eet_read(ef, buf, &size);
+       if (!v) v = eet_read(ef, "app/info/name", &size);
      }
    else
      v = eet_read(ef, "app/info/name", &size);
@@ -384,6 +385,7 @@ _e_app_fields_fill(E_App *a, char *path)
      {
        snprintf(buf, sizeof(buf), "app/info/generic[%s]", lang);
        v = eet_read(ef, buf, &size);
+       if (!v) v = eet_read(ef, "app/info/generic", &size);
      }
    else
      v = eet_read(ef, "app/info/generic", &size);
@@ -401,6 +403,7 @@ _e_app_fields_fill(E_App *a, char *path)
      {
        snprintf(buf, sizeof(buf), "app/info/comment[%s]", lang);
        v = eet_read(ef, buf, &size);
+       if (!v) v = eet_read(ef, "app/info/comment", &size);
      }
    else
      v = eet_read(ef, "app/info/comment", &size);
index e25ade2..996fffd 100644 (file)
@@ -377,6 +377,36 @@ e_border_focus_set(E_Border *bd, int focus, int set)
    printf("F %x %i\n", bd->client.win, bd->focused);
 }
 
+void
+e_border_shade(E_Border *bd)
+{
+   E_OBJECT_CHECK(bd);
+   if (!bd->shaded)
+     {
+       printf("SHADE!\n");
+       bd->h = bd->client_inset.t + bd->client_inset.b;
+       bd->changes.size = 1;
+       bd->shaded = 1;
+       bd->changes.shaded = 1;
+       bd->changed = 1;
+     }
+}
+
+void
+e_border_unshade(E_Border *bd)
+{
+   E_OBJECT_CHECK(bd);
+   if (bd->shaded)
+     {
+       printf("UNSHADE!\n");
+       bd->h = bd->client_inset.t + bd->client.h + bd->client_inset.b;
+       bd->changes.size = 1;
+       bd->shaded = 0;
+       bd->changes.shaded = 1;
+       bd->changed = 1;
+     }
+}
+
 E_Border *
 e_border_find_by_client_window(Ecore_X_Window win)
 {
@@ -927,18 +957,8 @@ _e_border_cb_signal_action(void *data, Evas_Object *obj, const char *emission, c
      }
    else if (!strcmp(source, "shade"))
      {
-       if (bd->shaded)
-         {
-            bd->shaded = 0;
-            bd->changes.shaded = 1;
-            bd->changed = 1;
-         }
-       else
-         {
-            bd->shaded = 1;
-            bd->changes.shaded = 1;
-            bd->changed = 1;
-         }
+       if (bd->shaded) e_border_unshade(bd);
+       else e_border_shade(bd);
      }
 }
 
@@ -1576,14 +1596,14 @@ _e_border_eval(E_Border *bd)
                  
                  printf("AUTO POS!\n");
                  if (bd->container->w > bd->w)
-                       new_x = rand() % (bd->container->w - bd->w);
+                   new_x = rand() % (bd->container->w - bd->w);
                  else
-                       new_x = 0;
+                   new_x = 0;
                  if (bd->container->h > bd->h)
-                       new_y = rand() % (bd->container->h - bd->h);
+                   new_y = rand() % (bd->container->h - bd->h);
                  else
-                       new_y = 0;
-
+                   new_y = 0;
+                 
                  skiplist = evas_list_append(skiplist, bd);
                  e_place_container_region_smart(bd->container, skiplist,
                                                 bd->x, bd->y, bd->w, bd->h,
@@ -1603,26 +1623,76 @@ _e_border_eval(E_Border *bd)
        else ecore_x_window_hide(bd->win);
        bd->changes.visible = 0;
      }
-   /* FIXME: handle shaded flag */
+
+   if ((bd->changes.shaded) && (bd->changes.pos) && (bd->changes.size))
+     {
+       if (bd->shaded)
+         ecore_x_window_hide(bd->client.shell_win);
+       else
+         ecore_x_window_show(bd->client.shell_win);
+       bd->changes.shaded = 0;
+     }
+   else if ((bd->changes.shaded) && (bd->changes.pos))
+     {
+       if (bd->shaded)
+         ecore_x_window_hide(bd->client.shell_win);
+       else
+         ecore_x_window_show(bd->client.shell_win);
+       bd->changes.size = 1;
+       bd->changes.shaded = 0;
+     }
+   else if ((bd->changes.shaded) && (bd->changes.size))
+     {
+       if (bd->shaded)
+         ecore_x_window_hide(bd->client.shell_win);
+       else
+         ecore_x_window_show(bd->client.shell_win);
+       bd->changes.shaded = 0;
+     }
+   else if (bd->changes.shaded)
+     {
+       if (bd->shaded)
+         ecore_x_window_hide(bd->client.shell_win);
+       else
+         ecore_x_window_show(bd->client.shell_win);
+       bd->changes.size = 1;
+       bd->changes.shaded = 0;
+     }
+   
    if ((bd->changes.pos) && (bd->changes.size))
      {
        printf("border move resize\n");
-       evas_obscured_clear(bd->bg_evas);
-       evas_obscured_rectangle_add(bd->bg_evas,
-                                   bd->client_inset.l, bd->client_inset.t,
-                                   bd->w - (bd->client_inset.l + bd->client_inset.r),
-                                   bd->h - (bd->client_inset.t + bd->client_inset.b));
-       ecore_x_window_move_resize(bd->win, bd->x, bd->y, bd->w, bd->h);
-       ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
-       ecore_x_window_move_resize(bd->client.shell_win, 
-                                  bd->client_inset.l, bd->client_inset.t,
-                                  bd->client.w, bd->client.h);
-       ecore_x_window_move_resize(bd->client.win, 0, 0,
-                                  bd->client.w, bd->client.h);
-       ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
-       evas_object_resize(bd->bg_object, bd->w, bd->h);
-       e_container_shape_resize(bd->shape, bd->w, bd->h);
-       e_container_shape_move(bd->shape, bd->x, bd->y);
+       if (bd->shaded)
+         {
+            evas_obscured_clear(bd->bg_evas);
+            ecore_x_window_move_resize(bd->win, bd->x, bd->y, bd->w, bd->h);
+            ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
+            ecore_x_window_move_resize(bd->client.win, 0, 0,
+                                       bd->client.w, bd->client.h);
+            ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
+            evas_object_resize(bd->bg_object, bd->w, bd->h);
+            e_container_shape_resize(bd->shape, bd->w, bd->h);
+            e_container_shape_move(bd->shape, bd->x, bd->y);
+         }
+       else
+         {
+            evas_obscured_clear(bd->bg_evas);
+            evas_obscured_rectangle_add(bd->bg_evas,
+                                        bd->client_inset.l, bd->client_inset.t,
+                                        bd->w - (bd->client_inset.l + bd->client_inset.r),
+                                        bd->h - (bd->client_inset.t + bd->client_inset.b));
+            ecore_x_window_move_resize(bd->win, bd->x, bd->y, bd->w, bd->h);
+            ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
+            ecore_x_window_move_resize(bd->client.shell_win, 
+                                       bd->client_inset.l, bd->client_inset.t,
+                                       bd->client.w, bd->client.h);
+            ecore_x_window_move_resize(bd->client.win, 0, 0,
+                                       bd->client.w, bd->client.h);
+            ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
+            evas_object_resize(bd->bg_object, bd->w, bd->h);
+            e_container_shape_resize(bd->shape, bd->w, bd->h);
+            e_container_shape_move(bd->shape, bd->x, bd->y);
+         }
        bd->changes.pos = 0;
        bd->changes.size = 0;
        printf("border move resize done\n");
@@ -1636,20 +1706,34 @@ _e_border_eval(E_Border *bd)
    else if (bd->changes.size)
      {
        printf("border move resize\n");
-       evas_obscured_clear(bd->bg_evas);
-       evas_obscured_rectangle_add(bd->bg_evas,
-                                   bd->client_inset.l, bd->client_inset.t,
-                                   bd->w - (bd->client_inset.l + bd->client_inset.r), bd->h - (bd->client_inset.t + bd->client_inset.b));
-       ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
-       ecore_x_window_resize(bd->win, bd->w, bd->h);
-       ecore_x_window_move_resize(bd->client.shell_win, 
-                                  bd->client_inset.l, bd->client_inset.t,
-                                  bd->client.w, bd->client.h);
-       ecore_x_window_move_resize(bd->client.win, 0, 0,
-                                  bd->client.w, bd->client.h);
-       ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
-       evas_object_resize(bd->bg_object, bd->w, bd->h);
-       e_container_shape_resize(bd->shape, bd->w, bd->h);
+       if (bd->shaded)
+         {
+            evas_obscured_clear(bd->bg_evas);
+            ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
+            ecore_x_window_resize(bd->win, bd->w, bd->h);
+            ecore_x_window_move_resize(bd->client.win, 0, 0,
+                                       bd->client.w, bd->client.h);
+            ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
+            evas_object_resize(bd->bg_object, bd->w, bd->h);
+            e_container_shape_resize(bd->shape, bd->w, bd->h);
+         }
+       else
+         {
+            evas_obscured_clear(bd->bg_evas);
+            evas_obscured_rectangle_add(bd->bg_evas,
+                                        bd->client_inset.l, bd->client_inset.t,
+                                        bd->w - (bd->client_inset.l + bd->client_inset.r), bd->h - (bd->client_inset.t + bd->client_inset.b));
+            ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
+            ecore_x_window_resize(bd->win, bd->w, bd->h);
+            ecore_x_window_move_resize(bd->client.shell_win, 
+                                       bd->client_inset.l, bd->client_inset.t,
+                                       bd->client.w, bd->client.h);
+            ecore_x_window_move_resize(bd->client.win, 0, 0,
+                                       bd->client.w, bd->client.h);
+            ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
+            evas_object_resize(bd->bg_object, bd->w, bd->h);
+            e_container_shape_resize(bd->shape, bd->w, bd->h);
+         }
        printf("border move resize done\n");
        bd->changes.size = 0;
      }
index 36a3772..a67fd91 100644 (file)
@@ -149,7 +149,9 @@ EAPI void      e_border_lower(E_Border *bd);
 EAPI void      e_border_stack_above(E_Border *bd, E_Border *above);
 EAPI void      e_border_stack_below(E_Border *bd, E_Border *below);
 EAPI void      e_border_focus_set(E_Border *bd, int focus, int set);
-
+EAPI void      e_border_shade(E_Border *bd);
+EAPI void      e_border_unshade(E_Border *bd);
+    
 EAPI E_Border *e_border_find_by_client_window(Ecore_X_Window win);
 
 EAPI void      e_border_idler_before(void);
index 73f49b7..c007f46 100644 (file)
@@ -56,10 +56,15 @@ main(int argc, char **argv)
    int i;
    char *display_name = NULL;
    int nosplash = 0;
+   int nostartup = 0;
+   int nowelcome = 0;
    int after_restart = 0; 
    char buf[1024];
   
    if (getenv("NOSPLASH")) nosplash = 1;
+   if (getenv("NOSTARTUP")) nostartup = 1;
+   if (getenv("NOWELCOME")) nowelcome = 1;
+   
    if (getenv("RESTART"))
      {
        printf("after restart!!!\n");
@@ -237,14 +242,17 @@ main(int argc, char **argv)
 
    /* setup module loading etc. FIXME: check return value */
    e_module_init();
-   
-   /* explicitly show a gui dialog */
-   e_error_dialog_show("Welcome to Enlightenment 0.17",
-                      "This is program has barely been started on, so it is not complete by a long\n"
-                      "shot. Please do NOT expect anything to work properly at this stage. It's\n"
-                      "being worked on.\n"
-                      "\n"
-                      "Hit \"OK\" to dismiss this dialog and continue using Enlightenment 0.17.");
+
+   if (!nowelcome)
+     {
+       /* explicitly show a gui dialog */
+       e_error_dialog_show("Welcome to Enlightenment 0.17",
+                           "This is program has barely been started on, so it is not complete by a long\n"
+                           "shot. Please do NOT expect anything to work properly at this stage. It's\n"
+                           "being worked on.\n"
+                           "\n"
+                           "Hit \"OK\" to dismiss this dialog and continue using Enlightenment 0.17.");
+     }
    
    if (ipc_failed)
      e_error_dialog_show("Enlightenment IPC setup error!",
@@ -266,8 +274,11 @@ main(int argc, char **argv)
    e_init_version_set(VERSION);
    e_init_status_set("Enlightenment Starting. Please wait.");
    
-   if (after_restart) e_startup(E_STARTUP_RESTART);
-   else e_startup(E_STARTUP_START);
+   if (!nostartup)
+     {
+       if (after_restart) e_startup(E_STARTUP_RESTART);
+       else e_startup(E_STARTUP_START);
+     }
    
    if ((nosplash) || (after_restart))
      {