pidgin/themes/Template.html

Thu, 17 May 2018 22:26:19 -0500

author
Mike Ruprecht <cmaiku@gmail.com>
date
Thu, 17 May 2018 22:26:19 -0500
changeset 39078
bbaab5d6a8d5
parent 35895
bd19d3cd93e3
permissions
-rw-r--r--

win32: Simplify complicated DLL preparation

WinPidgin uses complicated DLL preparation in order to find where
GTK+ and other DLLs are located. This is broken due to names and
paths of DLLs having changed with the new build system and versions.
GTK+3 doesn't provide an installable package either. Since we need
to bundle the dependencies ourselves anyway, we can control where
they are stored and can simplify this complicated searching.

For the purpose of loading DLLs, the difference between "classic"
and "fhs" win32-dirs is that "classic" has its dependencies in a
bin/ subdirectory. Therefore, all that's really needed is to add
the bin/ subdirectory into the search path. This patch does this
using SetDllDirectory().

32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
2 <html>
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
3 <head>
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
4 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
5 <base href="%@">
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
6 <script type="text/javascript" defer="defer">
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
7 // NOTE:
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
8 // Any percent signs in this file must be escaped!
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
9 // Use two escape signs (%%) to display it, this is passed through a format call!
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
10
35838
64f331a1eaa0 Drop remote smileys in favor of remote images
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35754
diff changeset
11 var PURPLE_IMAGE_STORE_PROTOCOL = 'purple-image:';
64f331a1eaa0 Drop remote smileys in favor of remote images
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35754
diff changeset
12
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
13 function appendHTML(html) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
14 var node = document.getElementById("Chat");
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
15 var range = document.createRange();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
16 range.selectNode(node);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
17 var documentFragment = range.createContextualFragment(html);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
18 node.appendChild(documentFragment);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
19 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
20
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
21 // a coalesced HTML object buffers and outputs DOM objects en masse.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
22 // saves A LOT of CSS recalculation time when loading many messages.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
23 // (ex. a long twitter timeline)
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
24 function CoalescedHTML() {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
25 var self = this;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
26 this.fragment = document.createDocumentFragment();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
27 this.timeoutID = 0;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
28 this.coalesceRounds = 0;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
29 this.isCoalescing = false;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
30 this.isConsecutive = undefined;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
31 this.shouldScroll = undefined;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
32
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
33 var appendElement = function (elem) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
34 document.getElementById("Chat").appendChild(elem);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
35 };
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
36
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
37 function outputHTML() {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
38 var insert = document.getElementById("insert");
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
39 if(!!insert && self.isConsecutive) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
40 insert.parentNode.replaceChild(self.fragment, insert);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
41 } else {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
42 if(insert)
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
43 insert.parentNode.removeChild(insert);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
44 // insert the documentFragment into the live DOM
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
45 appendElement(self.fragment);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
46 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
47 alignChat(self.shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
48
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
49 // reset state to empty/non-coalescing
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
50 self.shouldScroll = undefined;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
51 self.isConsecutive = undefined;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
52 self.isCoalescing = false;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
53 self.coalesceRounds = 0;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
54 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
55
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
56 // creates and returns a new documentFragment, containing all content nodes
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
57 // which can be inserted as a single node.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
58 function createHTMLNode(html) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
59 var range = document.createRange();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
60 range.selectNode(document.getElementById("Chat"));
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
61 return range.createContextualFragment(html);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
62 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
63
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
64 // removes first insert node from the internal fragment.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
65 function rmInsertNode() {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
66 var insert = self.fragment.querySelector("#insert");
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
67 if(insert)
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
68 insert.parentNode.removeChild(insert);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
69 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
70
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
71 function setShouldScroll(flag) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
72 if(flag && undefined === self.shouldScroll)
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
73 self.shouldScroll = flag;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
74 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
75
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
76 // hook in a custom method to append new data
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
77 // to the chat.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
78 this.setAppendElementMethod = function (func) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
79 if(typeof func === 'function')
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
80 appendElement = func;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
81 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
82
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
83 // (re)start the coalescing timer.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
84 // we wait 25ms for a new message to come in.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
85 // If we get one, restart the timer and wait another 10ms.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
86 // If not, run outputHTML()
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
87 // We do this a maximum of 400 times, for 10s max that can be spent
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
88 // coalescing input, since this will block display.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
89 this.coalesce = function() {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
90 window.clearTimeout(self.timeoutID);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
91 self.timeoutID = window.setTimeout(outputHTML, 25);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
92 self.isCoalescing = true;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
93 self.coalesceRounds += 1;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
94 if(400 < self.coalesceRounds)
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
95 self.cancel();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
96 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
97
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
98 // if we need to append content into an insertion div,
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
99 // we need to clear the buffer and cancel the timeout.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
100 this.cancel = function() {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
101 if(self.isCoalescing) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
102 window.clearTimeout(self.timeoutID);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
103 outputHTML();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
104 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
105 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
106
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
107
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
108 // coalased analogs to the global functions
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
109
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
110 this.append = function(html, shouldScroll) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
111 // if we started this fragment with a consecuative message,
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
112 // cancel and output before we continue
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
113 if(self.isConsecutive) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
114 self.cancel();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
115 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
116 self.isConsecutive = false;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
117 rmInsertNode();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
118 var node = createHTMLNode(html);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
119 self.fragment.appendChild(node);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
120
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
121 node = null;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
122
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
123 setShouldScroll(shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
124 self.coalesce();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
125 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
126
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
127 this.appendNext = function(html, shouldScroll) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
128 if(undefined === self.isConsecutive)
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
129 self.isConsecutive = true;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
130 var node = createHTMLNode(html);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
131 var insert = self.fragment.querySelector("#insert");
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
132 if(insert) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
133 insert.parentNode.replaceChild(node, insert);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
134 } else {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
135 self.fragment.appendChild(node);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
136 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
137 node = null;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
138 setShouldScroll(shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
139 self.coalesce();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
140 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
141
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
142 this.replaceLast = function (html, shouldScroll) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
143 rmInsertNode();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
144 var node = createHTMLNode(html);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
145 var lastMessage = self.fragment.lastChild;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
146 lastMessage.parentNode.replaceChild(node, lastMessage);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
147 node = null;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
148 setShouldScroll(shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
149 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
150 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
151 var coalescedHTML;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
152
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
153 //Appending new content to the message view
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
154 function appendMessage(html) {
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
155 var shouldScroll;
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
156
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
157 // Only call nearBottom() if should scroll is undefined.
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
158 if(undefined === coalescedHTML.shouldScroll) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
159 shouldScroll = nearBottom();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
160 } else {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
161 shouldScroll = coalescedHTML.shouldScroll;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
162 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
163 appendMessageNoScroll(html, shouldScroll);
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
164 }
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
165
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
166 function appendMessageNoScroll(html, shouldScroll) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
167 shouldScroll = shouldScroll || false;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
168 // always try to coalesce new, non-griuped, messages
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
169 coalescedHTML.append(html, shouldScroll)
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
170 }
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
171
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
172 function appendNextMessage(html){
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
173 var shouldScroll;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
174 if(undefined === coalescedHTML.shouldScroll) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
175 shouldScroll = nearBottom();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
176 } else {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
177 shouldScroll = coalescedHTML.shouldScroll;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
178 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
179 appendNextMessageNoScroll(html, shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
180 }
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
181
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
182 function appendNextMessageNoScroll(html, shouldScroll){
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
183 shouldScroll = shouldScroll || false;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
184 // only group next messages if we're already coalescing input
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
185 coalescedHTML.appendNext(html, shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
186 }
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
187
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
188 function replaceLastMessage(html){
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
189 var shouldScroll;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
190 // only replace messages if we're already coalescing
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
191 if(coalescedHTML.isCoalescing){
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
192 if(undefined === coalescedHTML.shouldScroll) {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
193 shouldScroll = nearBottom();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
194 } else {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
195 shouldScroll = coalescedHTML.shouldScroll;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
196 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
197 coalescedHTML.replaceLast(html, shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
198 } else {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
199 shouldScroll = nearBottom();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
200 //Retrieve the current insertion point, then remove it
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
201 //This requires that there have been an insertion point... is there a better way to retrieve the last element? -evands
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
202 var insert = document.getElementById("insert");
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
203 if(insert){
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
204 var parentNode = insert.parentNode;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
205 parentNode.removeChild(insert);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
206 var lastMessage = document.getElementById("Chat").lastChild;
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
207 document.getElementById("Chat").removeChild(lastMessage);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
208 }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
209
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
210 //Now append the message itself
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
211 appendHTML(html);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
212
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
213 alignChat(shouldScroll);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
214 }
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
215 }
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
216
35894
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
217 var SCROLLMODE_UNKNOWN = 0;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
218 var SCROLLMODE_WEBKIT1 = 1;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
219 var SCROLLMODE_WEBKIT2 = 2;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
220 var scroll_mode = SCROLLMODE_UNKNOWN;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
221
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
222 function detectWebkitScrolling() {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
223 if (scroll_mode != SCROLLMODE_UNKNOWN)
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
224 return scroll_mode;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
225 if (document.body.scrollTop > 0)
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
226 scroll_mode = SCROLLMODE_WEBKIT1;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
227 if (document.documentElement.scrollTop > 0)
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
228 scroll_mode = SCROLLMODE_WEBKIT2;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
229 return scroll_mode;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
230 }
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
231
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
232 var stickyscroll_just_scrolled = false;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
233 var stickyscroll_just_scrolled_more = false;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
234 var stickyscroll_to_bottom = true;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
235 var stickyscroll_to_bottom_new = true;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
236
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
237 function windowDidScroll(ev) {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
238 if (stickyscroll_just_scrolled) {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
239 stickyscroll_just_scrolled_more = true;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
240 return;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
241 }
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
242
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
243 stickyscroll_just_scrolled = true;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
244 var update_to_bottom = function() {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
245 stickyscroll_to_bottom = stickyscroll_to_bottom_new;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
246
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
247 var mode = detectWebkitScrolling();
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
248 if (mode == SCROLLMODE_UNKNOWN || mode == SCROLLMODE_WEBKIT1) {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
249 stickyscroll_to_bottom_new = ( document.body.scrollTop >=
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
250 ( document.body.offsetHeight - (window.innerHeight + 20) ) );
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
251 } else { /* SCROLLMODE_WEBKIT2 */
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
252 stickyscroll_to_bottom_new = ( document.documentElement.scrollTop >=
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
253 ( document.documentElement.offsetHeight - (window.innerHeight + 20) ) );
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
254 }
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
255
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
256 if (stickyscroll_just_scrolled_more) {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
257 stickyscroll_just_scrolled_more = false;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
258 setTimeout(update_to_bottom, 10);
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
259 } else {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
260 stickyscroll_just_scrolled = false;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
261 }
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
262 };
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
263 setTimeout(update_to_bottom, 10);
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
264 }
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
265
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
266 //Auto-scroll to bottom. Use nearBottom to determine if a scrollToBottom is desired.
35895
bd19d3cd93e3 Fix a typo
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35894
diff changeset
267 function nearBottom() {
35894
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
268 return stickyscroll_to_bottom;
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
269 }
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
270 function scrollToBottom() {
35894
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
271 var mode = detectWebkitScrolling();
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
272
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
273 var scrollfunc;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
274 if (mode == SCROLLMODE_UNKNOWN || mode == SCROLLMODE_WEBKIT1) {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
275 scrollfunc = function() {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
276 document.body.scrollTop = document.body.offsetHeight;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
277 };
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
278 } else { /* SCROLLMODE_WEBKIT2 */
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
279 scrollfunc = function() {
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
280 document.documentElement.scrollTop =
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
281 document.documentElement.offsetHeight;
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
282 window.scrollTo(0, document.body.scrollHeight);
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
283 };
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
284 }
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
285
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
286 scrollfunc();
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
287 /* wait for content to load and scroll again */
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
288 setTimeout(scrollfunc, 10);
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
289 }
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
290
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
291 //Dynamically exchange the active stylesheet
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
292 function setStylesheet( id, url ) {
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
293 var code = "<style id=\"" + id + "\" type=\"text/css\" media=\"screen,print\">";
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
294 if( url.length )
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
295 code += "@import url( \"" + url + "\" );";
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
296 code += "</style>";
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
297 var range = document.createRange();
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
298 var head = document.getElementsByTagName( "head" ).item(0);
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
299 range.selectNode( head );
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
300 var documentFragment = range.createContextualFragment( code );
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
301 head.removeChild( document.getElementById( id ) );
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
302 head.appendChild( documentFragment );
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
303 }
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
304
32980
2e99ae2e1aba New branch for GSoC2012 project: Gadu-Gadu protocol plugin improvements.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32792
diff changeset
305 //If true is passed, view will be scrolled down
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
306 function alignChat(shouldScroll) {
35753
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
307 if (!shouldScroll)
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
308 return;
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
309
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
310 scrollToBottom();
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
311 }
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
312
35838
64f331a1eaa0 Drop remote smileys in favor of remote images
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35754
diff changeset
313 function remoteImageIsReady(id) {
35753
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
314 var shouldScroll = nearBottom();
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
315 var emoticons;
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
316
35754
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
317 /* There is a possible race condition: if we call this
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
318 * before the span.emoticon.pending is added, the latter
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
319 * won't be converted.
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
320 *
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
321 * We could avoid this, by calling it again using
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
322 * setTimeout, but it may affect performance. So, we
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
323 * won't do it until anyone complains.
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
324 */
b22f83f11582 Remote smileys: fix comments
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35753
diff changeset
325
35838
64f331a1eaa0 Drop remote smileys in favor of remote images
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35754
diff changeset
326 emoticons = document.getElementsByClassName(
64f331a1eaa0 Drop remote smileys in favor of remote images
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35754
diff changeset
327 'pending-image-id-' + id);
35753
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
328 for (var i = 0; i < emoticons.length; i++) {
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
329 var node = emoticons[i];
35838
64f331a1eaa0 Drop remote smileys in favor of remote images
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35754
diff changeset
330 var img = node.getElementsByTagName('img')[0];
64f331a1eaa0 Drop remote smileys in favor of remote images
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35754
diff changeset
331 img.setAttribute('src', PURPLE_IMAGE_STORE_PROTOCOL + id);
35753
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
332 node.parentNode.replaceChild(img, node);
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
333 }
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
334
222e69060b4a Remote smileys: display them even on the first time
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35751
diff changeset
335 alignChat(shouldScroll);
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
336 }
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
337
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
338 window.onresize = function windowDidResize(){
35894
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
339 alignChat(nearBottom());
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
340 }
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
341
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
342 function initStyle() {
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
343 alignChat(true);
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
344 if(!coalescedHTML)
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
345 coalescedHTML = new CoalescedHTML();
35894
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
346
4e65d4d56e34 WebKitGtk: fix scrolling in webkitgtk2 and resize bug in webkitgtk1&webkitgtk2
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35838
diff changeset
347 window.addEventListener('scroll', windowDidScroll);
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
348 }
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
349 </script>
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
350
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
351 <style type="text/css">
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
352 .actionMessageUserName { display:none; }
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
353 .actionMessageBody:before { content:"*"; }
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
354 .actionMessageBody:after { content:"*"; }
32980
2e99ae2e1aba New branch for GSoC2012 project: Gadu-Gadu protocol plugin improvements.
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32792
diff changeset
355 * { word-wrap:break-word }
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
356 img.scaledToFitImage { height: auto; max-width: 100%%; }
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
357 </style>
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
358
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
359 <!-- This style is shared by all variants. !-->
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
360 <style id="baseStyle" type="text/css" media="screen,print">
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
361 %@
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
362 </style>
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
363
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
364 <!-- Although we call this mainStyle for legacy reasons, it's actually the variant style !-->
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
365 <style id="mainStyle" type="text/css" media="screen,print">
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
366 @import url( "%@" );
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
367 </style>
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
368
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
369 </head>
32792
a5e427909389 Update Template.html from Adium's hg repo.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32676
diff changeset
370 <body onload="initStyle();" style="==bodyBackground==">
32444
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
371 %@
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
372 <div id="Chat">
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
373 </div>
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
374 %@
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
375 </body>
69e11efb2ba6 other files that missed my main major commit.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
376 </html>

mercurial