diff --git a/Core/core.py b/Core/core.py index c094ebb69b86f8d0449aa2e3e84303431144a3a1..3cd2cb328b539cf91fc035f4ca357cbc088af96d 100644 --- a/Core/core.py +++ b/Core/core.py @@ -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) diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 24f50042e67ad9d93908802c81c267c25cf8de05..e70014fbe133cd28725be11ec5f4d11a612d1376 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -46,6 +46,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(): @@ -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')]) - - 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() + self.on_checkbutton_toggled(widget, 'useemoticons', None, \ + self.xml.get_widget('add_remove_emoticons_button')) + + def on_add_remove_emoticons_button_clicked(self, widget): + Add_remove_emoticons_window(self.plugin) - 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,19 +821,18 @@ 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.on_sounds_treemodel_row_changed) self.msg_tree.get_model().connect('row-changed', \ - self.on_msg_treemodel_row_changed) + self.on_msg_treemodel_row_changed) 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) + self.on_msg_treemodel_row_deleted) + 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'): @@ -1315,11 +1158,6 @@ class Account_modification_window: gpg_save_password_checkbutton.set_sensitive(True) 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) @@ -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""" diff --git a/plugins/gtkgui/dialogs.py b/plugins/gtkgui/dialogs.py index c117ea5834afb54cb39cb768a2c4bdaf0fdd44a6..18d2d443005ad9d1e1819740d9a818e27a098e8b 100644 --- a/plugins/gtkgui/dialogs.py +++ b/plugins/gtkgui/dialogs.py @@ -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))) - - self.window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('green')) + event_type_label.set_markup('<b>'+event_type+'</b>') + event_description_label.set_text(event_desc) + # 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..' diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index 76af651b06535bab7131e2959d041df5765bd5b6..d73cf5c6100539024238d479be8046927a7e8c64 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -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> @@ -4284,25 +4322,104 @@ </child> <child> - <widget class="GtkVBox" id="vbox46"> + <widget class="GtkVBox" id="vbox42"> <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"> + <widget class="GtkFrame" id="frame25"> <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"/> + <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">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_popup_checkbutton_toggled" last_modification_time="Wed, 06 Apr 2005 12:46:37 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <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 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_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"><b>When new chat nessage is received</b></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> @@ -4312,134 +4429,85 @@ </child> <child> - <widget class="GtkHSeparator" id="hseparator14"> + <widget class="GtkCheckButton" id="ignore_events_from_unknown_contacts_checkbutton"> <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Ignore events from contacts not in your roster</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_ignore_events_from_unknown_contacts_checkbutton_toggled" last_modification_time="Thu, 10 Mar 2005 23:38:45 GMT"/> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkHBox" id="hbox2913"> + <widget class="GtkFrame" id="frame26"> <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> + <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="GtkVButtonBox" id="vbuttonbox2"> - <property name="border_width">5</property> + <widget class="GtkAlignment" id="alignment55"> <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> + <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="GtkButton" id="set_image_button"> + <widget class="GtkVBox" id="vbox65"> <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"/> + <property name="homogeneous">False</property> + <property name="spacing">0</property> <child> - <widget class="GtkAlignment" id="alignment38"> + <widget class="GtkHBox" id="hbox2946"> <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> + <property name="homogeneous">True</property> + <property name="spacing">0</property> <child> - <widget class="GtkHBox" id="hbox2914"> + <widget class="GtkCheckButton" id="play_sounds_checkbutton"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</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">True</property> + <property name="fill">True</property> + </packing> + </child> - <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="GtkHBox" id="hbox2911"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> <child> - <widget class="GtkLabel" id="label190"> + <widget class="GtkLabel" id="label189"> <property name="visible">True</property> - <property name="label" translatable="yes">_Set Image</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> @@ -4449,6 +4517,7 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> + <property name="mnemonic_widget">soundplayer_entry</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -4456,179 +4525,136 @@ </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> + + <child> + <widget class="GtkEntry" id="soundplayer_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + <signal name="changed" handler="on_soundplayer_entry_changed" last_modification_time="Tue, 08 Mar 2005 22:59:53 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> </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> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">5</property> - - <child> - <widget class="GtkCheckButton" id="auto_pop_up_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</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Autopopup _new messages</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"/> - </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"> + <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="GtkCheckButton" id="auto_pop_up_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="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"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkTreeView" id="sounds_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="cursor_changed" handler="on_treeview_sounds_cursor_changed" last_modification_time="Wed, 09 Feb 2005 22:51:36 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="GtkCheckButton" id="ignore_events_from_unknown_contacts_checkbutton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Ignore events from contacts not in your roster</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_ignore_events_from_unknown_contacts_checkbutton_toggled" last_modification_time="Thu, 10 Mar 2005 23:38:45 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkHBox" id="hbox2910"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> - <child> - <widget class="GtkHSeparator" id="hseparator15"> - <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="GtkEntry" id="sounds_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">*</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> - <child> - <widget class="GtkHBox" id="hbox2911"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">5</property> + <child> + <widget class="GtkButton" id="sounds_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">...</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_button_sounds_clicked" last_modification_time="Wed, 09 Feb 2005 23:29:56 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> <child> - <widget class="GtkLabel" id="label189"> + <widget class="GtkLabel" id="label234"> <property name="visible">True</property> - <property name="label" translatable="yes">_Sound player:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> + <property name="label" translatable="yes"><b>Sounds</b></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> @@ -4636,126 +4662,22 @@ <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">soundplayer_entry</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> - - <child> - <widget class="GtkEntry" id="soundplayer_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - <signal name="changed" handler="on_soundplayer_entry_changed" last_modification_time="Tue, 08 Mar 2005 22:59:53 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="type">label_item</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="GtkScrolledWindow" id="scrolledwindow29"> - <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="sounds_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="cursor_changed" handler="on_treeview_sounds_cursor_changed" last_modification_time="Wed, 09 Feb 2005 22:51:36 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="GtkHBox" id="hbox2910"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">5</property> - - <child> - <widget class="GtkEntry" id="sounds_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="sounds_button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">...</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_button_sounds_clicked" last_modification_time="Wed, 09 Feb 2005 23:29:56 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> </widget> <packing> <property name="tab_expand">False</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> @@ -5607,8 +5519,107 @@ Custom</property> </widget> <packing> <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label196"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Links</b></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">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame20"> + <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="alignment41"> + <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="vbox48"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkCheckButton" id="log_in_contact_checkbutton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Log presences in _contact's log file</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_log_in_contact_checkbutton_toggled" last_modification_time="Tue, 08 Mar 2005 23:21:11 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="log_in_extern_checkbutton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Log presences in an _external file</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_log_in_extern_checkbutton_toggled" last_modification_time="Tue, 08 Mar 2005 23:27:49 GMT"/> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> </widget> @@ -5617,9 +5628,9 @@ Custom</property> </child> <child> - <widget class="GtkLabel" id="label196"> + <widget class="GtkLabel" id="label195"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Links</b></property> + <property name="label" translatable="yes"><b>Log</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -5642,19 +5653,19 @@ Custom</property> <packing> <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame20"> + <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_ETCHED_IN</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkAlignment" id="alignment41"> + <widget class="GtkAlignment" id="alignment56"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -5666,23 +5677,23 @@ Custom</property> <property name="right_padding">0</property> <child> - <widget class="GtkVBox" id="vbox48"> + <widget class="GtkVBox" id="vbox66"> <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">5</property> + <property name="spacing">0</property> <child> - <widget class="GtkCheckButton" id="log_in_contact_checkbutton"> + <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">Log presences in _contact's log file</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_log_in_contact_checkbutton_toggled" last_modification_time="Tue, 08 Mar 2005 23:21:11 GMT"/> + <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> @@ -5692,23 +5703,11 @@ Custom</property> </child> <child> - <widget class="GtkCheckButton" id="log_in_extern_checkbutton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Log presences in an _external file</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_log_in_extern_checkbutton_toggled" last_modification_time="Tue, 08 Mar 2005 23:27:49 GMT"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> + <placeholder/> + </child> + + <child> + <placeholder/> </child> </widget> </child> @@ -5716,9 +5715,9 @@ Custom</property> </child> <child> - <widget class="GtkLabel" id="label195"> + <widget class="GtkLabel" id="label235"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Log</b></property> + <property name="label" translatable="yes"><b>Miscellaneous</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -5740,14 +5739,10 @@ Custom</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> - - <child> - <placeholder/> - </child> </widget> <packing> <property name="tab_expand">False</property> @@ -9867,25 +9862,91 @@ 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="GtkVBox" id="vbox63"> + <widget class="GtkEventBox" id="eventbox"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">5</property> + <property name="visible_window">True</property> + <property name="above_child">False</property> <child> - <widget class="GtkHBox" id="hbox2945"> + <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> <child> - <widget class="GtkLabel" id="event_label"> + <widget class="GtkHBox" id="hbox2945"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkLabel" id="event_type_label"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>event_type_label</b></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="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="close_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">True</property> + + <child> + <widget class="GtkImage" id="image496"> + <property name="visible">True</property> + <property name="stock">gtk-close</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> + <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">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="event_description_label"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>type_of_event</b></property> + <property name="label" translatable="yes">event_description_label</property> <property name="use_underline">False</property> - <property name="use_markup">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> @@ -9900,35 +9961,63 @@ 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> + </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="GtkButton" id="close_button"> + <widget class="GtkTreeView" id="emoticons_treeview"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - - <child> - <widget class="GtkImage" id="image496"> - <property name="visible">True</property> - <property name="stock">gtk-close</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> + <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> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> </child> </widget> <packing> @@ -9939,26 +10028,66 @@ send a chat message to</property> </child> <child> - <widget class="GtkLabel" id="jid_label"> + <widget class="GtkVButtonBox" id="vbuttonbox4"> <property name="visible">True</property> - <property name="label" translatable="yes">jid_label</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> + <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">True</property> + <property name="expand">False</property> <property name="fill">True</property> </packing> </child> diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index a8d9c95e9b651e89132b0d98a2f5a4251eb00931..679280ebc33866aace21238b5f308ae377d98cb2 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -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 + not self.queues[account].has_key(jid): + 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,17 +801,17 @@ class plugin: self.launch_browser_mailer(kind, url) def init_regexp(self): - if self.config['useemoticons']: - """initialize emoticons dictionary""" - self.emoticons = dict() - split_line = self.config['emoticons'].split('\t') - for i in range(0, len(split_line)/2): - emot_file = split_line[2*i+1] - if not self.image_is_ok(emot_file): - continue - pix = gtk.gdk.pixbuf_new_from_file(emot_file) - self.emoticons[split_line[2*i]] = pix - + #initialize emoticons dictionary + self.emoticons = dict() + split_line = self.config['emoticons'].split('\t') + for i in range(0, len(split_line)/2): + emot_file = split_line[2*i+1] + if not self.image_is_ok(emot_file): + continue + 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') diff --git a/plugins/gtkgui/pixmaps/smile.png b/plugins/gtkgui/pixmaps/smile.png deleted file mode 100644 index 981b7d915d23798a88c70808e08205a0075f04c2..0000000000000000000000000000000000000000 Binary files a/plugins/gtkgui/pixmaps/smile.png and /dev/null differ diff --git a/plugins/gtkgui/roster_window.py b/plugins/gtkgui/roster_window.py index 3b4f0f3cd11988aaf0444d10e1644a72d3c9260f..3a4d4838bc8d6c004df7dd55e8d00c6edbcd6076 100644 --- a/plugins/gtkgui/roster_window.py +++ b/plugins/gtkgui/roster_window.py @@ -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'): diff --git a/version.py b/version.py new file mode 100644 index 0000000000000000000000000000000000000000..618bfba404d8d5fbb942cccbd630bc3b52f541ea --- /dev/null +++ b/version.py @@ -0,0 +1 @@ +version='0.7'