fixes for when disabling emoticons in prefs [gajim did not boot], add_remove_emoticons_window and class, better popups [needs more attention {me is on it}], no more emoticons tab, introducing version.py, hide os information included, and fixes allover.

This commit is contained in:
Nikos Kouremenos 2005-04-06 18:51:54 +00:00
parent 2640cac0f6
commit 1c7076cfb0
8 changed files with 923 additions and 747 deletions

View File

@ -28,13 +28,12 @@ import common.jabber
import socket
import select
import pickle
import version
from tempfile import *
from common import i18n
_ = i18n._
VERSION = '0.6.1'
log = logging.getLogger('core.core')
log.setLevel(logging.DEBUG)
@ -632,7 +631,7 @@ class GajimCore:
iq_obj.setType('result')
qp = iq_obj.getTag('query')
qp.insertTag('name').insertData('Gajim')
qp.insertTag('version').insertData(VERSION)
qp.insertTag('version').insertData(version.version)
qp.insertTag('os').insertData(get_os_info())
con.send(iq_obj)

View File

@ -47,6 +47,18 @@ class Preferences_window:
def on_preferences_window_show(self, widget):
self.notebook.set_current_page(0)
def on_checkbutton_toggled(self, widget, config_name, \
extra_function = None, change_sensitivity_widgets = None):
if widget.get_active():
self.plugin.config[config_name] = 1
if extra_function != None:
apply(extra_function)
else:
self.plugin.config[config_name] = 0
if change_sensitivity_widgets != None:
for w in change_sensitivity_widgets:
w.set_sensitive(widget.get_active())
def on_tray_icon_checkbutton_toggled(self, widget):
if widget.get_active():
self.plugin.config['trayicon'] = 1
@ -313,39 +325,17 @@ class Preferences_window:
self.update_text_tags()
def on_use_emoticons_checkbutton_toggled(self, widget):
self.on_checkbutton_toggled(widget, 'useemoticons',\
[self.xml.get_widget('button_new_emoticon'),\
self.xml.get_widget('button_remove_emoticon'),\
self.xml.get_widget('treeview_emoticons'),\
self.xml.get_widget('set_image_button'),\
self.xml.get_widget('emoticons_image')])
self.on_checkbutton_toggled(widget, 'useemoticons', None, \
self.xml.get_widget('add_remove_emoticons_button'))
def on_emoticons_treemodel_row_deleted(self, model, path):
iter = model.get_iter_first()
emots = []
while iter:
emots.append(model.get_value(iter, 0))
emots.append(model.get_value(iter, 1))
iter = model.iter_next(iter)
self.plugin.config['emoticons'] = '\t'.join(emots)
self.plugin.init_regexp()
def on_add_remove_emoticons_button_clicked(self, widget):
Add_remove_emoticons_window(self.plugin)
def on_emoticons_treemodel_row_changed(self, model, path, iter):
if model[path][1] != None and len(model[path][1]) != 0:
iter = model.get_iter_first()
emots = []
while iter:
emots.append(model.get_value(iter, 0))
emots.append(model.get_value(iter, 1))
iter = model.iter_next(iter)
self.plugin.config['emoticons'] = '\t'.join(emots)
self.plugin.init_regexp()
def on_auto_pop_up_checkbutton_toggled(self, widget):
def on_auto_popup_checkbutton_toggled(self, widget):
self.on_checkbutton_toggled(widget, 'autopopup', None,\
[self.auto_pp_away_checkbutton])
[self.auto_popup_away_checkbutton])
def on_auto_pop_up_away_checkbutton_toggled(self, widget):
def on_auto_popup_away_checkbutton_toggled(self, widget):
self.on_checkbutton_toggled(widget, 'autopopupaway')
def on_ignore_events_from_unknown_contacts_checkbutton_toggled(self, widget):
@ -355,11 +345,9 @@ class Preferences_window:
self.plugin.config['soundplayer'] = widget.get_text()
def on_prompt_online_status_message_checkbutton_toggled(self, widget):
"""On Prompt Online Status Message Checkbutton Toggled"""
self.on_checkbutton_toggled(widget, 'ask_online_status')
def on_prompt_offline_status_message_checkbutton_toggled(self, widget):
"""On Prompt Offline Status Message Checkbutton Toggled"""
self.on_checkbutton_toggled(widget, 'ask_offline_status')
def on_sounds_treemodel_row_changed(self, model, path, iter):
@ -454,6 +442,14 @@ class Preferences_window:
self.config_logger['lognotsep'] = 0
self.plugin.send('CONFIG', None, ('Logger', self.config_logger, 'GtkGui'))
def on_do_not_send_os_info_checkbutton_toggled(self, widget):
if widget.get_active():
#FIXME: when threads are removed, make sure this work
self.plugin.config['do_not_send_os_info'] = 1
else:
self.plugin.config['do_not_send_os_info'] = 0
def fill_msg_treeview(self):
i = 0
self.xml.get_widget('delete_msg_button').set_sensitive(False)
@ -502,138 +498,6 @@ class Preferences_window:
if event.keyval == gtk.keysyms.Delete:
self.on_delete_msg_button_clicked(widget)
def image_is_ok(self, image):
if not os.path.exists(image):
return 0
img = gtk.Image()
try:
img.set_from_file(image)
except:
return 0
if img.get_storage_type() == gtk.IMAGE_PIXBUF:
pix = img.get_pixbuf()
else:
return 0
if pix.get_width() > 24 or pix.get_height() > 24:
return 0
return 1
def load_emots(self):
emots = {}
split_line = self.plugin.config['emoticons'].split('\t')
for i in range(0, len(split_line)/2):
if not self.image_is_ok(split_line[2*i+1]):
continue
emots[split_line[2*i]] = split_line[2*i+1]
return emots
def fill_emot_treeview(self):
model = self.emot_tree.get_model()
model.clear()
emots = self.load_emots()
for i in emots:
file = emots[i]
iter = model.append((i, file, None))
if not os.path.exists(file):
continue
img = gtk.Image()
img.show()
if file.find('.gif') != -1:
pix = gtk.gdk.PixbufAnimation(file)
img.set_from_animation(pix)
else:
pix = gtk.gdk.pixbuf_new_from_file(file)
img.set_from_pixbuf(pix)
model.set(iter, 2, img)
def on_emot_cell_edited(self, cell, row, new_text):
model = self.emot_tree.get_model()
iter = model.get_iter_from_string(row)
model.set_value(iter, 0, new_text)
def on_set_image_button_clicked(self, widget, data=None):
(model, iter) = self.emot_tree.get_selection().get_selected()
if not iter:
return
file = model.get_value(iter, 1)
dialog = gtk.FileChooserDialog("Choose image",
None,
gtk.FILE_CHOOSER_ACTION_OPEN,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.RESPONSE_OK))
dialog.set_default_response(gtk.RESPONSE_OK)
filter = gtk.FileFilter()
filter.set_name("All files")
filter.add_pattern("*")
dialog.add_filter(filter)
filter = gtk.FileFilter()
filter.set_name("Images")
filter.add_mime_type("image/png")
filter.add_mime_type("image/jpeg")
filter.add_mime_type("image/gif")
filter.add_pattern("*.png")
filter.add_pattern("*.jpg")
filter.add_pattern("*.gif")
filter.add_pattern("*.tif")
filter.add_pattern("*.xpm")
dialog.add_filter(filter)
dialog.set_filter(filter)
file = os.path.join(os.getcwd(), file)
dialog.set_filename(file)
file = ''
ok = 0
while(ok == 0):
response = dialog.run()
if response == gtk.RESPONSE_OK:
file = dialog.get_filename()
if self.image_is_ok(file):
ok = 1
else:
ok = 1
dialog.destroy()
if file:
model.set_value(iter, 1, file)
img = gtk.Image()
img.show()
if file.find('.gif') != -1:
pix = gtk.gdk.PixbufAnimation(file)
img.set_from_animation(pix)
else:
pix = gtk.gdk.pixbuf_new_from_file(file)
img.set_from_pixbuf(pix)
model.set(iter, 2, img)
def on_button_new_emoticon_clicked(self, widget, data=None):
model = self.emot_tree.get_model()
iter = model.append()
model.set(iter, 0, 'smeiley', 1, '')
col = self.emot_tree.get_column(0)
self.emot_tree.set_cursor(model.get_path(iter), col, True)
def on_button_remove_emoticon_clicked(self, widget, data=None):
(model, iter) = self.emot_tree.get_selection().get_selected()
if not iter:
return
model.remove(iter)
def on_checkbutton_toggled(self, widget, config_name, \
extra_function = None, change_sensitivity_widgets = None):
if widget.get_active():
self.plugin.config[config_name] = 1
if extra_function != None:
apply(extra_function)
else:
self.plugin.config[config_name] = 0
if change_sensitivity_widgets != None:
for w in change_sensitivity_widgets:
w.set_sensitive(widget.get_active())
def on_treeview_emoticons_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Delete:
self.on_button_remove_emoticon_clicked(widget)
def sound_toggled_cb(self, cell, path):
model = self.sound_tree.get_model()
model[path][1] = not model[path][1]
@ -707,12 +571,10 @@ class Preferences_window:
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'preferences_window', APP)
self.window = self.xml.get_widget('preferences_window')
self.plugin = plugin
self.xml.get_widget('emoticons_image').set_from_file(\
'plugins/gtkgui/pixmaps/smile.png')
self.iconset_combobox = self.xml.get_widget('iconset_combobox')
self.auto_pp_checkbutton = self.xml.get_widget('auto_pop_up_checkbutton')
self.auto_pp_away_checkbutton = self.xml.get_widget \
('auto_pop_up_away_checkbutton')
self.auto_popup_checkbutton = self.xml.get_widget('auto_popup_checkbutton')
self.auto_popup_away_checkbutton = self.xml.get_widget \
('auto_popup_away_checkbutton')
self.auto_away_checkbutton = self.xml.get_widget('auto_away_checkbutton')
self.auto_away_time_spinbutton = self.xml.get_widget \
('auto_away_time_spinbutton')
@ -840,39 +702,16 @@ class Preferences_window:
#Use emoticons
st = self.plugin.config['useemoticons']
self.xml.get_widget('use_emoticons_checkbutton').set_active(st)
self.xml.get_widget('button_new_emoticon').set_sensitive(st)
self.xml.get_widget('button_remove_emoticon').set_sensitive(st)
self.xml.get_widget('treeview_emoticons').set_sensitive(st)
self.xml.get_widget('set_image_button').set_sensitive(st)
self.xml.get_widget('add_remove_emoticons_button').set_sensitive(st)
#emoticons
self.emot_tree = self.xml.get_widget('treeview_emoticons')
model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gtk.Image)
self.emot_tree.set_model(model)
col = gtk.TreeViewColumn(_('Name'))
self.emot_tree.append_column(col)
renderer = gtk.CellRendererText()
renderer.connect('edited', self.on_emot_cell_edited)
renderer.set_property('editable', True)
col.pack_start(renderer, True)
col.set_attributes(renderer, text=0)
col = gtk.TreeViewColumn(_('Image'))
self.emot_tree.append_column(col)
renderer = gtkgui.CellRendererImage()
col.pack_start(renderer, expand = False)
col.add_attribute(renderer, 'image', 2)
self.fill_emot_treeview()
#Autopopup
#autopopup
st = self.plugin.config['autopopup']
self.auto_pp_checkbutton.set_active(st)
self.auto_popup_checkbutton.set_active(st)
#Autopopupaway
#autopopupaway
st = self.plugin.config['autopopupaway']
self.auto_pp_away_checkbutton.set_active(st)
self.auto_pp_away_checkbutton.set_sensitive(self.plugin.config['autopopup'])
self.auto_popup_away_checkbutton.set_active(st)
self.auto_popup_away_checkbutton.set_sensitive(self.plugin.config['autopopup'])
#Ignore messages from unknown contacts
self.xml.get_widget('ignore_events_from_unknown_contacts_checkbutton').\
@ -982,10 +821,11 @@ class Preferences_window:
st = self.config_logger['lognotsep']
self.xml.get_widget('log_in_extern_checkbutton').set_active(st)
self.emot_tree.get_model().connect('row-changed', \
self.on_emoticons_treemodel_row_changed)
self.emot_tree.get_model().connect('row-deleted', \
self.on_emoticons_treemodel_row_deleted)
# don't send os info
st = self.plugin.config['do_not_send_os_info']
self.xml.get_widget('do_not_send_os_info_checkbutton').set_active(st)
self.xml.signal_autoconnect(self)
self.sound_tree.get_model().connect('row-changed', \
self.on_sounds_treemodel_row_changed)
self.msg_tree.get_model().connect('row-changed', \
@ -993,8 +833,6 @@ class Preferences_window:
self.msg_tree.get_model().connect('row-deleted', \
self.on_msg_treemodel_row_deleted)
#self.notebook.set_current_page(0)
self.xml.signal_autoconnect(self)
class Account_modification_window:
"""Class for account informations"""
@ -1006,6 +844,11 @@ class Account_modification_window:
"""When Close button is clicked"""
widget.get_toplevel().destroy()
def on_checkbutton_toggled(self, widget, widgets):
"""set or unset sensitivity of widgets when widget is toggled"""
for w in widgets:
w.set_sensitive(widget.get_active())
def init_account(self, infos):
"""Initialize window with defaults values"""
if infos.has_key('accname'):
@ -1316,11 +1159,6 @@ class Account_modification_window:
gpg_save_password_checkbutton.set_active(False)
self.xml.get_widget('gpg_password_entry').set_text('')
def on_checkbutton_toggled(self, widget, widgets):
"""set or unset sensitivity of widgets when widget is toggled"""
for w in widgets:
w.set_sensitive(widget.get_active())
def on_checkbutton_toggled_and_clear(self, widget, widgets):
self.on_checkbutton_toggled(widget, widgets)
for w in widgets:
@ -1519,6 +1357,189 @@ class Service_registration_window:
self.window.show_all()
class Add_remove_emoticons_window:
def __init__(self, plugin):
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'add_remove_emoticons_window', APP)
self.window = self.xml.get_widget('add_remove_emoticons_window')
self.plugin = plugin
#emoticons
self.emot_tree = self.xml.get_widget('emoticons_treeview')
model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gtk.Image)
self.emot_tree.set_model(model)
col = gtk.TreeViewColumn(_('Name'))
self.emot_tree.append_column(col)
renderer = gtk.CellRendererText()
renderer.connect('edited', self.on_emot_cell_edited)
renderer.set_property('editable', True)
col.pack_start(renderer, True)
col.set_attributes(renderer, text=0)
col = gtk.TreeViewColumn(_('Image'))
self.emot_tree.append_column(col)
renderer = gtkgui.CellRendererImage()
col.pack_start(renderer, expand = False)
col.add_attribute(renderer, 'image', 2)
self.fill_emot_treeview()
self.emot_tree.get_model().connect('row-changed', \
self.on_emoticons_treemodel_row_changed)
self.emot_tree.get_model().connect('row-deleted', \
self.on_emoticons_treemodel_row_deleted)
self.plugin = plugin
self.xml.signal_autoconnect(self)
self.window.show_all()
def on_add_remove_emoticons_window_delete_event(self, widget, event):
self.window.hide()
return True # do NOT destroy the window
def on_close_button_clicked(self, widget):
self.window.hide()
def on_emoticons_treemodel_row_deleted(self, model, path):
iter = model.get_iter_first()
emots = []
while iter:
emots.append(model.get_value(iter, 0))
emots.append(model.get_value(iter, 1))
iter = model.iter_next(iter)
self.plugin.config['emoticons'] = '\t'.join(emots)
self.plugin.init_regexp()
def on_emoticons_treemodel_row_changed(self, model, path, iter):
if model[path][1] != None and len(model[path][1]) != 0:
iter = model.get_iter_first()
emots = []
while iter:
emots.append(model.get_value(iter, 0))
emots.append(model.get_value(iter, 1))
iter = model.iter_next(iter)
self.plugin.config['emoticons'] = '\t'.join(emots)
self.plugin.init_regexp()
def image_is_ok(self, image):
if not os.path.exists(image):
return 0
img = gtk.Image()
try:
img.set_from_file(image)
except:
return 0
if img.get_storage_type() == gtk.IMAGE_PIXBUF:
pix = img.get_pixbuf()
else:
return 0
if pix.get_width() > 24 or pix.get_height() > 24:
return 0
return 1
def load_emots(self):
emots = {}
split_line = self.plugin.config['emoticons'].split('\t')
for i in range(0, len(split_line)/2):
if not self.image_is_ok(split_line[2*i+1]):
continue
emots[split_line[2*i]] = split_line[2*i+1]
return emots
def fill_emot_treeview(self):
model = self.emot_tree.get_model()
model.clear()
emots = self.load_emots()
for i in emots:
file = emots[i]
iter = model.append((i, file, None))
if not os.path.exists(file):
continue
img = gtk.Image()
img.show()
if file.find('.gif') != -1:
pix = gtk.gdk.PixbufAnimation(file)
img.set_from_animation(pix)
else:
pix = gtk.gdk.pixbuf_new_from_file(file)
img.set_from_pixbuf(pix)
model.set(iter, 2, img)
def on_emot_cell_edited(self, cell, row, new_text):
model = self.emot_tree.get_model()
iter = model.get_iter_from_string(row)
model.set_value(iter, 0, new_text)
def on_set_image_button_clicked(self, widget, data=None):
(model, iter) = self.emot_tree.get_selection().get_selected()
if not iter:
return
file = model.get_value(iter, 1)
dialog = gtk.FileChooserDialog("Choose image",
None,
gtk.FILE_CHOOSER_ACTION_OPEN,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.RESPONSE_OK))
dialog.set_default_response(gtk.RESPONSE_OK)
filter = gtk.FileFilter()
filter.set_name("All files")
filter.add_pattern("*")
dialog.add_filter(filter)
filter = gtk.FileFilter()
filter.set_name("Images")
filter.add_mime_type("image/png")
filter.add_mime_type("image/jpeg")
filter.add_mime_type("image/gif")
filter.add_pattern("*.png")
filter.add_pattern("*.jpg")
filter.add_pattern("*.gif")
filter.add_pattern("*.tif")
filter.add_pattern("*.xpm")
dialog.add_filter(filter)
dialog.set_filter(filter)
file = os.path.join(os.getcwd(), file)
dialog.set_filename(file)
file = ''
ok = 0
while(ok == 0):
response = dialog.run()
if response == gtk.RESPONSE_OK:
file = dialog.get_filename()
if self.image_is_ok(file):
ok = 1
else:
ok = 1
dialog.destroy()
if file:
model.set_value(iter, 1, file)
img = gtk.Image()
img.show()
if file.find('.gif') != -1:
pix = gtk.gdk.PixbufAnimation(file)
img.set_from_animation(pix)
else:
pix = gtk.gdk.pixbuf_new_from_file(file)
img.set_from_pixbuf(pix)
model.set(iter, 2, img)
def on_button_new_emoticon_clicked(self, widget, data=None):
model = self.emot_tree.get_model()
iter = model.append()
model.set(iter, 0, 'emoticon', 1, '')
col = self.emot_tree.get_column(0)
self.emot_tree.set_cursor(model.get_path(iter), col, True)
def on_button_remove_emoticon_clicked(self, widget, data=None):
(model, iter) = self.emot_tree.get_selection().get_selected()
if not iter:
return
model.remove(iter)
def on_emoticons_treeview_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Delete:
self.on_button_remove_emoticon_clicked(widget)
class Service_discovery_window:
"""Class for Service Discovery Window:
to know the services on the selected server"""

View File

@ -27,6 +27,7 @@ gtk.glade.bindtextdomain (APP, i18n.DIR)
gtk.glade.textdomain (APP)
import gtkgui
import version
GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade'
@ -555,7 +556,7 @@ class About_dialog:
dlg = gtk.AboutDialog()
dlg.set_name('Gajim')
dlg.set_version('0.6.1')
dlg.set_version(version.version)
s = u'Copyright \xa9 2003-2005 Gajim Team'
dlg.set_copyright(s)
text = open('COPYING').read()
@ -778,21 +779,32 @@ class Change_password_dialog:
return message
class Popup_window:
def __init__(self, plugin=None, account=None):
def __init__(self, plugin, event_type, event_desc):
self.plugin = plugin
self.account = account
xml = gtk.glade.XML(GTKGUI_GLADE, 'popup_window', APP)
self.window = xml.get_widget('popup_window')
close_button = xml.get_widget('close_button')
event_label = xml.get_widget('event_label')
event_type_label = xml.get_widget('event_type_label')
event_description_label = xml.get_widget('event_description_label')
eventbox = xml.get_widget('eventbox')
event_label.set_text(str(len(self.plugin.roster.popup_windows)))
event_type_label.set_markup('<b>'+event_type+'</b>')
event_description_label.set_text(event_desc)
self.window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('green'))
# set colors [ http://www.w3schools.com/html/html_colornames.asp ]
self.window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('black'))
if event_type == 'Contact Online':
close_button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('forestgreen'))
eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('forestgreen'))
elif event_type == 'Contact Offline':
close_button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('firebrick'))
eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('firebrick'))
elif event_type == 'New Message':
close_button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('dodgerblue'))
eventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('dodgerblue'))
# position the window to bottom-right of screen
gtk.gdk.flush()
window_width, window_height = self.window.get_size()
self.plugin.roster.popups_height += window_height
self.window.move(gtk.gdk.screen_width() - window_width, \
@ -805,24 +817,19 @@ class Popup_window:
gobject.timeout_add(5000, self.on_timeout, window_height)
def on_close_button_clicked(self, widget, window_height):
print 'window h', window_height
self.adjust_height_and_move_popup_windows(window_height)
def on_timeout(self, window_height):
self.adjust_height_and_move_popup_windows(window_height)
print 'window h', window_height
def adjust_height_and_move_popup_windows(self, window_height):
#remove
print 'self.plugin.roster.popups_height before', self.plugin.roster.popups_height
self.plugin.roster.popups_height -= window_height
print 'self.plugin.roster.popups_height now', self.plugin.roster.popups_height
print 'removing', self.window
self.window.destroy()
if len(self.plugin.roster.popup_windows) > 0:
# we want to remove the first window added in the list
self.plugin.roster.popup_windows.pop(0) # remove
self.plugin.roster.popup_windows.pop(0) # remove first item
# move the rest of popup windows
self.plugin.roster.popups_height = 0
@ -831,3 +838,6 @@ class Popup_window:
self.plugin.roster.popups_height += window_height
window_instance.window.move(gtk.gdk.screen_width() - window_width, \
gtk.gdk.screen_height() - self.plugin.roster.popups_height)
def on_popup_window_button_press_event(self, widget, event):
print 'IN YOUR DREAMS ONLY..'

View File

@ -2871,8 +2871,8 @@
<widget class="GtkWindow" id="preferences_window">
<property name="border_width">4</property>
<property name="width_request">500</property>
<property name="height_request">380</property>
<property name="width_request">460</property>
<property name="height_request">410</property>
<property name="title" translatable="yes">Preferences</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
@ -2974,6 +2974,57 @@
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2947">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">10</property>
<child>
<widget class="GtkCheckButton" id="use_emoticons_checkbutton">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">If checked, Gajim will replace ascii smilies like ':)' with equivalent graphical emoticons</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Use _emoticons</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_use_emoticons_checkbutton_toggled" last_modification_time="Wed, 19 Jan 2005 23:02:04 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="add_remove_emoticons_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Add/Remove emoticons...</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_add_remove_emoticons_button_clicked" last_modification_time="Wed, 06 Apr 2005 14:31:44 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2901">
<property name="visible">True</property>
@ -2993,6 +3044,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">iconset_combobox</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@ -3041,7 +3093,7 @@
<child>
<widget class="GtkTable" id="table17">
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="n_rows">5</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
<property name="row_spacing">5</property>
@ -3413,19 +3465,6 @@
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2941">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkButton" id="reset_colors_and_fonts_button">
@ -3499,20 +3538,19 @@
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="left_attach">0</property>
<property name="right_attach">3</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
@ -3955,7 +3993,7 @@
<widget class="GtkTable" id="table18">
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="n_columns">3</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">5</property>
<property name="column_spacing">20</property>
@ -4219,8 +4257,8 @@
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
@ -4283,261 +4321,6 @@
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox46">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">5</property>
<child>
<widget class="GtkCheckButton" id="use_emoticons_checkbutton">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">If checked, it will replace ascii smilies eg. :) with equivalent graphical emoticons</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Use _emoticons</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_use_emoticons_checkbutton_toggled" last_modification_time="Wed, 19 Jan 2005 23:02:04 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHSeparator" id="hseparator14">
<property name="visible">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2913">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow25">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="treeview_emoticons">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
<property name="hover_selection">False</property>
<property name="hover_expand">False</property>
<signal name="key_press_event" handler="on_treeview_emoticons_key_press_event" last_modification_time="Wed, 02 Feb 2005 21:04:18 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkVButtonBox" id="vbuttonbox2">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
<property name="spacing">0</property>
<child>
<widget class="GtkButton" id="button_new_emoticon">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_new_emoticon_clicked" last_modification_time="Sun, 13 Feb 2005 14:30:54 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button_remove_emoticon">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_remove_emoticon_clicked" last_modification_time="Sun, 13 Feb 2005 14:31:17 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="set_image_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_set_image_button_clicked" last_modification_time="Sun, 06 Mar 2005 01:57:33 GMT"/>
<child>
<widget class="GtkAlignment" id="alignment38">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="hbox2914">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image185">
<property name="visible">True</property>
<property name="stock">gtk-file</property>
<property name="icon_size">4</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label190">
<property name="visible">True</property>
<property name="label" translatable="yes">_Set Image</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
<property name="tab_fill">True</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2902">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkImage" id="emoticons_image">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label176">
<property name="visible">True</property>
<property name="label" translatable="yes">Emoticons</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="type">tab</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox42">
<property name="border_width">5</property>
@ -4546,18 +4329,43 @@
<property name="spacing">5</property>
<child>
<widget class="GtkCheckButton" id="auto_pop_up_checkbutton">
<widget class="GtkFrame" id="frame25">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">If checked, Gajim will automatically show the new received message in a new chat window or tab in an existing chat window</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<child>
<widget class="GtkAlignment" id="alignment54">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">12</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox64">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkCheckButton" id="auto_popup_checkbutton">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">If checked, Gajim will automatically show the new received message in a new chat window or tab in an existing chat window. If not checked, Gajim will notify you for new message via popups in the bottom right of the screen</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Autopopup _new messages</property>
<property name="label" translatable="yes">Automatically _popup new message</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_auto_pop_up_checkbutton_toggled" last_modification_time="Mon, 28 Mar 2005 16:08:47 GMT"/>
<signal name="toggled" handler="on_auto_popup_checkbutton_toggled" last_modification_time="Wed, 06 Apr 2005 12:46:37 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@ -4567,17 +4375,51 @@
</child>
<child>
<widget class="GtkCheckButton" id="auto_pop_up_away_checkbutton">
<widget class="GtkCheckButton" id="auto_popup_away_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Allow auto popup when _away/DND</property>
<property name="label" translatable="yes">Allow automatically popup new message when _away/DND</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_auto_pop_up_away_checkbutton_toggled" last_modification_time="Tue, 08 Mar 2005 22:51:08 GMT"/>
<signal name="toggled" handler="on_auto_popup_away_checkbutton_toggled" last_modification_time="Wed, 06 Apr 2005 12:46:30 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label233">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;When new chat nessage is received&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -4607,12 +4449,51 @@
</child>
<child>
<widget class="GtkHSeparator" id="hseparator15">
<widget class="GtkFrame" id="frame26">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<child>
<widget class="GtkAlignment" id="alignment55">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">12</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox65">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkHBox" id="hbox2946">
<property name="visible">True</property>
<property name="homogeneous">True</property>
<property name="spacing">0</property>
<child>
<widget class="GtkCheckButton" id="play_sounds_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Play _sounds</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
@ -4626,7 +4507,7 @@
<child>
<widget class="GtkLabel" id="label189">
<property name="visible">True</property>
<property name="label" translatable="yes">_Sound player:</property>
<property name="label" translatable="yes">_Player:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@ -4644,8 +4525,8 @@
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
@ -4671,10 +4552,17 @@
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow29">
@ -4757,6 +4645,40 @@
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label234">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Sounds&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
<property name="tab_fill">True</property>
@ -5103,7 +5025,7 @@
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
@ -5173,9 +5095,9 @@
</child>
<child>
<widget class="GtkVBox" id="vbox57">
<widget class="GtkVButtonBox" id="vbuttonbox3">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="layout_style">GTK_BUTTONBOX_START</property>
<property name="spacing">0</property>
<child>
@ -5190,11 +5112,6 @@
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_new_msg_button_clicked" last_modification_time="Sun, 24 Oct 2004 21:46:39 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
@ -5209,11 +5126,6 @@
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_delete_msg_button_clicked" last_modification_time="Sun, 24 Oct 2004 21:46:47 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
@ -5262,7 +5174,7 @@
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
@ -5745,9 +5657,92 @@ Custom</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame27">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="label_yalign">0.5</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<child>
<widget class="GtkAlignment" id="alignment56">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">12</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="vbox66">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkCheckButton" id="do_not_send_os_info_checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Don't send OS Information</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_do_not_send_os_info_checkbutton_toggled" last_modification_time="Wed, 06 Apr 2005 14:43:56 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label235">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Miscellaneous&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
@ -9867,9 +9862,17 @@ send a chat message to</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_SOUTH_EAST</property>
<property name="focus_on_map">True</property>
<signal name="button_press_event" handler="on_popup_window_button_press_event" last_modification_time="Tue, 05 Apr 2005 21:39:57 GMT"/>
<child>
<widget class="GtkEventBox" id="eventbox">
<property name="visible">True</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>
<child>
<widget class="GtkVBox" id="vbox63">
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">5</property>
@ -9881,9 +9884,9 @@ send a chat message to</property>
<property name="spacing">5</property>
<child>
<widget class="GtkLabel" id="event_label">
<widget class="GtkLabel" id="event_type_label">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;type_of_event&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;event_type_label&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@ -9900,8 +9903,8 @@ send a chat message to</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
@ -9909,7 +9912,7 @@ send a chat message to</property>
<widget class="GtkButton" id="close_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<child>
@ -9939,9 +9942,9 @@ send a chat message to</property>
</child>
<child>
<widget class="GtkLabel" id="jid_label">
<widget class="GtkLabel" id="event_description_label">
<property name="visible">True</property>
<property name="label" translatable="yes">jid_label</property>
<property name="label" translatable="yes">event_description_label</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@ -9964,6 +9967,132 @@ send a chat message to</property>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<widget class="GtkWindow" id="add_remove_emoticons_window">
<property name="border_width">5</property>
<property name="width_request">300</property>
<property name="height_request">350</property>
<property name="title" translatable="yes">Add/Remove Emoticons</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<signal name="delete_event" handler="on_add_remove_emoticons_window_delete_event" last_modification_time="Wed, 06 Apr 2005 15:34:38 GMT"/>
<child>
<widget class="GtkHBox" id="hbox2948">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow25">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="emoticons_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
<property name="hover_selection">False</property>
<property name="hover_expand">False</property>
<signal name="key_press_event" handler="on_emoticons_treeview_key_press_event" last_modification_time="Wed, 06 Apr 2005 17:03:22 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkVButtonBox" id="vbuttonbox4">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_START</property>
<property name="spacing">5</property>
<child>
<widget class="GtkButton" id="button_new_emoticon">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_new_emoticon_clicked" last_modification_time="Sun, 13 Feb 2005 14:30:54 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button_remove_emoticon">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_remove_emoticon_clicked" last_modification_time="Sun, 13 Feb 2005 14:31:17 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="set_image_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Set Image</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_set_image_button_clicked" last_modification_time="Wed, 06 Apr 2005 13:55:38 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="close_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_close_button_clicked" last_modification_time="Wed, 06 Apr 2005 15:35:16 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -325,7 +325,7 @@ class plugin:
def handle_event_error(self, unused, msg):
Error_dialog(msg)
def handle_event_status(self, account, status):
def handle_event_status(self, account, status): # OUR status
#('STATUS', account, status)
self.roster.on_status_changed(account, status)
@ -398,9 +398,19 @@ class plugin:
if old_show < 2 and statuss.index(user1.show) > 1 and \
self.config['sound_contact_connected']:
self.play_sound('sound_contact_connected')
if not self.windows[account]['chats'].has_key(jid) and \
not self.queues[account].has_key(jid) and \
not self.config['autopopup']:
instance = Popup_window(self, 'Contact Online', jid )
self.roster.popup_windows.append(instance)
elif old_show > 1 and statuss.index(user1.show) < 2 and \
self.config['sound_contact_disconnected']:
self.play_sound('sound_contact_disconnected')
if not self.windows[account]['chats'].has_key(jid) and \
not self.queues[account].has_key(jid) and \
not self.config['autopopup']:
instance = Popup_window(self, 'Contact Offline', jid )
self.roster.popup_windows.append(instance)
elif self.windows[account]['gc'].has_key(ji):
#it is a groupchat presence
@ -416,10 +426,14 @@ class plugin:
if self.config['ignore_unknown_contacts'] and \
not self.roster.contacts[account].has_key(jid):
return
first = 0
first = False
if not self.windows[account]['chats'].has_key(jid) and \
not self.queues[account].has_key(jid):
first = 1
first = True
if not self.config['autopopup']:
instance = Popup_window(self, 'New Message', 'From '+ jid )
self.roster.popup_windows.append(instance)
self.roster.on_message(jid, array[1], array[2], account)
if self.config['sound_first_message_received'] and first:
self.play_sound('sound_first_message_received')
@ -772,7 +786,7 @@ class plugin:
self.basic_pattern_re = sre.compile(basic_pattern, sre.IGNORECASE)
emoticons_pattern = ''
for emoticon in self.emoticons: # travel tru emoticons list
for emoticon in self.emoticons: # travel thru emoticons list
emoticon_escaped = sre.escape(emoticon) # espace regexp metachars
emoticons_pattern += emoticon_escaped + '|'# | means or in regexp
@ -787,8 +801,7 @@ class plugin:
self.launch_browser_mailer(kind, url)
def init_regexp(self):
if self.config['useemoticons']:
"""initialize emoticons dictionary"""
#initialize emoticons dictionary
self.emoticons = dict()
split_line = self.config['emoticons'].split('\t')
for i in range(0, len(split_line)/2):
@ -798,6 +811,7 @@ class plugin:
pix = gtk.gdk.pixbuf_new_from_file(emot_file)
self.emoticons[split_line[2*i]] = pix
# update regular expressions
self.make_regexps()
def __init__(self, quIN, quOUT):
@ -814,8 +828,8 @@ class plugin:
'MYVCARD', 'VCARD', 'LOG_NB_LINE', 'LOG_LINE', 'VISUAL', 'GC_MSG', \
'GC_SUBJECT', 'BAD_PASSPHRASE', 'GPG_SECRETE_KEYS', 'ROSTER_INFO', \
'MSGSENT'])
self.default_config = {'autopopup':1,\
'autopopupaway':1,\
self.default_config = {'autopopup':0,\
'autopopupaway':0,\
'ignore_unknown_contacts':0,\
'showoffline':0,\
'autoaway':1,\
@ -882,6 +896,7 @@ class plugin:
'after_time': ']',\
'before_nickname': '<',\
'after_nickname': '>',\
'do_not_send_os_info': 0,\
}
self.send('ASK_CONFIG', None, ('GtkGui', 'GtkGui', self.default_config))
self.config = self.wait('CONFIG')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

View File

@ -917,8 +917,9 @@ class Roster_window:
New_message_dialog(self.plugin, account)
def on_about_menuitem_activate(self, widget):
#About_dialog()
self.popup_windows.append( Popup_window(self.plugin) )
About_dialog()
#inst = Popup_window(self.plugin, 'Fake Message', 'nkour@')
#self.popup_windows.append( inst )
def on_accounts_menuitem_activate(self, widget):
if self.plugin.windows.has_key('accounts'):

1
version.py Normal file
View File

@ -0,0 +1 @@
version='0.7'