fixed in svn

On Thu, Jul 19, 2012 at 11:39 AM, Daniel Juyung Seo <seojuyu...@gmail.com>wrote:

> I just got black screenshot with this 'take shot' option.
> Normal 'take screenshot' module works fine though.
> Anybody else has the same problem?
>
> Daniel Juyung Seo (SeoZ)
>
> On Thu, Jul 19, 2012 at 7:31 PM, Enlightenment SVN
> <no-re...@enlightenment.org> wrote:
> > Log:
> > add space handling, also make enter key actually save shots
> >
> >
> > Author:       discomfitor
> > Date:         2012-07-19 03:31:34 -0700 (Thu, 19 Jul 2012)
> > New Revision: 74178
> > Trac:         http://trac.enlightenment.org/e/changeset/74178
> >
> > Modified:
> >   trunk/e/src/modules/shot/e_mod_main.c
> >
> > Modified: trunk/e/src/modules/shot/e_mod_main.c
> > ===================================================================
> > --- trunk/e/src/modules/shot/e_mod_main.c       2012-07-19 10:02:26 UTC
> (rev 74177)
> > +++ trunk/e/src/modules/shot/e_mod_main.c       2012-07-19 10:31:34 UTC
> (rev 74178)
> > @@ -25,8 +25,11 @@
> >  static Ecore_Con_Url *url_up = NULL;
> >  static Eina_List *handlers = NULL;
> >  static char *url_ret = NULL;
> > +static E_Dialog *fsel_dia = NULL;
> >  static E_Border_Menu_Hook *border_hook = NULL;
> >
> > +static void _file_select_ok_cb(void *data __UNUSED__, E_Dialog *dia);
> > +
> >  static void
> >  _win_delete_cb(E_Win *w __UNUSED__)
> >  {
> > @@ -107,6 +110,16 @@
> >  }
> >
> >  static void
> > +_save_key_down_cb(void *data __UNUSED__, Evas *e __UNUSED__,
> Evas_Object *obj __UNUSED__, void *event)
> > +{
> > +   Evas_Event_Key_Down *ev = event;
> > +   if ((!strcmp(ev->keyname, "Return")) || (!strcmp(ev->keyname,
> "KP_Enter")))
> > +     {
> > +        _file_select_ok_cb(NULL, fsel_dia);
> > +     }
> > +}
> > +
> > +static void
> >  _screen_change_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
> void *event_info __UNUSED__)
> >  {
> >     Eina_List *l;
> > @@ -178,6 +191,7 @@
> >  {
> >     const char *file;
> >
> > +   dia = fsel_dia;
> >     file = e_widget_fsel_selection_path_get(o_fsel);
> >     if ((!file) || (!file[0]) || ((!eina_str_has_extension(file, "jpg"))
> && (!eina_str_has_extension(file, "png"))))
> >       {
> > @@ -196,6 +210,7 @@
> >          e_object_del(E_OBJECT(win));
> >          win = NULL;
> >       }
> > +   fsel_dia = NULL;
> >  }
> >
> >  static void
> > @@ -207,6 +222,7 @@
> >          e_object_del(E_OBJECT(win));
> >          win = NULL;
> >       }
> > +   fsel_dia = NULL;
> >  }
> >
> >  static void
> > @@ -215,8 +231,9 @@
> >     E_Dialog *dia;
> >     Evas_Object *o;
> >     Evas_Coord mw, mh;
> > +   int mask = 0;
> >
> > -   dia = e_dialog_new(scon, "E", "_e_shot_fsel");
> > +   fsel_dia = dia = e_dialog_new(scon, "E", "_e_shot_fsel");
> >     e_dialog_title_set(dia, _("Select screenshot save location"));
> >     o = e_widget_fsel_add(dia->win->evas, "desktop", "/",
> >                           (quality == 100) ? "shot.png" : "shot.jpg",
> > @@ -234,6 +251,11 @@
> >                         _file_select_cancel_cb, NULL);
> >     e_dialog_resizable_set(dia, 1);
> >     e_win_centered_set(dia->win, 1);
> > +   o = evas_object_rectangle_add(dia->win->evas);
> > +   if (!evas_object_key_grab(o, "Return", mask, ~mask, 0)) printf("grab
> err\n");
> > +   mask = 0;
> > +   if (!evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0))
> printf("grab err\n");
> > +   evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
> _save_key_down_cb, NULL);
> >     e_dialog_show(dia);
> >  }
> >
> > @@ -721,6 +743,8 @@
> >     if (!evas_object_key_grab(o, "Return", mask, ~mask, 0)) printf("grab
> err\n");
> >     mask = 0;
> >     if (!evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0))
> printf("grab err\n");
> > +   mask = 0;
> > +   if (!evas_object_key_grab(o, "space", mask, ~mask, 0)) printf("grab
> err\n");
> >     evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
> _key_down_cb, NULL);
> >
> >     edje_object_size_min_calc(o_bg, &w, &h);
> >
> >
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > enlightenment-svn mailing list
> > enlightenment-...@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to