-
Notifications
You must be signed in to change notification settings - Fork 116
Smiley improvements #83
Comments
I think about 20 smileys would do, no reason to go buckwild with them. Thoughts? |
@blitchiz Why don't you want 1-to-1 mapping of unicode emoticons? |
@ReAzem can't argue with that :) |
I think I will have a go at this. Just some minor clarification questions:
Questions (bear with me if I ask things that are obvious or if I write questions about things that I've completely misunderstood):
If the user via inputtextwidget writes "haha.. :D", then:
The mapping should look something like this then:
If the user is using a smileypack and the Mapping(2.) doesn't exist for one unicode, then use a default internal mapping to a "img src="default... " that is included in ProjectTox-Qt. |
Saying upfront -- I don't use image smilies or unicode emoticons, I usually prefer using plain text ones, like US-ASCII only or Shift JIS only, so I'm not very knowledgeable about smilies. By
and
I meant to say that we could select a set of n common smilies such that n is both in unicode emoticons and in standard smiley pack and force smilepacks to define exactly n smilies without ability to define their textual representations. In the current smiley pack you can define arbitrary number of smilies and map them to arbitrary set of strings -- textual representations of those smilies:
and I thought of something like that:
i.e. you can't specify textual representations and you have to define images for all n smilies. With such restrictions it would be possible to avoid cases when, say, smiley pack A has (The whole point of restricting smiley packs was to minimize the unambiguity that smiley packs with their missing smilies or different textual representations introduce) Anyway, looking around a few im applications with smiley pack support I found that they generally allow smiley packs to define arbitrary number of smilies and map them to arbitrary sets of textual representation strings, so I guess smiley users are used to this and would actually expect such level of customization, so we will keep it as it is. In other words, ignore "Restrict number of smilies" and "1-to-1 mapping of Unicode Emoticons to image smilies, for the same reason as the previous one" items. Moreover, such restricted smileypacks would fail since we are not the only client in the toxland, other clients don't have to obey those restrictions, which defeats the whole point. |
I agree. The last point is the most important: We are not the only client. |
yeah, also noticed that if the user is using unicode, then unicode will be transmitted to the receiver. It looks funny when I received it in the toxic client, because it doesn't support unicode, like 😃 becomes ~_ I support nurupos idea that it would be great to have some form of standardized smileys though. I guess if we create one extensive "free to use" standard library of all thinkable smileys (that could be copied to other tox-clients) then it would in fact become the standard. The other more general solution is to send smileypack pictures encoded in the actual message (yuck! ;) ). |
Tox protocol specifies that messages are to be encoded in UTF-8.
Don't understand what do you mean. Perhaps you meant ☺ instead of 😃 ?
.
That still doesn't stop anyone from using their own implementation.
This is insane. |
@nurupo I'm currently working on the new message display ;) |
@Schlumpf yeah, I saw that. It will be a long code reading for me : ) Do you know if our smileys would work there (if it support rich text image insertion)? Also, Quassel has special way of highlighting text - you can highlight just messages, or messages and names, or time and messages and names. Would be nice if we could in Qt GUI highlight just messages, names and messages, messages and time, names and messages and time. Also, last time I checked your fork, the lines that separate names, messages and times don't resize when the window resizes. And it didn't handle multiline messages (ones with s in them) correctly. |
I'm currently (in this moment) working on the selection ^^ |
Yeah, we can just put smilies on hold and come back to them later. I just will finish cleaning up smileypack.cpp, emoticonmenu.cpp and settings so that they will be ready to go if needed. |
Ok, so this smileypack issue #83 is not relevant at the moment, or at least until the new message display is implemented?. One last quick question:
If I understood it correctly, fixing the above would mean:
|
Yeah, something like this, except renaming the
The .config path might differ depending on OS. There is a Qt call that gives a path to a suitable for saving application's settings on current OS directory, so the install.md part would be kind of tricky to write |
@nurupo There is a problem with the input of emoji in different sizes than the normal text. If the user inserts a emoji from the emoticonmenu with no space at the end, the next characters will have the other size, too. I don't like the space, because of if the user sets the cursor between emoji and the space, he is able to write in the emoji size. I would prefer to disable the smiley/emoticon preview in the input widget. |
Can you elaborate more on how is that related to Qt GUI? |
There is no direct connection. Just a note, that emoji will expanded, maybe. |
@Schlumpf I got somewhat interested in QChar::ObjectReplacementCharacter (U+FFFC) after the #118 and I found that you can actually insert custom objects into QTextEdit by using that QChar. Though the doc says:
|
I'm using that for #116 ;) |
Remove those spaces that are added before and after a smiley.
Restrict number of smilies.We want to avoid situations when a smiley pack A has more smilies than a smiley pack B, because that would result in user using B smiley pack seeing sometimes image smilies and sometimes text ones -- smiley pack B wouldn't be able to find an image for some smilies from smiley pack A.1-to-1 mapping of Unicode Emoticons to image smilies, for the same reason as the previous one.Move the default smiley pack into a resource directory and treat it just as if it was located in a file system, instead of hardcoding the config for the smiley pack in cpp.
That would also allow the default slimey pack to be moved out of .exe if needed without any trouble.
Add an option to disable any smileys/emoticons.
That should enable/disable processing of smilies and show/hide the button triggering EmoticonMenu.
Change the way smiley settings are displayed:
Make EmoticonMenu a singleton.
Really, why it's not a singleton yet?
When settings windows is created, it locates, parses and loads all smiley packs from a disk, which delays the settings window from appearing for quite long time. As a solution - do smiley pack loading in a separate thread.
That settings window also caches all loaded smiley packs, which results in 24mb -> 70mb memory usage jump on my system with only single default smiley pack being cached. Mayne not cache smiley packs at all and let them load all over again when opening the settings menu? Or at least cache in some more efficient way.
The text was updated successfully, but these errors were encountered: