fix sth minor (delmonico), various cleanup

This commit is contained in:
Nikos Kouremenos 2005-06-10 16:45:54 +00:00
parent e774467002
commit 9847eca2f0
4 changed files with 39 additions and 37 deletions

View File

@ -2333,6 +2333,7 @@ class ManageBookmarksWindow:
self.view = self.xml.get_widget('bookmarks_treeview')
self.view.set_model(self.treestore)
self.view.expand_all()
renderer = gtk.CellRendererText()
column = gtk.TreeViewColumn('Bookmarks', renderer, text=1)
@ -2386,6 +2387,8 @@ class ManageBookmarksWindow:
account = model.get_value(add_to, 1)
self.treestore.append(add_to, [account,_('New Room'), '', '', '', ''])
self.view.expand_row(model.get_path(add_to), True)
def on_remove_bookmark_button_clicked(self, widget):
'''
@ -2480,6 +2483,8 @@ class ManageBookmarksWindow:
def on_title_entry_changed(self, widget):
(model, iter) = self.selection.get_selected()
if iter: #After removing a bookmark, we got nothing selected
if model.iter_parent(iter):
#Don't clear the title field for account nodes
model.set_value(iter, 1, self.title_entry.get_text())
def on_nick_entry_changed(self, widget):

View File

@ -170,7 +170,7 @@ class Interface:
return
if os.name == 'nt':
try:
winsound.PlaySound(path_to_soundfile, \
winsound.PlaySound(path_to_soundfile,
winsound.SND_FILENAME|winsound.SND_ASYNC)
except:
pass

View File

@ -657,10 +657,9 @@ class Groupchat_window(chat.Chat):
def on_list_treeview_button_press_event(self, widget, event):
"""popup user's group's or agent menu"""
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 3: # right click
try:
path, column, x, y = widget.get_path_at_pos(int(event.x), \
path, column, x, y = widget.get_path_at_pos(int(event.x),
int(event.y))
except TypeError:
widget.get_selection().unselect_all()
@ -674,7 +673,7 @@ class Groupchat_window(chat.Chat):
return True
if event.button == 1: # left click
try:
path, column, x, y = widget.get_path_at_pos(int(event.x), \
path, column, x, y = widget.get_path_at_pos(int(event.x),
int(event.y))
except TypeError:
widget.get_selection().unselect_all()
@ -690,8 +689,6 @@ class Groupchat_window(chat.Chat):
else:
widget.expand_row(path, False)
#FIXME: should popup chat window for GC contact DOUBLE clicked
# also chat [in context menu]
return False
def on_list_treeview_key_press_event(self, widget, event):

View File

@ -279,7 +279,7 @@ class Tabbed_chat_window(chat.Chat):
def on_message_textview_key_press_event(self, widget, event):
"""When a key is pressed:
if enter is pressed without the shit key, message (if not empty) is sent
if enter is pressed without the shift key, message (if not empty) is sent
and printed in the conversation"""
jid = self.get_active_jid()
conversation_textview = self.xmls[jid].get_widget('conversation_textview')