Remove picture selection from intro screen for now
This commit is contained in:
parent
eae978346d
commit
b97edec4db
@ -231,10 +231,10 @@ class IntroBox(hippo.CanvasBox, hippo.CanvasItem):
|
|||||||
hippo.CanvasBox.__init__(self, **kwargs)
|
hippo.CanvasBox.__init__(self, **kwargs)
|
||||||
self._pixbuf = None
|
self._pixbuf = None
|
||||||
|
|
||||||
self._video_box = VideoBox(xalign=hippo.ALIGNMENT_CENTER,
|
#self._video_box = VideoBox(xalign=hippo.ALIGNMENT_CENTER,
|
||||||
yalign=hippo.ALIGNMENT_START,
|
# yalign=hippo.ALIGNMENT_START,
|
||||||
padding_bottom=units.grid_to_pixels(0.5))
|
# padding_bottom=units.grid_to_pixels(0.5))
|
||||||
self.append(self._video_box)
|
#self.append(self._video_box)
|
||||||
|
|
||||||
self._entry_box = EntryBox(xalign=hippo.ALIGNMENT_CENTER,
|
self._entry_box = EntryBox(xalign=hippo.ALIGNMENT_CENTER,
|
||||||
padding_bottom=units.grid_to_pixels(0.5))
|
padding_bottom=units.grid_to_pixels(0.5))
|
||||||
@ -250,15 +250,21 @@ class IntroBox(hippo.CanvasBox, hippo.CanvasItem):
|
|||||||
self.append(self._ok)
|
self.append(self._ok)
|
||||||
|
|
||||||
def _ok_activated(self, item):
|
def _ok_activated(self, item):
|
||||||
pixbuf = self._video_box.get_pixbuf()
|
#pixbuf = self._video_box.get_pixbuf()
|
||||||
name = self._entry_box.get_text()
|
name = self._entry_box.get_text()
|
||||||
color = self._color_box.get_color()
|
color = self._color_box.get_color()
|
||||||
|
|
||||||
if not pixbuf or not name or not color:
|
#if not pixbuf or not name or not color:
|
||||||
print "not one of pixbuf(%r), name(%r), or color(%r)"
|
# print "Missing a picture (%r), name (%r), or color (%r)" % (pixbuf, name, color)
|
||||||
|
if not name:
|
||||||
|
print "Please pick a nickname"
|
||||||
|
return
|
||||||
|
if not color:
|
||||||
|
print "Please pick a color"
|
||||||
return
|
return
|
||||||
|
|
||||||
self.emit('ok', pixbuf, name, color)
|
#self.emit('ok', pixbuf, name, color)
|
||||||
|
self.emit('ok', None, name, color)
|
||||||
|
|
||||||
|
|
||||||
class IntroWindow(gtk.Window):
|
class IntroWindow(gtk.Window):
|
||||||
@ -286,9 +292,9 @@ class IntroWindow(gtk.Window):
|
|||||||
|
|
||||||
def _create_profile(self, pixbuf, name, color):
|
def _create_profile(self, pixbuf, name, color):
|
||||||
# Save the buddy icon
|
# Save the buddy icon
|
||||||
icon_path = os.path.join(env.get_profile_path(), "buddy-icon.jpg")
|
#icon_path = os.path.join(env.get_profile_path(), "buddy-icon.jpg")
|
||||||
scaled = pixbuf.scale_simple(200, 200, gtk.gdk.INTERP_BILINEAR)
|
#scaled = pixbuf.scale_simple(200, 200, gtk.gdk.INTERP_BILINEAR)
|
||||||
pixbuf.save(icon_path, "jpeg", {"quality":"85"})
|
#pixbuf.save(icon_path, "jpeg", {"quality":"85"})
|
||||||
|
|
||||||
cp = ConfigParser()
|
cp = ConfigParser()
|
||||||
section = 'Buddy'
|
section = 'Buddy'
|
||||||
|
Loading…
Reference in New Issue
Block a user