Commit 56d29dbf authored by sb's avatar sb

remove groupchat submenu for Local account,

remove button in acct window disables acct
parent 709896b5
......@@ -12,7 +12,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1251">
<widget class="GtkImage" id="image1256">
<property name="visible">True</property>
<property name="stock">gtk-network</property>
<property name="icon_size">1</property>
......@@ -25,26 +25,6 @@
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="join_group_chat_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Group Chat</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1252">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="new_message_menuitem">
<property name="visible">True</property>
......@@ -52,7 +32,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1253">
<widget class="GtkImage" id="image1257">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
......@@ -68,11 +48,11 @@
<child>
<widget class="GtkImageMenuItem" id="zeroconf_properties_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Properties...</property>
<property name="label" translatable="yes">_Modify Account...</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1254">
<widget class="GtkImage" id="image1258">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
......
......@@ -1803,6 +1803,10 @@ class AccountsWindow:
dialogs.ErrorDialog(_('Unread events'),
_('Read all pending events before removing this account.'))
return
if account == gajim.ZEROCONF_ACC_NAME:
w = self.xml.get_widget('enable_zeroconf_checkbutton')
w.set_active(False)
else:
if gajim.interface.instances[account].has_key('remove_account'):
gajim.interface.instances[account]['remove_account'].window.present()
else:
......
......@@ -1849,7 +1849,7 @@ class RosterWindow:
account_context_menu = xml.get_widget('zeroconf_context_menu')
status_menuitem = xml.get_widget('status_menuitem')
join_group_chat_menuitem =xml.get_widget('join_group_chat_menuitem')
#join_group_chat_menuitem =xml.get_widget('join_group_chat_menuitem')
new_message_menuitem = xml.get_widget('new_message_menuitem')
zeroconf_properties_menuitem = xml.get_widget('zeroconf_properties_menuitem')
sub_menu = gtk.Menu()
......@@ -1884,16 +1884,17 @@ class RosterWindow:
item.connect('activate', self.change_status, account, 'offline')
zeroconf_properties_menuitem.connect('activate', self.on_zeroconf_properties, account)
gc_sub_menu = gtk.Menu() # gc is always a submenu
join_group_chat_menuitem.set_submenu(gc_sub_menu)
self.add_bookmarks_list(gc_sub_menu, account)
#gc_sub_menu = gtk.Menu() # gc is always a submenu
#join_group_chat_menuitem.set_submenu(gc_sub_menu)
#self.add_bookmarks_list(gc_sub_menu, account)
new_message_menuitem.connect('activate',
self.on_new_message_menuitem_activate, account)
# make some items insensitive if account is offline
if gajim.connections[account].connected < 2:
for widget in [join_group_chat_menuitem, new_message_menuitem]:
widget.set_sensitive(False)
# for widget in [join_group_chat_menuitem, new_message_menuitem]:
# widget.set_sensitive(False)
new_message_menuitem.set_sensitive(False)
return account_context_menu
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment