From 3618ba9ab56baf8119e7c4eff373f2700a0dc53e Mon Sep 17 00:00:00 2001 From: Charlie Date: Mon, 07 Dec 2009 18:59:03 +0000 Subject: Can start activity from workshop if related activities are open --- (limited to 'Workshop.activity/Workshop.py') diff --git a/Workshop.activity/Workshop.py b/Workshop.activity/Workshop.py index 857bf8c..09ac402 100644 --- a/Workshop.activity/Workshop.py +++ b/Workshop.activity/Workshop.py @@ -257,7 +257,7 @@ class SearchBar(gtk.HBox): self.sort_combo.connect("changed",self.controller.sort_selection_changed,None) class WorkshopDetail(gtk.VBox): - def __init__(self,tutorial,controller): + def __init__(self,tutorial,controller,rating_editable=False): """ Constructor @@ -302,7 +302,7 @@ class WorkshopDetail(gtk.VBox): label_holder.pack_start(self.title_label) label_holder.pack_start(self.author_label) - self.rating = Rating(tutorial,controller,rating = tutorial.rating) + self.rating = Rating(tutorial,controller,tutorial.rating,rating_editable) second_row = gtk.HBox(False) second_row.pack_start(icon,False,False) @@ -359,7 +359,7 @@ class WorkshopListItem(gtk.Alignment): """ A list item containing the details of a tutorial """ - def __init__(self,tutorial,controller): + def __init__(self,tutorial,controller,rating_editable=False): """ Constructor @@ -388,7 +388,7 @@ class WorkshopListItem(gtk.Alignment): self.icon = gtk.Image() self.icon.set_from_file('icon.svg') - self.rating = Rating(tutorial,controller,tutorial.rating, True) + self.rating = Rating(tutorial,controller,tutorial.rating,rating_editable) #Add the controls to the table self.table.attach(self.icon,0,1,0,1,0,0) @@ -408,7 +408,7 @@ class WorkshopListItem(gtk.Alignment): class MyTutorialListItem(WorkshopListItem): def __init__(self,tutorial,controller): - WorkshopListItem.__init__(self,tutorial,controller) + WorkshopListItem.__init__(self,tutorial,controller,False) self.last_row = gtk.HBox(False,15) self.btn_launch = gtk.Button('Launch') @@ -427,7 +427,7 @@ class MyTutorialListItem(WorkshopListItem): class MyTutorialDetail(WorkshopDetail): def __init__(self,tutorial,controller): - WorkshopDetail.__init__(self,tutorial,controller) + WorkshopDetail.__init__(self,tutorial,controller,False) #The bottom of the screen contains the button(fourth and fifth row self.launch_button = gtk.Button('Launch') -- cgit v0.9.1