...
 
Commits (2)
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="splash_window">
<property name="modal">True</property>
<property name="window_position">center</property>
<property name="type_hint">splashscreen</property>
<property name="skip_taskbar_hint">True</property>
<property name="skip_pager_hint">True</property>
<property name="decorated">False</property>
<property name="deletable">False</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkImage" id="image">
<property name="visible">True</property>
<property name="icon-size">6</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="progressbar">
<property name="visible">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
......@@ -5011,3 +5011,24 @@ class VoIPCallReceivedDialog(object):
session.reject_content(content)
dialog.destroy()
class SplashScreen:
def __init__(self):
xml = gtkgui_helpers.get_gtk_builder('splash_screen.ui')
self.window = xml.get_object('splash_window')
pixbuf = gtkgui_helpers.get_icon_pixmap('gajim-about', 128)
xml.get_object('image').set_from_pixbuf(pixbuf)
self.pb = xml.get_object('progressbar')
self.pb.set_text('Loading roster ...')
self.nb = 0
self.nb_max = 1
self.window.show_all()
self.window.window.process_updates(True)
def set_nb_account(self, nb):
self.nb_max = nb
def inc_progressbar(self):
self.nb += 1
self.pb.set_fraction(float(self.nb) / self.nb_max)
self.window.window.process_updates(True)
\ No newline at end of file
......@@ -3245,12 +3245,16 @@ class Interface:
if gajim.config.get('trayicon') != 'never':
self.show_systray()
splash = dialogs.SplashScreen()
splash.set_nb_account(len(gajim.connections))
self.roster = roster_window.RosterWindow()
self.roster._before_fill()
for account in gajim.connections:
gajim.connections[account].load_roster_from_db()
splash.inc_progressbar()
self.roster._after_fill()
splash.window.destroy()
# get instances for windows/dialogs that will show_all()/hide()
self.instances['file_transfers'] = dialogs.FileTransfersWindow()
......