From 1e5c57459bc695aeb523f48d57ccbc1ddfa227ab Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Wed, 1 May 2013 00:14:14 +0400 Subject: EmoticonsPackPlugin.coding style --- emoticons_pack/config_dialog.ui | 143 ++++++++++++++++----------------------- emoticons_pack/emoticons_pack.py | 18 ++--- 2 files changed, 64 insertions(+), 97 deletions(-) diff --git a/emoticons_pack/config_dialog.ui b/emoticons_pack/config_dialog.ui index 691da97..ac04173 100644 --- a/emoticons_pack/config_dialog.ui +++ b/emoticons_pack/config_dialog.ui @@ -264,132 +264,105 @@ True False + True - + + False True + False False - end + True + False + - - False + True False - True - 22 - False - - + + True + False + gtk-refresh + + + True + True + 0 + + + + True False - - - True - False - gtk-info - - - False - False - 0 - - - - - True - False - 0 - Legend - - - True - True - 1 - - + 0 + Install/Upgrade + + True + True + 1 + - - True - True - end - 0 - True - True True - end 0 - + + False True False - end + True + 22 + False + - - False + True - False False - True - False - - + True False - - - True - False - gtk-refresh - - - True - True - 0 - - - - - True - False - 0 - Install/Upgrade - - - True - True - 1 - - + gtk-info + + True + True + 0 + + + + + True + False + 0 + Legend + + + True + True + 1 + - - False - False - 0 - - False - False - end + True + True 1 False - False + True 5 diff --git a/emoticons_pack/emoticons_pack.py b/emoticons_pack/emoticons_pack.py index e0b3919..455b917 100644 --- a/emoticons_pack/emoticons_pack.py +++ b/emoticons_pack/emoticons_pack.py @@ -120,8 +120,7 @@ class EmoticonsPackPlugin(GajimPlugin): self.available_treeview.append_column(col) selection = self.available_treeview.get_selection() - selection.connect( - 'changed', self.available_emoticons_treeview_selection_changed) + selection.connect('changed', self.emoticons_treeview_selection_changed) selection.set_mode(Gtk.SelectionMode.SINGLE) self.emoticons_description_textview = ConversationTextview(None) @@ -187,14 +186,8 @@ class EmoticonsPackPlugin(GajimPlugin): self.tmp_dir, name, 'preview.png'))) self.emoticons_description_textview.tv.display_html( desc, self.emoticons_description_textview) - self.emoticons_description_textview.tv.set_property('sensitive', True) - - def dict_to_html(self, dict_): - desc = '' - for icon in dict_: - acr = ' , '.join(dict_[icon]) - desc += ' '+ icon + ' '+ acr + '\n' - return desc + self.emoticons_description_textview.tv.set_property( + 'sensitive', True) def on_inslall_upgrade_clicked(self, widget): self.inslall_upgrade_button.set_property('sensitive', False) @@ -300,7 +293,7 @@ class EmoticonsPackPlugin(GajimPlugin): conf.get(section, 'homepage'), False]) conf.remove_section(section) - def available_emoticons_treeview_selection_changed(self, treeview_selection): + def emoticons_treeview_selection_changed(self, treeview_selection): model, iter = treeview_selection.get_selected() label = self.xml.get_object('label2') label.set_text(_('Legend')) @@ -343,7 +336,8 @@ class EmoticonsPackPlugin(GajimPlugin): self.tmp_dir, set_name, 'preview.png'))) self.emoticons_description_textview.tv.display_html( desc, self.emoticons_description_textview) - self.emoticons_description_textview.tv.set_property('sensitive', True) + self.emoticons_description_textview.tv.set_property( + 'sensitive', True) else: self.set_name.set_text('') self.authors_label.set_text('') -- cgit v1.2.3