}
//////////////////////////////
static void
-e_tw_act_toggle_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
+e_tw_act_toggle_cb(E_Object *obj EINA_UNUSED, const char *params)
{
- if (!tw_mod->pop) return;
- if (tw_mod->sticky)
- tw_hide(NULL);
- tw_mod->sticky = !tw_mod->sticky;
+ if (tw_mod->pop)
+ {
+ if (tw_mod->sticky)
+ tw_hide(NULL);
+ tw_mod->sticky = !tw_mod->sticky;
+ return;
+ }
+ if (params && params[0])
+ {
+ tw_uri_show(params);
+ tw_mod->sticky = 1;
+ }
}
//////////////////////////////
EAPI void *
}
e_tw_toggle = e_action_add(_act_toggle);
e_tw_toggle->func.go = e_tw_act_toggle_cb;
- e_action_predef_name_set(_e_tw_name, _lbl_toggle, _act_toggle, NULL, NULL, 0);
+ e_action_predef_name_set(_e_tw_name, _lbl_toggle, _act_toggle, NULL, NULL, 1);
e_configure_option_domain_current_set("teamwork");
EINTERN void e_tw_shutdown(void);
EINTERN Eina_Bool tw_hide(void *d EINA_UNUSED);
EINTERN void tw_popup_opacity_set(void);
+EINTERN void tw_uri_show(const char *uri);
EINTERN E_Config_Dialog *e_int_config_teamwork_module(E_Container *con, const char *params EINA_UNUSED);
if (py + ph > tw_mod->pop->zone->h)
py = tw_mod->pop->zone->h - ph;
}
- else
+ else if (tw_win)
{
E_Border *bd = e_border_find_by_client_window(tw_win);
int x, y;
/* give up */
if (py < 0) py = 0;
}
+ else
+ {
+ px = (tw_mod->pop->zone->w / 2) - (pw / 2);
+ py = (tw_mod->pop->zone->h / 2) - (pw / 2);
+ }
e_popup_move_resize(tw_mod->pop, px, py, pw, ph);
e_popup_content_set(tw_mod->pop, o);
e_popup_show(tw_mod->pop);
eina_hash_free(tw_mod->media);
E_FREE_FUNC(tw_mod->pop, e_object_del);
}
+
+EINTERN void
+tw_uri_show(const char *uri)
+{
+ dbus_link_show_helper(uri, 1);
+}