Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Workshop.activity/TutorialStoreHome.py
blob: 8a361dc7bd4700ff27ffd04e2cf30f7205af746a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import logging
import TutorialStoreCategories
import TutorialStoreSearch
import TutorialStoreSuggestion
import TutorialStoreResults
import TutorialStoreDetails

import sys, os
import gtk

class TutorialStoreHome:
    def log(self,widget,data=None):
        logging.info('Tutorial Store Home start')

    def __init__(self):
        
        self.categories = TutorialStoreCategories.TutorialStoreCategories()
        categories_frame = self.categories.categorie_box_frame
        
        self.search = TutorialStoreSearch.TutorialStoreSearch()
        tutorial_store_search = self.search.tutorial_store_search

        self.search_button = self.search.search_button_access()
        
        self.suggestion = TutorialStoreSuggestion.TutorialStoreSuggestion()
        
        tut_store_suggestion = gtk.HBox(homogeneous=True, spacing=5)
        tut_store_suggestion.pack_start(self.suggestion.top_five_frame, expand=False, fill=False, padding=0)
        tut_store_suggestion.pack_start(self.suggestion.also_like_frame, expand=False, fill=False, padding=0)
        
        self.results = TutorialStoreResults.TutorialStoreResults()
        
        tut_store_home_base = gtk.VBox(False, 5)
        tut_store_home_base.pack_start(tutorial_store_search, False, False, 25)
        tut_store_home_base.pack_start(tut_store_suggestion, False, False, 0)
        
        self.labeltest = gtk.Label('Test')
        
        self.tutorial_store_home = gtk.HBox(False, 5)
        self.tutorial_store_home.pack_start(categories_frame, True, True, 5)
        self.tutorial_store_home.pack_start(tut_store_home_base, True, True, 5)
        self.tutorial_store_home.pack_start(tut_store_home_base, True, True, 5)
        
        tut_store_suggestion.show()
        categories_frame.show()
        tut_store_home_base.show()
        self.tutorial_store_home.show()
        
    def get_search_button(self):
            
        return self.search_button
    
    def get_more_button(self):
        return self.suggestion.get_more_button()
    
    def get_results_widget(self):
        
        self.search = TutorialStoreSearch.TutorialStoreSearch()
        tutorial_store_search = self.search.tutorial_store_search
        
        self.results = TutorialStoreResults.TutorialStoreResults()
        tutorial_store_results = self.results.tutorial_store_results
        
        self.categories = TutorialStoreCategories.TutorialStoreCategories()
        categories_frame = self.categories.categorie_box_frame
        
        tut_store_home_base = gtk.VBox(False, 5)
        tut_store_home_base.pack_start(tutorial_store_search, False, False, 25)
        tut_store_home_base.pack_start(tutorial_store_results, False, False, 0)
        
        self.tutorial_store_home = gtk.HBox(False, 5)
        self.tutorial_store_home.pack_start(categories_frame, True, True, 5)
        self.tutorial_store_home.pack_start(tut_store_home_base, True, True, 5)
        
        tut_store_home_base.show()
        tutorial_store_search.show()
        tutorial_store_results.show()
        categories_frame.show()
        self.tutorial_store_home.show()
        
        return self.tutorial_store_home
    
    def get_details_widget(self):
        
        self.search = TutorialStoreSearch.TutorialStoreSearch()
        tutorial_store_search = self.search.tutorial_store_search
        
        self.details = TutorialStoreDetails.TutorialStoreDetails()
        tutorial_store_details = self.details.tutorial_store_details
        
        self.categories = TutorialStoreCategories.TutorialStoreCategories()
        categories_frame = self.categories.categorie_box_frame
        
        tut_store_home_base = gtk.VBox(False, 5)
        tut_store_home_base.pack_start(tutorial_store_search, False, False, 25)
        tut_store_home_base.pack_start(tutorial_store_details, False, False, 0)
        
        self.tutorial_store_home = gtk.HBox(False, 5)
        self.tutorial_store_home.pack_start(categories_frame, True, True, 5)
        self.tutorial_store_home.pack_start(tut_store_home_base, True, True, 5)
        
        tut_store_home_base.show()
        tutorial_store_search.show()
        tutorial_store_details.show()
        categories_frame.show()
        self.tutorial_store_home.show()
        
        return self.tutorial_store_home