Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmmu <jeff@ummu.org>2009-06-29 02:27:08 +0400
committerUmmu <jeff@ummu.org>2009-06-29 02:27:08 +0400
commit0aeb7abf5f32ea760ca4924786b1c7618b2062ce (patch)
treea13be5a2ecf72f10052597d700605ea89382bcc9
parent61f45047f46376b2b4989a51388ae36c1a3adfc9 (diff)
Fixed problem with multiple whiteboards and changed glade position numbers to fit in new button
-rw-r--r--data/glade/message_window.glade16
-rw-r--r--src/chat_control.py18
2 files changed, 18 insertions, 16 deletions
diff --git a/data/glade/message_window.glade b/data/glade/message_window.glade
index 7bf35b666..67ae7151f 100644
--- a/data/glade/message_window.glade
+++ b/data/glade/message_window.glade
@@ -353,7 +353,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -377,7 +377,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">5</property>
+ <property name="position">6</property>
</packing>
</child>
<child>
@@ -401,7 +401,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -425,7 +425,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -436,7 +436,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
<child>
@@ -460,7 +460,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">9</property>
+ <property name="position">10</property>
</packing>
</child>
<child>
@@ -472,7 +472,7 @@
</child>
</widget>
<packing>
- <property name="position">10</property>
+ <property name="position">11</property>
</packing>
</child>
<child>
@@ -519,7 +519,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">11</property>
+ <property name="position">12</property>
</packing>
</child>
</widget>
diff --git a/src/chat_control.py b/src/chat_control.py
index ed338ba5e..3ca204439 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -294,8 +294,9 @@ class ChatControlBase(MessageControl):
# Hook up whiteboard button
widget = self.xml.get_widget('start_whiteboard_button')
- id_ = widget.connect('clicked', self._on_whiteboard_button_clicked)
- self.handlers[id_] = widget
+ if widget is not None:
+ id_ = widget.connect('clicked', self._on_whiteboard_button_clicked)
+ self.handlers[id_] = widget
def set_speller(self):
try:
@@ -2748,12 +2749,13 @@ class ChatControl(ChatControlBase):
self.print_conversation(')', 'status', simple=True)
def _on_whiteboard_button_clicked(self, widget):
- whiteboard = Whiteboard(gajim.connections[self.account])
hbox = self.xml.get_widget('chat_child_hbox')
- try:
- hbox.pack_start(whiteboard)
- whiteboard.show()
- except:
- pass # TODO: Fix problem with groupchat?
+ if len(hbox.get_children()) == 1:
+ whiteboard = Whiteboard(gajim.connections[self.account])
+ try:
+ hbox.pack_start(whiteboard)
+ whiteboard.show()
+ except:
+ pass # TODO: Fix problem with groupchat?
# vim: se ts=3: