[PATCH] Remove scrot dependency for global screenshot support

Martin Kolman mkolman at redhat.com
Tue Jan 7 15:33:31 UTC 2014


Chris Lumens píše v Út 07. 01. 2014 v 10:12 -0500:
> >  from pyanaconda.ui import UserInterface, common
> >  from pyanaconda.ui.gui.utils import enlightbox, gtk_action_wait, busyCursor, unbusyCursor
> > @@ -243,15 +242,17 @@ class GUIObject(common.UIObject):
> >  
> >              fn = os.path.join(self.screenshots_directory,
> >                                "screenshot-%04d.png" % _screenshotIndex)
> > -            rc = iutil.execWithRedirect("scrot", [fn])
> > -            if rc == 0:
> > -                log.info("screenshot nr. %d taken", _screenshotIndex)
> > -                _screenshotIndex += 1
> > -            else:
> > -                log.error("taking screenshot failed")
> > +            root_window = Gdk.get_default_root_window()
> > +            pixbuf = Gdk.pixbuf_get_from_window(root_window, 0, 0,
> > +                                                root_window.get_width(),
> > +                                                root_window.get_height())
> > +            pixbuf.savev(fn, 'png', [], [])
> > +            log.info("screenshot nr. %d taken" % _screenshotIndex)
> 
> pylint will complain about the % here.
> 
> - Chris
Thanks to both! Fixing locally.

> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches




More information about the anaconda-patches mailing list