Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
59050d41
Commit
59050d41
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
get_nb_line becomes get_no_of_lines; marked for translation title in history window
parent
d29d825a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/gajim.py
+1
-0
1 addition, 0 deletions
src/common/gajim.py
src/history_window.py
+19
-20
19 additions, 20 deletions
src/history_window.py
src/tabbed_chat_window.py
+1
-1
1 addition, 1 deletion
src/tabbed_chat_window.py
with
21 additions
and
21 deletions
src/common/gajim.py
+
1
−
0
View file @
59050d41
...
...
@@ -84,6 +84,7 @@ def get_contact_instances_from_jid(account, jid):
return
contacts_instances
def
get_first_contact_instance_from_jid
(
account
,
jid
):
print
'
jIIIIIIIIIIIIIIIIIIID
'
,
jid
if
jid
in
contacts
[
account
]:
contact
=
contacts
[
account
][
jid
][
0
]
else
:
# it's fake jid
...
...
This diff is collapsed.
Click to expand it.
src/history_window.py
+
19
−
20
View file @
59050d41
...
...
@@ -48,8 +48,8 @@ class HistoryWindow:
self
.
forward_button
.
set_sensitive
(
True
)
self
.
latest_button
.
set_sensitive
(
True
)
end
=
50
if
end
>
self
.
n
b
_line
:
end
=
self
.
n
b
_line
if
end
>
self
.
n
o_of
_line
s
:
end
=
self
.
n
o_of
_line
s
nb
,
lines
=
gajim
.
logger
.
read
(
self
.
jid
,
0
,
end
)
self
.
set_buttons_sensitivity
(
nb
)
for
line
in
lines
:
...
...
@@ -67,8 +67,8 @@ class HistoryWindow:
if
begin
<
0
:
begin
=
0
end
=
begin
+
50
if
end
>
self
.
n
b
_line
:
end
=
self
.
n
b
_line
if
end
>
self
.
n
o_of
_line
s
:
end
=
self
.
n
o_of
_line
s
nb
,
lines
=
gajim
.
logger
.
read
(
self
.
jid
,
begin
,
end
)
self
.
set_buttons_sensitivity
(
nb
)
for
line
in
lines
:
...
...
@@ -83,11 +83,11 @@ class HistoryWindow:
self
.
forward_button
.
set_sensitive
(
True
)
self
.
latest_button
.
set_sensitive
(
True
)
begin
=
self
.
num_begin
+
50
if
begin
>
self
.
n
b
_line
:
begin
=
self
.
n
b
_line
if
begin
>
self
.
n
o_of
_line
s
:
begin
=
self
.
n
o_of
_line
s
end
=
begin
+
50
if
end
>
self
.
n
b
_line
:
end
=
self
.
n
b
_line
if
end
>
self
.
n
o_of
_line
s
:
end
=
self
.
n
o_of
_line
s
nb
,
lines
=
gajim
.
logger
.
read
(
self
.
jid
,
begin
,
end
)
self
.
set_buttons_sensitivity
(
nb
)
for
line
in
lines
:
...
...
@@ -101,10 +101,10 @@ class HistoryWindow:
self
.
previous_button
.
set_sensitive
(
True
)
self
.
forward_button
.
set_sensitive
(
False
)
self
.
latest_button
.
set_sensitive
(
False
)
begin
=
self
.
n
b
_line
-
50
begin
=
self
.
n
o_of
_line
s
-
50
if
begin
<
0
:
begin
=
0
nb
,
lines
=
gajim
.
logger
.
read
(
self
.
jid
,
begin
,
self
.
n
b
_line
)
nb
,
lines
=
gajim
.
logger
.
read
(
self
.
jid
,
begin
,
self
.
n
o_of
_line
s
)
self
.
set_buttons_sensitivity
(
nb
)
for
line
in
lines
:
self
.
new_line
(
line
[
0
],
line
[
1
],
line
[
2
:])
...
...
@@ -114,7 +114,7 @@ class HistoryWindow:
if
nb
==
50
:
self
.
earliest_button
.
set_sensitive
(
False
)
self
.
previous_button
.
set_sensitive
(
False
)
if
nb
==
self
.
n
b
_line
:
if
nb
==
self
.
n
o_of
_line
s
:
self
.
forward_button
.
set_sensitive
(
False
)
self
.
latest_button
.
set_sensitive
(
False
)
...
...
@@ -152,7 +152,7 @@ class HistoryWindow:
tag_name
=
'
outgoing
'
else
:
status_msg
=
'
:
'
.
join
(
data
[
1
:])
msg
=
_
(
'
Status is now:
'
)
+
data
[
0
]
+
'
:
'
+
status_msg
msg
=
_
(
'
Status is now:
%s: %s
'
)
%
(
data
[
0
],
status_msg
)
tag_msg
=
'
status
'
if
name
:
...
...
@@ -169,15 +169,14 @@ class HistoryWindow:
self
.
plugin
=
plugin
self
.
jid
=
jid
self
.
account
=
account
self
.
n
b
_line
=
gajim
.
logger
.
get_n
b
_line
(
jid
)
self
.
n
o_of
_line
s
=
gajim
.
logger
.
get_n
o_of
_line
s
(
jid
)
xml
=
gtk
.
glade
.
XML
(
GTKGUI_GLADE
,
'
history_window
'
,
APP
)
self
.
window
=
xml
.
get_widget
(
'
history_window
'
)
if
account
and
gajim
.
contacts
[
account
].
has_key
(
jid
):
contacts_list
=
gajim
.
contacts
[
account
][
self
.
jid
]
user
=
contacts_list
[
0
]
title
=
'
Conversation History with
'
+
user
.
name
contact
=
gajim
.
get_first_contact_instance_from_jid
(
account
,
jid
)
title
=
_
(
'
Conversation History with %s
'
)
%
contact
.
name
else
:
title
=
'
Conversation History with
'
+
jid
title
=
_
(
'
Conversation History with
%s
'
)
%
jid
self
.
window
.
set_title
(
title
)
self
.
history_buffer
=
xml
.
get_widget
(
'
history_textview
'
).
get_buffer
()
self
.
earliest_button
=
xml
.
get_widget
(
'
earliest_button
'
)
...
...
@@ -199,9 +198,9 @@ class HistoryWindow:
tag
.
set_property
(
'
foreground
'
,
color
)
begin
=
0
if
self
.
n
b
_line
>
50
:
begin
=
self
.
n
b
_line
-
50
nb
,
lines
=
gajim
.
logger
.
read
(
self
.
jid
,
begin
,
self
.
n
b
_line
)
if
self
.
n
o_of
_line
s
>
50
:
begin
=
self
.
n
o_of
_line
s
-
50
nb
,
lines
=
gajim
.
logger
.
read
(
self
.
jid
,
begin
,
self
.
n
o_of
_line
s
)
self
.
set_buttons_sensitivity
(
nb
)
for
line
in
lines
:
self
.
new_line
(
line
[
0
],
line
[
1
],
line
[
2
:])
...
...
This diff is collapsed.
Click to expand it.
src/tabbed_chat_window.py
+
1
−
1
View file @
59050d41
...
...
@@ -654,7 +654,7 @@ class TabbedChatWindow(chat.Chat):
pos
=
0
#position, while reading from history
size
=
0
#how many lines we alreay retreived
lines
=
[]
#we'll need to reverse the lines from history
count
=
gajim
.
logger
.
get_n
b
_line
(
jid
)
count
=
gajim
.
logger
.
get_n
o_of
_line
s
(
jid
)
if
gajim
.
awaiting_messages
[
self
.
account
].
has_key
(
jid
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment