30
30
up = get_icon("blueman-up-inactive", 15)
31
31
down = get_icon("blueman-down-inactive", 15)
32
self.im_upload = gtk.Image()
32
self.im_upload = Gtk.Image()
33
33
self.im_upload.set_tooltip_text(_("Data activity indication"))
34
34
self.im_upload.set_from_pixbuf(up)
35
self.im_download = gtk.Image()
35
self.im_download = Gtk.Image()
36
36
self.im_download.set_tooltip_text(_("Data activity indication"))
37
37
self.im_download.set_from_pixbuf(down)
38
38
self.im_upload.set_alignment(1, 0.5)
39
39
self.im_download.set_alignment(1, 0.5)
41
self.down_rate = gtk.Label()
41
self.down_rate = Gtk.Label()
42
42
self.down_rate.show()
43
43
self.down_rate.set_alignment(1, 0.5)
44
44
self.down_rate.set_tooltip_text(_("Total data received and rate of transmission"))
46
self.up_rate = gtk.Label()
46
self.up_rate = Gtk.Label()
47
47
self.up_rate.show()
48
48
self.up_rate.set_alignment(1, 0.5)
49
49
self.up_rate.set_tooltip_text(_("Total data sent and rate of transmission"))
51
self.uparrow = gtk.Image()
51
self.uparrow = Gtk.Image()
52
52
self.uparrow.set_tooltip_text(_("Total data sent and rate of transmission"))
53
self.uparrow.set_from_stock(gtk.STOCK_GO_UP, 1)
53
self.uparrow.set_from_stock(Gtk.STOCK_GO_UP, 1)
54
54
self.uparrow.set_alignment(1, 0.5)
56
self.downarrow = gtk.Image()
56
self.downarrow = Gtk.Image()
57
57
self.downarrow.set_tooltip_text(_("Total data received and rate of transmission"))
58
self.downarrow.set_from_stock(gtk.STOCK_GO_DOWN, 1)
58
self.downarrow.set_from_stock(Gtk.STOCK_GO_DOWN, 1)
60
60
self.hbox = hbox = blueman.Builder.get_object("statusbar2")
62
hbox.pack_start(self.uparrow, True, False)
63
hbox.pack_start(self.up_rate, False, False)
65
hbox.pack_start(self.downarrow, False, False)
66
hbox.pack_start(self.down_rate, False, False)
68
hbox.pack_start(gtk.VSeparator(), False, False)
70
hbox.pack_start(self.im_upload, False, False)
71
hbox.pack_start(self.im_download, False, False)
62
hbox.pack_start(self.uparrow, True, False, 0)
63
hbox.pack_start(self.up_rate, False, False, 0)
65
hbox.pack_start(self.downarrow, False, False, 0)
66
hbox.pack_start(self.down_rate, False, False, 0)
68
hbox.pack_start(Gtk.VSeparator(), False, False, 0)
70
hbox.pack_start(self.im_upload, False, False, 0)
71
hbox.pack_start(self.im_download, False, False, 0)
73
73
self.on_adapter_changed(blueman.List, blueman.List.GetAdapterPath())
139
139
def start_update(self):
141
self.timer = gobject.timeout_add(1000, self._update)
141
self.timer = GObject.timeout_add(1000, self._update)
143
143
def stop_update(self):
145
gobject.source_remove(self.timer)
145
GObject.source_remove(self.timer)
147
147
def set_data(self, uploaded, u_name, downloaded, d_name, u_speed, us_name, d_speed, ds_name):
148
148
self.down_rate.set_markup(