1 | import gi |
---|
2 | gi.require_version('Gtk', '3.0') |
---|
3 | |
---|
4 | from gi.repository import Gtk, Pango, GdkPixbuf, Gdk, Gio |
---|
5 | import Screenshot |
---|
6 | import ImageManager |
---|
7 | |
---|
8 | import Core |
---|
9 | |
---|
10 | import signal |
---|
11 | signal.signal(signal.SIGINT, signal.SIG_DFL) |
---|
12 | |
---|
13 | |
---|
14 | import gettext |
---|
15 | gettext.textdomain('lliurex-store') |
---|
16 | _ = gettext.gettext |
---|
17 | |
---|
18 | |
---|
19 | class LoadingBox(Gtk.VBox): |
---|
20 | |
---|
21 | def __init__(self): |
---|
22 | |
---|
23 | Gtk.VBox.__init__(self) |
---|
24 | |
---|
25 | self.core=Core.Core.get_core() |
---|
26 | ui_path=self.core.ui_path |
---|
27 | |
---|
28 | builder=Gtk.Builder() |
---|
29 | builder.set_translation_domain('lliurex-store') |
---|
30 | builder.add_from_file(ui_path) |
---|
31 | |
---|
32 | |
---|
33 | self.loading_box=builder.get_object("loading_box") |
---|
34 | self.l1_box=builder.get_object("l1_box") |
---|
35 | self.l2_box=builder.get_object("l2_box") |
---|
36 | self.i_box=builder.get_object("i_box") |
---|
37 | self.u_box=builder.get_object("u_box") |
---|
38 | self.r_box=builder.get_object("r_box") |
---|
39 | self.e_box=builder.get_object("e_box") |
---|
40 | self.x_box=builder.get_object("x_box") |
---|
41 | |
---|
42 | self.loading_label=builder.get_object("loading_label") |
---|
43 | self.add(self.loading_box) |
---|
44 | |
---|
45 | self.set_css_info() |
---|
46 | self.show_all() |
---|
47 | |
---|
48 | #def init |
---|
49 | |
---|
50 | |
---|
51 | def set_css_info(self): |
---|
52 | |
---|
53 | self.style_provider=Gtk.CssProvider() |
---|
54 | f=Gio.File.new_for_path(self.core.rsrc_dir+"lliurex-store.css") |
---|
55 | self.style_provider.load_from_file(f) |
---|
56 | Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),self.style_provider,Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) |
---|
57 | |
---|
58 | self.l1_box.set_name("L1_BOX") |
---|
59 | self.l2_box.set_name("L2_BOX") |
---|
60 | self.i_box.set_name("I_BOX") |
---|
61 | self.u_box.set_name("U_BOX") |
---|
62 | self.r_box.set_name("R_BOX") |
---|
63 | self.e_box.set_name("E_BOX") |
---|
64 | self.x_box.set_name("X_BOX") |
---|
65 | |
---|
66 | self.loading_label.set_name("SHORT_DESCRIPTION") |
---|
67 | |
---|
68 | #def set_css_info |
---|
69 | |
---|
70 | |
---|
71 | #class LoadingBox |
---|