YesNoOk
avatar

Variables and the message log  (Read 30884 times)

Started by Nightwish, April 26, 2005, 22:52:36

0 Members and 1 Guest are viewing this.
#1
Variables and the message log  |
April 26, 2005, 22:52:36
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
Last Edit: June 28, 2006, 15:28:30 by Nightwish
#2
Re: Variables and the message log  |
April 27, 2005, 07:02:48
I told you it was a good idea and would simplify the options + add a lot of new logging styles :D
#3
Re: Variables and the message log  |
April 27, 2005, 07:14:41
Quote
There are different templates available - normal message or event, group start event, group "inner" event. status change event. Default templates are provided so that not everybody needs to deal with them, also, some of the message log settings (toggle timestamp, nickname etc. are still working - they just force the template parser to "skip" these variables).

What do you think of this :
Instead of forcing the template parser to "skip" these variables maybe they could modify the template edit, i.e. when you check/uncheck the "show nickname" button you search the template edit for %N and remove/add it to the edit.
There's no problem unchecking the button, you just remove %N, the problem would be when adding %N ... where to add it :) - maybe at the start or in some other default position.

The reason i'm suggesting this is that this way you only need to look at the template and see how the log is created, you don't need to look to see if buttons are checked or not.
#4
Re: Variables and the message log  |
April 27, 2005, 10:57:54
I told you it was a good idea and would simplify the options + add a lot of new logging styles :D

Actually, I also knew it :) The only thing which always concerned me (and still does) is user-friendlyness. I mean, something like:

Code:
"%I%S  %_%N %~said %D%_%n%H%S  %h:%m:%s:%|%M"

does look confusing, right?

Ok, maybe not for you, for me neither, but certainly for a novice user who never had been working with such variables before. Experienced Miranda users won't have a problem with that system, they are used to variables as they are everywhere in MiM.

That's why I plan to keep most of the message log related menu entries to quickly show/hide certain elements. My idea is that a novice user should not HAVE to deal with the templates and still get a good looking message log, together with some options to change the layout quickly "on the fly". He won't even see the templates, unless he invokes the template set editor.

"Advanced" users who feel that the available menu options are not enough to change the look of their message log can then still customize it by editing the templates.
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#5
Re: Variables and the message log  |
April 27, 2005, 12:49:02
Oh, i thought that this new system would reduce the number of options in tabsrmm but it seems to increase them.
I don't have a problem with that, just that you wanted to reduce the options and i thought this would be a way to do it and add endless new options to the log while at it :)

Code:
"%I%S  %_%N %~said %D%_%n%H%S  %h:%m:%s:%|%M"
What's %| ? :)

Quote
Probably a few to invoke bold, underline, maybe italic (no colors, sorry, these are still in the font setup).
Aren't %*, %_ and %/ used for those already ?

I know that we're not really supposed to ask for variables but ... :)
How are you handling status events, will the event message string be like it is now : "<nickname> is now Online (was Away)" or will we have a variable for current status and previous status ? Is this possible, or does miranda send you the status message and there's nothing you can do about it ?
Can we use precision, width and justification formatting on variables (or some of the variables) ?
... and ... :) maybe a toggle variable that moves to the rightmost end of the richedit, writes the string there until it's parsed again then it returns to the previous position :). So we can have something like like this (see atachment). It's no biggie if it's not implemented though :)

EDIT:
It may not be that user-friendly, but as you said, miranda users are pretty accustomed to these things (i mean, miranda isn't a walk in the park to configure)
I'm sure you've seen mToolTip :D
Like i said before, keep the current buttons but make them modify the template instead of making the template parser skip those variables. That way they see what every variable is for and can quicky catch up and tweak it theirselves. Just an idea though, i didn't give "miranda support and assistance" to anyone yet so i might not know what's at stake :D

EDIT:
Anyway, there's no point in doing these things if i'm the only one that wants them ... i'm using IeView now
minor typos
Last Edit: April 27, 2005, 13:03:36 by eblis
#6
Re: Variables and the message log  |
April 27, 2005, 13:17:21
Oh, i thought that this new system would reduce the number of options in tabsrmm but it seems to increase them.

Nope, the message log page is already cleared and down to less than 1/2 of the old options.

Quote
I don't have a problem with that, just that you wanted to reduce the options and i thought this would be a way to do it and add endless new options to the log while at it :)

Also, the menus have been simplified a bit - basically, there are still the toggles to show nickname/timestamp, switch from normal to groupmode and so on. These will stay for people who don't want to deal with templates. The default set of templates is hardcoded into the DLL and is used as long as you don't define your own set (then, it's saved to the database). The hardcoded set will also make it very easy to "revert to default", if something goes terribly wrong while editing templates

Quote
Code:
"%I%S  %_%N %~said %D%_%n%H%S  %h:%m:%s:%|%M"
What's %| ? :)

It's a "tab" - it advances to the position set by the "indent" value. Useful if you're using grouping and have timestamps with variable length (AM/PM or if you decide not to show leading zeros for the hour - depends on your localized time formatting). That tab will allow to properly align the messages.

Quote
Aren't %*, %_ and %/ used for those already ?

Already working, yes.

Quote
I know that we're not really supposed to ask for variables but ... :)
How are you handling events, will the event message string be like it is now : "<nickname> is now Online (was Away)" or will we have a variable for current status and previous status ? Is this possible, or does miranda send you the status message and there's nothing you can do about it ?

I'am afraid, its not possible. The status change events are created by the message window dialog and are then added to the db (like any other message, preformatted).I could set them to use variables, but then they would look weird in any history plugin... However, the text you can see for status change events can be changed by using a language file.

Variables for the current status should be possible, also, tabSRMM saves the previous status in the message dialog.

Quote
Can we use precision, width and justification formatting on variables (or some of the variables) ?

In general, the layout capabilities of the rich edit control are very lmited (compared to HTML or CSS). It's basically designed for floating text - for example, it doesn't even support textflow around images. Pixel-exact operations are not very well handled (and the only way to use them are tabs or paragraph indent values).

Quote
... and ... :) maybe a toggle variable that moves to the rightmost end of the richedit, writes the string there until it's parsed again then it returns to the previous position :). So we can have something like like this (see atachment). It's no biggie if it's not implemented though :)

The rich edit does not allow this. It does support right-aligning, but only for entire paragraphs. In theory, it could be done with right-aligned tabs, but that's not going to work well when you resize the window (that would require a message log rebuild on resize, which isn't exactly what I want).
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#7
Re: Variables and the message log  |
April 27, 2005, 15:48:24
Can we use precision, width and justification formatting on variables (or some of the variables) ?

In general, the layout capabilities of the rich edit control are very lmited (compared to HTML or CSS). It's basically designed for floating text - for example, it doesn't even support textflow around images. Pixel-exact operations are not very well handled (and the only way to use them are tabs or paragraph indent values).
Oh, when i asked about formatting i was thinking about basic string manipulation and not pixel-exact operations :); something like: limit the number of characters or string is at least x characters long (spaces for new characters) ... you know ... C precision, width and justification formatting :)

i.e. %.15N - this would limit the name to 15 characters or something. %.2h would always put the leading 0 even if the current locale doesn't  ... and things like that, not pixel-exact operations :)
#8
Re: Variables and the message log  |
April 27, 2005, 15:56:06
i.e. %.15N - this would limit the name to 15 characters or something. %.2h would always put the leading 0 even if the current locale doesn't  ... and things like that, not pixel-exact operations :)

I'am thinking about this, though it won't probably be in the first version. Basically, allowing macros to pass variables to printf() style formatting - however, this code needs to be "foolproof" to avoid possible crashes due to buffer overruns and more...
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#9
Re: Variables and the message log  |
April 27, 2005, 21:11:40
variables for status could allow showing the status msg if available
#10
Re: Variables and the message log  |
April 27, 2005, 22:37:59
Yeah but if the status event is formmated already (which nightwish said it was) it could be represented by the same variable as any other event string (%M)
#11
Re: Variables and the message log  |
April 28, 2005, 00:07:04
This is the first draft of the template editor.

The empty space on the bottom is reserved for some help text (listing available variables and so on..)

The preview window will show a "faked" message with sample text to visualize the look of the current template, using exactly the same code which also sends the real messages to the message window.

Templates are fully unicode safe, so they may contain any character, even characters from multiple charsets.

edit Screenshot updated - already works, including basic event preview.
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
Last Edit: April 28, 2005, 06:45:57 by Nightwish
#12
Re: Variables and the message log  |
April 28, 2005, 06:19:19
Sorry for my offtop, but I wonder when this version will be available? Well, as I've understood, the next version will be 1.0, not 0.9.9.95, am I right?
#13
Re: Variables and the message log  |
April 28, 2005, 06:33:54
Sorry for my offtop, but I wonder when this version will be available? Well, as I've understood, the next version will be 1.0, not 0.9.9.95, am I right?

This version will be available within the next few days, including the template-enabled message log and the template editor. Most likely not full-featured, but useable.

In any way, 1.0 will have these features (tray support, event popups, templates for the message log).
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#14
Re: Variables and the message log  |
April 28, 2005, 18:19:52
This version will be available within the next few days, including the template-enabled message log and the template editor. Most likely not full-featured, but useable.
Woohoo, I want the new version NOW :D I'm really looking forward to it. You rule Nightwish - everytime there is new version, there are so many new features (and mostly good ones). This is just a big "Thank you!" :)

TabSRMM is surely the best plugin for Miranda ever!
__
;D Sorry for my English ;D
#15
Re: Variables and the message log  |
April 30, 2005, 02:46:42
Any chance for a beta testing on 9x before actual release, so we should just "take what we're given"? Or I'd better ask: would it be a 9x (non-unicode) version of it?
#16
Re: Variables and the message log  |
April 30, 2005, 03:30:43
Any chance for a beta testing on 9x before actual release, so we should just "take what we're given"? Or I'd better ask: would it be a 9x (non-unicode) version of it?

That template stuff does work in the non-unicode build (including the editor and everything).
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#17
Re: Variables and the message log  |
April 30, 2005, 04:54:43
More variables...

%Hx (x = a number from 0 to 4) sets background color. X is a color index value into the color table, and the template editor allows you to define up to 5 colors which you can use with some variables in templates.

If x is not given, then this variable sets the "default" background color for the event (it does respect incoming/outgoing background colors, if they are in use).

%-x - draws a horizontal grid line with the given color. Again, if x is left out, the default grid line color will be used.

With these things, layouts like in the attached screenshots will be possible. Sure, it's not IEView, but still pretty cool for a basically plain-text based message log :)



__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#18
Re: Variables and the message log  |
May 09, 2005, 14:51:53
Is it just me or is any change I'm doing and applying to the preview, does not show up correctly?
#19
Re: Variables and the message log  |
May 09, 2005, 15:05:01
You first have to save the template and then try the preview button; that should make the changes appear.
But for some people, myself included, the preview doesn't work even if i save the template beforehand (the changes appear in the log though :) )
#20
Re: Variables and the message log  |
May 09, 2005, 15:21:22
You first have to save the template and then try the preview button; that should make the changes appear.
But for some people, myself included, the preview doesn't work even if i save the template beforehand (the changes appear in the log though :) )

Template editor is buggy and incomplete (it was the main reason for the delay of .95). It will improve, preview already works while editing the template (it takes the string from the input box) and the overall handling of the template editor will be better in the next release.
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#21
Re: Variables and the message log  |
May 09, 2005, 15:32:08
Well, like eblis said, it doesn't work... It most certainly does not take the string and apply it to the preview...
#22
Re: Variables and the message log  |
May 09, 2005, 16:21:26
Well, like eblis said, it doesn't work... It most certainly does not take the string and apply it to the preview...

I know that it doesn't work. Please stop reporting these things.. 95 is a PRE release, it is supposed to be incomplete and buggy. Just don't use it, if these things are disturbing for you.
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#23
Re: Variables and the message log  |
May 09, 2005, 16:31:28
You said it does work, so I felt like I should emphesis it, but maybe I understood you wrongly. My bad, sorry. ;)
#24
Re: Variables and the message log  |
May 09, 2005, 22:43:37
You said it does work, so I felt like I should emphesis it, but maybe I understood you wrongly. My bad, sorry. ;)

It does work in my current code (which is not yet released). Yes, probably a misunderstanding - no problem :)
__
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
#25
Re: Variables and the message log  |
May 12, 2005, 08:41:20
Man, it is diffecult to master the new message log editor.
Will a tutorial be written at some point and sharing of user-made themes?