[thorstenp] comment useless code

This commit is contained in:
Yann Leboulanger 2008-12-02 14:05:43 +00:00
parent 11deb3b933
commit 36afb4e558
4 changed files with 48 additions and 53 deletions

View File

@ -193,8 +193,6 @@ if gajim.HAVE_GPG:
# make it unicode instance # make it unicode instance
keys[sline[4][8:]] = helpers.decode_string(name) keys[sline[4][8:]] = helpers.decode_string(name)
return keys return keys
try: proc.wait()
except IOError: pass
def get_secret_keys(self): def get_secret_keys(self):
return self.get_keys(True) return self.get_keys(True)

View File

@ -107,11 +107,10 @@ class ProxyResolver:
self.state = S_RESOLVED self.state = S_RESOLVED
#FIXME: re-enable proxy testing #FIXME: re-enable proxy testing
self.state = S_FINISHED self.state = S_FINISHED
return #self.receiver_tester = ReceiverTester(self.host, self.port, self.jid,
self.receiver_tester = ReceiverTester(self.host, self.port, self.jid, # self.sid, self.sender_jid, self._on_receiver_success,
self.sid, self.sender_jid, self._on_receiver_success, # self._on_connect_failure)
self._on_connect_failure) #self.receiver_tester.connect()
self.receiver_tester.connect()
def _on_receiver_success(self): def _on_receiver_success(self):
self.host_tester = HostTester(self.host, self.port, self.jid, self.host_tester = HostTester(self.host, self.port, self.jid,

View File

@ -328,7 +328,6 @@ class SignalObject(dbus.service.Object):
(optional) 'account' ''' (optional) 'account' '''
if not jid: if not jid:
raise MissingArgument raise MissingArgument
return DBUS_BOOLEAN(False)
jid = self._get_real_jid(jid, account) jid = self._get_real_jid(jid, account)
try: try:
jid = helpers.parse_jid(jid) jid = helpers.parse_jid(jid)
@ -409,7 +408,6 @@ class SignalObject(dbus.service.Object):
jid = unicode(jid) jid = unicode(jid)
if not jid: if not jid:
raise MissingArgument raise MissingArgument
return DBUS_DICT_SV()
jid = self._get_real_jid(jid) jid = self._get_real_jid(jid)
cached_vcard = gajim.connections.values()[0].get_cached_vcard(jid) cached_vcard = gajim.connections.values()[0].get_cached_vcard(jid)

View File

@ -6059,52 +6059,52 @@ class RosterWindow:
return True return True
def setup_for_osx(self): def setup_for_osx(self):
# This is broken
return
'''Massage the GTK menu so it will match up to the OS/X nib style menu '''Massage the GTK menu so it will match up to the OS/X nib style menu
when passed to sync-menu and merged''' when passed to sync-menu and merged'''
main_menu = self.xml.get_widget('menubar') pass
app_item = gtk.MenuItem('Gajim') # This is broken
main_menu.insert(app_item, 0) # main_menu = self.xml.get_widget('menubar')
win_item = gtk.MenuItem('Window') # app_item = gtk.MenuItem('Gajim')
main_menu.insert(win_item, 4) # main_menu.insert(app_item, 0)
actions_menu = self.xml.get_widget('actions_menu_menu') # win_item = gtk.MenuItem('Window')
quit_item = self.xml.get_widget('quit_menuitem') # main_menu.insert(win_item, 4)
actions_menu.remove(quit_item) # actions_menu = self.xml.get_widget('actions_menu_menu')
actions_menu.remove(self.xml.get_widget('separator1')) # quit_item = self.xml.get_widget('quit_menuitem')
edit_menu = self.xml.get_widget('edit_menu_menu') # actions_menu.remove(quit_item)
#edit_menu.remove(self.xml.get_widget('preferences_menuitem')) # actions_menu.remove(self.xml.get_widget('separator1'))
edit_menu.remove(self.xml.get_widget('separator2')) # edit_menu = self.xml.get_widget('edit_menu_menu')
help_menu = self.xml.get_widget('help_menu_menu') # #edit_menu.remove(self.xml.get_widget('preferences_menuitem'))
about_item = self.xml.get_widget('about_menuitem') # edit_menu.remove(self.xml.get_widget('separator2'))
help_menu.remove(about_item) # help_menu = self.xml.get_widget('help_menu_menu')
# Build up App menu # about_item = self.xml.get_widget('about_menuitem')
app_menu = gtk.Menu() # help_menu.remove(about_item)
app_item.set_submenu(app_menu) # # Build up App menu
app_menu.append(about_item) # app_menu = gtk.Menu()
app_menu.append(gtk.MenuItem('__SKIP__')) # app_item.set_submenu(app_menu)
prefs_item = gtk.MenuItem('Preferences...') # app_menu.append(about_item)
prefs_item.connect('activate', self.on_preferences_menuitem_activate) # app_menu.append(gtk.MenuItem('__SKIP__'))
accels = gtk.AccelGroup() # prefs_item = gtk.MenuItem('Preferences...')
self.xml.get_widget('roster_window').add_accel_group(accels) # prefs_item.connect('activate', self.on_preferences_menuitem_activate)
prefs_item.add_accelerator('activate', accels, ord(','), # accels = gtk.AccelGroup()
gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) # self.xml.get_widget('roster_window').add_accel_group(accels)
app_menu.append(prefs_item) # prefs_item.add_accelerator('activate', accels, ord(','),
app_menu.append(gtk.MenuItem('__SKIP__')) # gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE)
app_menu.append(gtk.MenuItem('__SKIP__')) # app_menu.append(prefs_item)
app_menu.append(gtk.MenuItem('__SKIP__')) # app_menu.append(gtk.MenuItem('__SKIP__'))
app_menu.append(gtk.MenuItem('__SKIP__')) # app_menu.append(gtk.MenuItem('__SKIP__'))
app_menu.append(gtk.MenuItem('__SKIP__')) # app_menu.append(gtk.MenuItem('__SKIP__'))
app_menu.append(gtk.MenuItem('__SKIP__')) # app_menu.append(gtk.MenuItem('__SKIP__'))
app_menu.append(gtk.MenuItem('__SKIP__')) # app_menu.append(gtk.MenuItem('__SKIP__'))
app_menu.append(quit_item) # app_menu.append(gtk.MenuItem('__SKIP__'))
app_menu.show_all() # app_menu.append(gtk.MenuItem('__SKIP__'))
# Do the merge baby! # app_menu.append(quit_item)
syncmenu.takeover_menu(main_menu) # app_menu.show_all()
self.make_menu(force=True) # # Do the merge baby!
# Hide the GTK menubar itself and let the OS/X menubar do its thing # syncmenu.takeover_menu(main_menu)
#self.xml.get_widget('menubar').hide() # self.make_menu(force=True)
return # # Hide the GTK menubar itself and let the OS/X menubar do its thing
# #self.xml.get_widget('menubar').hide()
# return
################################################################################ ################################################################################
### ###