Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Workshop.activity/TutorialStoreResults.py
blob: 0e8e54cc8e04b823d0e11feeafa52098617d6aec (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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import sys, os
import gtk

class TutorialStoreResults:

    def __init__(self):
        tuto_icon1 = gtk.Image()
        tuto_icon1.set_from_file('icon.svg')
        tuto_icon2 = gtk.Image()
        tuto_icon2.set_from_file('icon.svg')
        
        full_star_icon1 = gtk.Image()
        full_star_icon1.set_from_file('full_star.svg')
        full_star_icon2 = gtk.Image()
        full_star_icon2.set_from_file('full_star.svg')
        full_star_icon3 = gtk.Image()
        full_star_icon3.set_from_file('full_star.svg')
        full_star_icon4 = gtk.Image()
        full_star_icon4.set_from_file('full_star.svg')
        full_star_icon5 = gtk.Image()
        full_star_icon5.set_from_file('full_star.svg')
        
        grayed_star_icon1 = gtk.Image()
        grayed_star_icon1.set_from_file('grayed_star.svg')
        grayed_star_icon2 = gtk.Image()
        grayed_star_icon2.set_from_file('grayed_star.svg')
        grayed_star_icon3 = gtk.Image()
        grayed_star_icon3.set_from_file('grayed_star.svg')
        grayed_star_icon4 = gtk.Image()
        grayed_star_icon4.set_from_file('grayed_star.svg')
        
        half_star_icon1= gtk.Image()
        half_star_icon1.set_from_file('half_star.svg')
        
        tuto_title_label1 = gtk.Label('Titre 1')
        tuto_title_label2 = gtk.Label('Titre 2')
        
        tuto_descrip_label1 = gtk.Label('Description 1 : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.')
        tuto_descrip_label1.set_line_wrap(True)
        tuto_descrip_label1.set_width_chars(50)
        tuto_descrip_label2 = gtk.Label('Description 2 : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.')
        tuto_descrip_label2.set_line_wrap(True)
        tuto_descrip_label2.set_width_chars(50)
        
        download_button1 = gtk.Button('Download')
        download_button2 = gtk.Button('Download')
        details_button1 = gtk.Button('Details')
        details_button2 = gtk.Button('Details')
        
        show_resuls_label = gtk.Label('Showing results 1-29 of 109')
        # TODO : Probably must be something else than a label, or find a way to listen to click event on label ...
        next_results_label = gtk.Label('< 1 2 3 4 >')
        
        tutorial_title_bar1 = gtk.HBox (False, 0)
        tutorial_title_bar1.pack_start(tuto_icon1)
        tutorial_title_bar1.pack_start(tuto_title_label1)
        tutorial_title_bar1.pack_start(full_star_icon1)
        tutorial_title_bar1.pack_start(full_star_icon2)
        tutorial_title_bar1.pack_start(full_star_icon3)
        tutorial_title_bar1.pack_start(grayed_star_icon1)
        tutorial_title_bar1.pack_start(grayed_star_icon2)
        
        tutorial_button_bar1 = gtk.HBox(True, 25)
        tutorial_button_bar1.pack_start(download_button1)
        tutorial_button_bar1.pack_start(details_button1)
        
        tutorial1 = gtk.VBox (False, 5)
        tutorial1.pack_start(tutorial_title_bar1)
        tutorial1.pack_start(tuto_descrip_label1)
        tutorial1.pack_start(tutorial_button_bar1)
        
        tutorial_title_bar2 = gtk.HBox (False, 5)
        tutorial_title_bar2.pack_start(tuto_icon2)
        tutorial_title_bar2.pack_start(tuto_title_label2)
        tutorial_title_bar2.pack_start(full_star_icon4)
        tutorial_title_bar2.pack_start(full_star_icon5)
        tutorial_title_bar2.pack_start(half_star_icon1)
        tutorial_title_bar2.pack_start(grayed_star_icon3)
        tutorial_title_bar2.pack_start(grayed_star_icon4)
        
        tutorial_button_bar2 = gtk.HBox(True, 55)
        tutorial_button_bar2.pack_start(download_button2)
        tutorial_button_bar2.pack_start(details_button2)
        
        tutorial2 = gtk.VBox (False, 5)
        tutorial2.pack_start(tutorial_title_bar2)
        tutorial2.pack_start(tuto_descrip_label2)
        tutorial2.pack_start(tutorial_button_bar2)
        
        self.tutorial_store_results = gtk.VBox(False, 10)
        self.tutorial_store_results.pack_start(tutorial1, True, True, 10)
        self.tutorial_store_results.pack_start(tutorial2, True, True, 10)
        self.tutorial_store_results.pack_start(show_resuls_label)
        self.tutorial_store_results.pack_start(next_results_label)
        
        tuto_icon1.show()
        tuto_icon2.show()
        full_star_icon1.show()
        full_star_icon2.show()
        full_star_icon3.show()
        full_star_icon4.show()
        full_star_icon5.show()
        grayed_star_icon1.show()
        grayed_star_icon2.show()
        grayed_star_icon3.show()
        grayed_star_icon4.show()
        half_star_icon1.show()
        tuto_title_label1.show()
        tuto_title_label2.show()
        tuto_descrip_label1.show()
        tuto_descrip_label2.show()
        download_button1.show()
        download_button2.show()
        details_button1.show()
        details_button2.show()
        show_resuls_label.show()
        next_results_label.show()
        tutorial_title_bar1.show()
        tutorial_title_bar2.show()
        tutorial_button_bar1.show()
        tutorial_button_bar2.show()
        tutorial1.show()
        tutorial2.show()
        self.tutorial_store_results.show()