From 6b3a035158ed6a7a30ccd1b751d3cdb03442857c Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Thu, 21 Oct 2004 19:42:46 +0000
Subject: [PATCH] 2 bugfixes

---
 plugins/gtkgui/config.py | 2 +-
 plugins/gtkgui/gtkgui.py | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py
index 65e230995a..c8e24e90ad 100644
--- a/plugins/gtkgui/config.py
+++ b/plugins/gtkgui/config.py
@@ -764,7 +764,7 @@ class agentRegistration_Window:
 		for name in self.entries.keys():
 			self.infos[name] = self.entries[name].get_text()
 		user1 = gtkgui.user(self.agent, self.agent, ['Agents'], 'offline', 'offline', \
-			'from', '', 0)
+			'from', '', 0, '')
 		self.plugin.roster.contacts[self.account][self.agent] = [user1]
 		self.plugin.roster.add_user_to_roster(self.agent, self.account)
 		self.plugin.send('REG_AGENT', self.account, self.agent)
diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py
index 75585c0801..a4a362c430 100644
--- a/plugins/gtkgui/gtkgui.py
+++ b/plugins/gtkgui/gtkgui.py
@@ -2424,11 +2424,13 @@ class plugin:
 			iconstyle = 'sun'
 		path = 'plugins/gtkgui/icons/' + iconstyle + '/'
 		files = [path + 'online.gif', path + 'online.png', path + 'online.xpm']
+		pix = None
 		for file in files:
 			if os.path.exists(file):
 				pix = gtk.gdk.pixbuf_new_from_file(file)
 				break
-		gtk.window_set_default_icon(pix)
+		if pix:
+			gtk.window_set_default_icon(pix)
 		self.roster = roster_Window(self)
 		gtk.timeout_add(100, self.read_queue)
 		gtk.timeout_add(1000, self.read_sleepy)
-- 
GitLab