diff --git a/tryton/gui/main.py b/tryton/gui/main.py index 749cf3d098..c0f49d0a3e 100644 --- a/tryton/gui/main.py +++ b/tryton/gui/main.py @@ -276,6 +276,7 @@ class Main(object): def set_global_search(self): self.global_search_entry = PlaceholderEntry() + self.global_search_entry.set_placeholder_text(_('Search')) global_search_completion = gtk.EntryCompletion() global_search_completion.set_match_func(lambda *a: True) global_search_completion.set_model(gtk.ListStore( @@ -824,7 +825,8 @@ class Main(object): self.favorite_unset() CONFIG['client.lang'] = prefs['language'] # Set placeholder after language is set to get correct translation - self.global_search_entry.set_placeholder_text(_('Search')) + if self.global_search_entry: + self.global_search_entry.set_placeholder_text(_('Search')) CONFIG.save() def _get_preferences():