/* local subsystem functions */
static void _e_gadcon_popup_free(E_Gadcon_Popup *pop);
+static void _e_gadcon_popup_shelf_lock_set(E_Gadcon_Popup *pop, Eina_Bool locked);
/* externally accessible functions */
pop->o_bg = o;
pop->gcc = gcc;
+ pop->shelf_lock = 1;
+ pop->shelf_was_locked = 0;
pop->resize_func = resize_func;
return pop;
return;
}
e_popup_move_resize(pop->win, px - zx, py - zy, pop->w, pop->h);
+
+ if (!pop->shelf_was_locked)
+ _e_gadcon_popup_shelf_lock_set(pop, 1);
}
EAPI void
E_OBJECT_TYPE_CHECK(pop, E_GADCON_POPUP_TYPE);
if (pop->pinned) return;
e_popup_hide(pop->win);
+ if (pop->shelf_was_locked)
+ _e_gadcon_popup_shelf_lock_set(pop, 0);
}
EAPI void
}
}
+EAPI void
+e_gadcon_popup_shelf_lock_set(E_Gadcon_Popup *pop, Eina_Bool setting)
+{
+ if (!pop) return;
+ E_OBJECT_CHECK(pop);
+ E_OBJECT_TYPE_CHECK(pop, E_GADCON_POPUP_TYPE);
+
+ setting = !!setting;
+ if (pop->shelf_lock == setting) return;
+ pop->shelf_lock = setting;
+
+ if ((!setting) && pop->shelf_was_locked)
+ _e_gadcon_popup_shelf_lock_set(pop, 0);
+}
+
/* local subsystem functions */
static void
_e_gadcon_popup_free(E_Gadcon_Popup *pop)
{
+ if (pop->shelf_was_locked)
+ _e_gadcon_popup_shelf_lock_set(pop, 0);
pop->gcc = NULL;
e_object_del(E_OBJECT(pop->win));
free(pop);
}
+
+static void
+_e_gadcon_popup_shelf_lock_set(E_Gadcon_Popup *pop, Eina_Bool locked)
+{
+ if ((!pop->gcc) || (!pop->gcc->gadcon) || (!pop->gcc->gadcon->shelf))
+ return;
+
+ e_shelf_locked_set(pop->gcc->gadcon->shelf, locked);
+ pop->shelf_was_locked = locked;
+}
Evas_Coord w, h;
Evas_Object *o_bg;
- int pinned : 1;
+ Eina_Bool pinned : 1;
+ Eina_Bool shelf_lock : 1;
+ Eina_Bool shelf_was_locked : 1;
void (*resize_func) (Evas_Object *obj, int *w, int *h);
};
EAPI void e_gadcon_popup_show(E_Gadcon_Popup *pop);
EAPI void e_gadcon_popup_hide(E_Gadcon_Popup *pop);
EAPI void e_gadcon_popup_toggle_pinned(E_Gadcon_Popup *pop);
+EAPI void e_gadcon_popup_shelf_lock_set(E_Gadcon_Popup *pop, Eina_Bool setting);
#endif
#endif