Cleanup some code.
SVN revision: 44515
E_CONFIG_VAL(D, T, policy.softkey.match.name, INT);
E_CONFIG_VAL(D, T, policy.softkey.match.title, INT);
E_CONFIG_VAL(D, T, policy.softkey.match.win_type, INT);
+ E_CONFIG_VAL(D, T, policy.softkey.locked, INT);
E_CONFIG_VAL(D, T, policy.home.class, STR);
E_CONFIG_VAL(D, T, policy.home.name, STR);
E_CONFIG_VAL(D, T, policy.home.title, STR);
E_CONFIG_VAL(D, T, policy.indicator.match.name, INT);
E_CONFIG_VAL(D, T, policy.indicator.match.title, INT);
E_CONFIG_VAL(D, T, policy.indicator.match.win_type, INT);
+ E_CONFIG_VAL(D, T, policy.indicator.locked, INT);
il_cfg = e_config_domain_load("module.illume2", conf_edd);
if ((il_cfg) &&
il_cfg->policy.mode.dual = 0;
il_cfg->policy.mode.side = 0;
}
+ if ((il_cfg->version & 0xffff) < 3)
+ {
+ il_cfg->policy.softkey.locked = 1;
+ il_cfg->policy.indicator.locked = 1;
+ }
il_cfg->version = (IL_CONFIG_MAJ << 16) | IL_CONFIG_MIN;
}
il_cfg->mod_dir = eina_stringshare_add(m->dir);
#ifndef E_MOD_CONFIG_H
# define E_MOD_CONFIG_H
-# define IL_CONFIG_MIN 2
+# define IL_CONFIG_MIN 3
# define IL_CONFIG_MAJ 0
typedef struct _Il_Config Il_Config;
const char *class;
const char *name;
const char *title;
- int win_type;
+ int win_type, locked;
struct
{
int class, name, title, win_type;
illume_layout_illume_init(void)
{
illume_layout_mode_register(&laymode);
+
handlers =
eina_list_append(handlers,
ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP,
ecore_x_window_show(_drag_win);
if (!e_grabinput_get(_drag_win, 1, _drag_win))
{
+ printf("Grab Input Failed\n");
ecore_x_window_free(_drag_win);
+ _drag_win = 0;
return;
}
_drag_border = bd;
_drag_end(E_Border *bd)
{
/* HANDLE A BORDER DRAG BEING ENDED */
+
+ e_grabinput_release(_drag_win, _drag_win);
+ ecore_x_window_free(_drag_win);
+ _drag_win = 0;
+
ecore_x_e_illume_drag_set(bd->client.win, 0);
_drag_border = NULL;
}
ev = event;
if (ev->window != _drag_win) return 1;
- e_grabinput_release(_drag_win, _drag_win);
- ecore_x_window_free(_drag_win);
- _drag_win = 0;
ecore_x_e_illume_drag_end_send(_drag_border->client.win);
return 1;
}
#include "e.h"
#include "e_mod_config.h"
+#include "e_mod_layout.h"
#include "e_mod_policy_settings.h"
/* local function prototypes */
_il_config_policy_settings_changed, NULL);
e_widget_list_object_append(list, of, 1, 0, 0.0);
+ of = e_widget_framelist_add(evas, _("Drag"), 0);
+ ow = e_widget_check_add(evas, _("Lock Top Shelf Position"),
+ &(il_cfg->policy.indicator.locked));
+ evas_object_smart_callback_add(ow, "changed",
+ _il_config_policy_settings_changed, NULL);
+ e_widget_framelist_object_append(of, ow);
+ ow = e_widget_check_add(evas, _("Lock Bottom Panel Position"),
+ &(il_cfg->policy.softkey.locked));
+ evas_object_smart_callback_add(ow, "changed",
+ _il_config_policy_settings_changed, NULL);
+ e_widget_framelist_object_append(of, ow);
+ e_widget_list_object_append(list, of, 1, 0, 0.0);
+
e_widget_disabled_set(o_top, !il_cfg->policy.mode.dual);
e_widget_disabled_set(o_left, !il_cfg->policy.mode.dual);
static void
_il_config_policy_settings_changed(void *data, Evas_Object *obj, void *event)
{
+ E_Border *bd;
+
+ bd = illume_border_top_shelf_get();
+ if (bd) ecore_x_e_illume_drag_locked_set(bd->client.win,
+ il_cfg->policy.indicator.locked);
+ bd = illume_border_bottom_panel_get();
+ if (bd) ecore_x_e_illume_drag_locked_set(bd->client.win,
+ il_cfg->policy.softkey.locked);
+
e_widget_disabled_set(o_top, !il_cfg->policy.mode.dual);
e_widget_disabled_set(o_left, !il_cfg->policy.mode.dual);
if (_ps_change_timer) ecore_timer_del(_ps_change_timer);