'everything' module:
authorHannes Janetzek <hannes.janetzek@gmail.com>
Wed, 26 Aug 2009 00:36:59 +0000 (00:36 +0000)
committerHannes Janetzek <hannes.janetzek@gmail.com>
Wed, 26 Aug 2009 00:36:59 +0000 (00:36 +0000)
- fix select_plugin, it was possible that s->plugin kept an orphaned pointer
- theme: align popup in the middle

SVN revision: 41999

data/themes/default.edc
src/modules/everything/evry.c

index ca43edc..c016028 100644 (file)
@@ -26587,9 +26587,9 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
      
    group { name: "e/modules/everything/main";
    #ifdef DROP_SHADOW
-       min: 520 218;
+       min: 516 222;
    #else
-       min: 420 118;
+       min: 416 122;
    #endif
        images {
           image: "base_bg.png" COMP;
@@ -26619,7 +26619,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
           }
           part { name: "bg";
               description { state: "default" 0;
-                  min: 420 118;
+                  min: 416 118;
                   rel1.relative: 0.5 0.0;
                   rel1.offset: 0 50;
                   rel2.relative: 0.5 1.0;
@@ -26634,7 +26634,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
            #else
           part { name: "bg";
               description { state: "default" 0;
-                  min: 420 118;
+                  min: 416 118;
                   rel1.relative: 0.5 0.0;
                   rel1.offset: 0 0;
                   rel2.relative: 0.5 1.0;
@@ -26665,21 +26665,20 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
               type: RECT;
               clip_to: "frame";
               description { state: "default" 0;
-                  min: 600 100;
+                  min: 600 110;
                   align: 0.0 0.0;
                   color: 255 255 255 255;
                   rel1 {
-                      offset: 10 3;
+                      offset: 8 5;
                       to: "bg";
                   }
                   rel2 {
-                      offset: -11 -3;
+                      offset: -9 -6;
                       to: "bg";
                   }
               }
               description { state: "wide" 0;
                   inherit: "default" 0.0;
-                  /* min: 622 118; */
                   align: 1.0 0.0;
               }
           }
@@ -26687,16 +26686,13 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
               type: SWALLOW;
               clip_to: "selector_frame";
               description { state: "default" 0;
-                  min: 200 100;
-                  max: 200 999;
-                  align: 0.0 0.0;
                   rel1 {
                       offset: 0 2;
                       to: "selector_frame";
                   }
                   rel2 {
                       relative: 0 1;
-                      offset: 200 -2;
+                      offset: 199 -2;
                       to: "selector_frame";
                   }
               }
@@ -26709,9 +26705,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
               type: SWALLOW;
               clip_to: "selector_frame";
               description { state: "default" 0;
-                  min: 200 100;
-                  max: 200 999;
-                  align: 0.0 0.0;
                   rel1 {
                       relative: 1 0;
                       offset: 0 2;
@@ -26719,7 +26712,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
                       to_x: "e.swallow.subject_selector";
                   }
                   rel2 {
-                      offset: 200 -2;
+                      offset: 199 -2;
                       to_y: "selector_frame";
                       to_x: "e.swallow.subject_selector";
                   }
@@ -26729,9 +26722,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
               type: SWALLOW;
               clip_to: "selector_frame";
               description { state: "default" 0;
-                  max: 200 999;
-                  visible: 0;
-                  align: 0.0 0.0;
                   rel1 {
                       relative: 1 0;
                       offset: 0 2;
@@ -26739,7 +26729,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
                       to_x: "e.swallow.action_selector";
                   }
                   rel2 {
-                      offset: 200 -2;
+                      offset: 199 -2;
                       to_y: "selector_frame";
                       to_x: "e.swallow.action_selector";
                   }
@@ -26919,11 +26909,10 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
                   rel1 {
                       offset: 20 6;
                       relative: 0.0 0.6;
-                      /* to_x: "e.swallow.icons"; */
                   }
                   rel2.offset: -11 -2;
-                  color: 255 255 255 255;
-                  color3: 40 40 40 128;
+                  color: 205 205 205 255;
+                  color3: 40 40 40 64;
                   text {
                       font: "Sans:style=Bold";
                       size: 10;
@@ -26931,6 +26920,12 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
                       align: 0.5 0.5;
                   }
               }
+              description {
+                  state: "selected" 0.0;
+                  inherit: "default" 0.0;
+                  color: 255 255 255 255;
+              }
+
           }
           part { name: "e.text.plugin";
               type: TEXT;
@@ -26965,6 +26960,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
               transition: SINUSOIDAL 0.2;
               target: "border";
               target: "border_bg";
+              target: "e.text.label";
           }
           program { name: "unsel";
               signal: "e,state,unselected";
@@ -26973,6 +26969,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
               transition: SINUSOIDAL 0.3;
               target: "border";
               target: "border_bg";
+              target: "e.text.label";
           }
           program { name: "update";
               signal: "e,signal,update";
index 14109f3..c898b58 100644 (file)
@@ -152,11 +152,6 @@ evry_show(E_Zone *zone, const char *params)
 
    _evry_selector_update(selector);
 
-   e_popup_layer_set(list->popup, 255);
-   e_popup_layer_set(win->popup, 255);
-   e_popup_show(win->popup);
-   e_popup_show(list->popup);
-
    if (evry_conf->views && selector->state)
      {
        Evry_View *view =evry_conf->views->data;
@@ -178,7 +173,14 @@ evry_show(E_Zone *zone, const char *params)
       (ECORE_X_EVENT_SELECTION_NOTIFY,
        _evry_cb_selection_notify, win));
 
+   e_popup_move(win->popup,  win->popup->x,  win->popup->y  - list->popup->h/2);
+   e_popup_move(list->popup, list->popup->x, list->popup->y - list->popup->h/2);
 
+   e_popup_layer_set(list->popup, 255);
+   e_popup_layer_set(win->popup, 255);
+   e_popup_show(win->popup);
+   e_popup_show(list->popup);
+   
    return 1;
 
  error:
@@ -248,7 +250,7 @@ evry_clear_input(void)
 }
 
 
-static int item_cnt = 0;
+/* static int item_cnt = 0; */
 
 EAPI Evry_Item *
 evry_item_new(Evry_Item *base, Evry_Plugin *p, const char *label, void (*cb_free) (Evry_Item *item))
@@ -287,7 +289,7 @@ evry_item_free(Evry_Item *it)
    /* printf("%d, %d\t free: %s\n",
     *    it->ref, item_cnt - 1,
     *    it->label); */
-   item_cnt--;
+   /* item_cnt--; */
 
    if (it->label) eina_stringshare_del(it->label);
    if (it->o_bg) evas_object_del(it->o_bg);
@@ -670,6 +672,7 @@ _evry_list_win_show(void)
    _evry_list_win_update(selector->state);
 
    edje_object_signal_emit(list->o_main, "e,state,list_show", "e");
+   edje_object_signal_emit(list->o_main, "e,state,entry_show", "e");
 }
 
 static void
@@ -684,6 +687,10 @@ _evry_list_win_clear(int hide)
      {
        list->visible = EINA_FALSE;
        edje_object_signal_emit(list->o_main, "e,state,list_hide", "e");
+       if (evry_conf->hide_input &&
+           (!selector->state || !selector->state->input ||
+            strlen(selector->state->input) == 0))
+         edje_object_signal_emit(list->o_main, "e,state,entry_hide", "e");
      }
 }
 
@@ -716,7 +723,7 @@ _evry_window_new(E_Zone *zone)
    edje_object_size_min_get(o, &mw, &mh);
 
    x = (zone->w / 2) - (mw / 2);
-   y = (zone->h / 2) - mh;
+   y = (zone->h / 2) - (mh / 2);
 
    e_popup_move_resize(popup, x, y, mw, mh);
 
@@ -737,7 +744,7 @@ _evry_window_free(Evry_Window *win)
    e_popup_hide(win->popup);
    evas_event_freeze(win->popup->evas);
    evas_object_del(win->o_main);
-   /* evas_event_thaw(win->popup->evas);    */
+   /* evas_event_thaw(win->popup->evas); */
    e_object_del(E_OBJECT(win->popup));
    E_FREE(win);
 }
@@ -1041,7 +1048,7 @@ _evry_selector_actions_get(Evry_Item *it)
    Evry_Plugin *p, *plugin;
    Evry_Selector *sel = selectors[1];
    const char *type_out;
-
+   
    while (sel->state)
      _evry_state_pop(sel);
 
@@ -1441,7 +1448,7 @@ _evry_backspace(Evry_State *s)
 static void
 _evry_update_text_label(Evry_State *s)
 {
-   if (evry_conf->hide_input)
+   if (!list->visible && evry_conf->hide_input)
      {
        if (strlen(s->input) > 0)
          edje_object_signal_emit(list->o_main, "e,state,entry_show", "e");
@@ -1494,7 +1501,7 @@ _evry_clear(Evry_State *s)
      {
        s->input[0] = 0;
        _evry_update(s, 1);
-       if (evry_conf->hide_input)
+       if (!list->visible && evry_conf->hide_input)
          edje_object_signal_emit(list->o_main, "e,state,entry_hide", "e");
        return 1;
      }
@@ -1541,11 +1548,12 @@ _evry_plugin_action(Evry_Selector *sel, int finished)
 
        act->action(act);
      }
-   else
+   else if (s_action->plugin->action)
      {
        Evry_Item *it = s_action->sel_item;
        s_action->plugin->action(s_action->plugin, it);
      }
+   else return;
 
    /* let subject and object plugin know that an action was performed */
    if (s_subject->plugin->action)
@@ -1792,7 +1800,10 @@ _evry_plugin_select(Evry_State *s, Evry_Plugin *p)
      {
        _evry_item_desel(s, NULL);
        s->plugin = p;
+       return;
      }
+
+   s->plugin = NULL;
 }
 
 void