aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/shot/e_mod_main.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-14 16:02:03 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-14 16:02:03 +0000
commit90659a081c5fc415a642908bca0a522ecbc47b5d (patch)
treeaaef6ebba0c24dcac206d56a80967ea5bf6607df /src/modules/shot/e_mod_main.c
parentf920665d4958dc58ffa15d533a4d131782cdbccd (diff)
downloadenlightenment-90659a081c5fc415a642908bca0a522ecbc47b5d.tar.gz
enlightenment-90659a081c5fc415a642908bca0a522ecbc47b5d.tar.xz
enlightenment-90659a081c5fc415a642908bca0a522ecbc47b5d.zip
"share" button on screenshot now has a confirm dialog because apparently "share" is too vague and we need users to explicitly waive their privacy rights
ticket #1985 SVN revision: 80959
Diffstat (limited to 'src/modules/shot/e_mod_main.c')
-rw-r--r--src/modules/shot/e_mod_main.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 084125226..1177cdceb 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -17,6 +17,7 @@ static E_Action *border_act = NULL, *act = NULL;
static E_Int_Menu_Augmentation *maug = NULL;
static Ecore_Timer *timer, *border_timer = NULL;
static E_Win *win = NULL;
+E_Confirm_Dialog *cd = NULL;
static Evas_Object *o_bg = NULL, *o_box = NULL, *o_content = NULL;
static Evas_Object *o_event = NULL, *o_img = NULL, *o_hlist = NULL;
static E_Manager *sman = NULL;
@@ -420,7 +421,7 @@ _win_share_del(void *data __UNUSED__)
{
if (handlers) ecore_event_handler_data_set(eina_list_last_data_get(handlers), NULL);
_upload_cancel_cb(NULL, NULL);
-
+ if (cd) e_object_del(E_OBJECT(cd));
}
static void
@@ -544,6 +545,29 @@ _win_share_cb(void *data __UNUSED__, void *data2 __UNUSED__)
}
static void
+_win_share_confirm_del(void *d EINA_UNUSED)
+{
+ cd = NULL;
+}
+
+static void
+_win_share_confirm_yes(void *d EINA_UNUSED)
+{
+ _win_share_cb(NULL, NULL);
+}
+
+static void
+_win_share_confirm_cb(void *d EINA_UNUSED, void *d2 EINA_UNUSED)
+{
+ if (cd) return;
+ cd = e_confirm_dialog_show(_("Confirm Share"), NULL,
+ _("This image will be uploaded<br>"
+ "to enlightenment.org. It will be publicly visible."),
+ _("Confirm"), _("Cancel"), _win_share_confirm_yes, NULL,
+ NULL, NULL, _win_share_confirm_del, NULL);
+}
+
+static void
_rect_down_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
Evas_Event_Mouse_Down *ev = event_info;
@@ -772,7 +796,7 @@ _shot_now(E_Zone *zone, E_Border *bd)
o = e_widget_button_add(evas, _("Save"), NULL, _win_save_cb, win, NULL);
e_widget_list_object_append(o_box, o, 1, 0, 0.5);
- o = e_widget_button_add(evas, _("Share"), NULL, _win_share_cb, win, NULL);
+ o = e_widget_button_add(evas, _("Share"), NULL, _win_share_confirm_cb, win, NULL);
e_widget_list_object_append(o_box, o, 1, 0, 0.5);
o = e_widget_button_add(evas, _("Cancel"), NULL, _win_cancel_cb, win, NULL);
e_widget_list_object_append(o_box, o, 1, 0, 0.5);
@@ -975,6 +999,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
e_object_del(E_OBJECT(win));
win = NULL;
}
+ E_FN_DEL(e_object_del, cd);
if (timer)
{
ecore_timer_del(timer);