Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 19 Apr 2015 14:59:12 -0400
From: Mathieu Laprise <mathlaprise@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Improving Johnny

Hey list,
I added dynamic language switching in my latest commit. A new class
Translator is now responsible of handling translation. My goal was to make
it easy for anyone to add new translations, they just have to add a new
entry in  m_languagesAndCodes object of the singleton class Translator and
any other thing will update. (exemple : m_languagesAndCodes["deutsh"] =
"de"). And they don't have to understand the big MainWindow class.

 I know it's not everyone that likes Singleton design pattern but I thought
the Translator class was a good candidate for that and translation
shouldn't be tied to a single window like MainWindow it should be tied to
the application itself.

More generally, I think that giving all responsabilities to MainWindow.cpp
and having all UI in the same class MainWindow.ui isn't the best design and
it might makes it harder for Johnny to expand. Maybe putting some
refactoring this summer in the timeline might be a good idea.

The mainwindow.ui changed a lot probably because Qt Designer 5.4 write the
code differently than 4.X. Don't worry, I didn't mess anything with this
file, I just added a layout, an empty comboBox and a label in the designer.

PS: If you want to test, you have to uncheck the apply settings as soon as
they are changed checkbox, I didn't do it yet. You need to use the buttons.
It's not hard but I really need to go study. Also, the layout bug from
2012  is still there too but not if you restart the app. I don't guarantee
that there are no other bugs as this is still a work in progress.

If you don't have time it's okay, I'm not asking for help to finish the
feature, I just wanted to give you an update to show you that I'm working
on it and that I'm progressing.

The pull request :
https://github.com/shinnok/johnny/pull/3

The specific commit I'm talking about :
https://github.com/math07/johnny/commit/e86a615d21a3a81df36893ed2bb0816d9efff9d8

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.