Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
gajim
gajim-plugins
Commits
779ab728
Commit
779ab728
authored
13 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
MsgBoxSizePlugin enabled
parent
6164063e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
message_box_size/manifest.ini
+1
-1
1 addition, 1 deletion
message_box_size/manifest.ini
message_box_size/msg_box_size.py
+7
-20
7 additions, 20 deletions
message_box_size/msg_box_size.py
with
8 additions
and
21 deletions
message_box_size/manifest.ini
+
1
−
1
View file @
779ab728
[info]
[info]
name:
Message
Box
Size
name:
Message
Box
Size
short_name:
message_box_size
short_name:
message_box_size
#
version: 0.1
version:
0.1
description:
Allows
you
to
adjust
the
height
of
the
new
message
input
field.
description:
Allows
you
to
adjust
the
height
of
the
new
message
input
field.
authors:
Denis
Fomin
<fominde@gmail.com>
authors:
Denis
Fomin
<fominde@gmail.com>
homepage:
http://trac-plugins.gajim.org/wiki/JuickPlugin
homepage:
http://trac-plugins.gajim.org/wiki/JuickPlugin
This diff is collapsed.
Click to expand it.
message_box_size/msg_box_size.py
+
7
−
20
View file @
779ab728
...
@@ -37,37 +37,24 @@ class MsgBoxSizePlugin(GajimPlugin):
...
@@ -37,37 +37,24 @@ class MsgBoxSizePlugin(GajimPlugin):
class
Base
(
object
):
class
Base
(
object
):
def
__init__
(
self
,
plugin
,
chat_control
):
def
__init__
(
self
,
plugin
,
chat_control
):
if
plugin
.
config
[
'
Do_not_resize
'
]:
chat_control
.
msg_textview
.
set_property
(
'
height-request
'
,
chat_control
.
msg_textview
.
set_property
(
'
height-request
'
,
plugin
.
config
[
'
Message_box_size
'
])
plugin
.
config
[
'
Message_box_size
'
])
id_
=
chat_control
.
msg_textview
.
connect
(
'
size-request
'
,
id_
=
chat_control
.
msg_textview
.
connect
(
'
size-request
'
,
self
.
size_request
)
self
.
size_request
)
chat_control
.
handlers
[
id_
]
=
chat_control
.
msg_textview
chat_control
.
handlers
[
id_
]
=
chat_control
.
msg_textview
self
.
chat_control
=
chat_control
self
.
chat_control
=
chat_control
self
.
plugin
=
plugin
self
.
plugin
=
plugin
self
.
scrolledwindow
=
chat_control
.
conv_scrolledwindow
def
size_request
(
self
,
msg_textview
,
requisition
):
def
size_request
(
self
,
msg_textview
,
requisition
):
if
msg_textview
.
window
is
None
:
return
if
self
.
plugin
.
config
[
'
Do_not_resize
'
]:
if
self
.
plugin
.
config
[
'
Do_not_resize
'
]:
self
.
chat_control
.
conv_scrolledwindow
.
set_property
(
'
height-request
'
,
self
.
chat_control
.
conv_scrolledwindow
.
allocation
.
height
)
self
.
chat_control
.
msg_scrolledwindow
.
set_property
(
self
.
chat_control
.
msg_scrolledwindow
.
set_property
(
'
vscrollbar-policy
'
,
gtk
.
POLICY_AUTOMATIC
)
'
vscrollbar-policy
'
,
gtk
.
POLICY_AUTOMATIC
)
elif
requisition
.
height
>
self
.
plugin
.
config
[
'
Message_box_size
'
]:
msg_textview
.
set_property
(
'
height-request
'
,
requisition
.
height
)
else
:
else
:
if
requisition
.
height
<
self
.
plugin
.
config
[
'
Message_box_size
'
]:
msg_textview
.
set_property
(
'
height-request
'
,
allc
=
self
.
chat_control
.
msg_textview
.
allocation
self
.
plugin
.
config
[
'
Message_box_size
'
])
allc
.
height
=
self
.
plugin
.
config
[
'
Message_box_size
'
]
msg_textview
.
set_size_request
(
allc
.
width
,
allc
.
height
)
else
:
new_req
=
self
.
scrolledwindow
.
allocation
.
height
-
(
requisition
.
height
-
self
.
plugin
.
config
[
'
Message_box_size
'
])
if
new_req
>
1
:
self
.
scrolledwindow
.
set_property
(
'
height-request
'
,
new_req
)
self
.
chat_control
.
msg_textview
.
set_property
(
'
height-request
'
,
-
1
)
def
disconnect_from_chat_control
(
self
):
def
disconnect_from_chat_control
(
self
):
pass
pass
...
@@ -82,7 +69,7 @@ class MsgBoxSizePluginConfigDialog(GajimPluginConfigDialog):
...
@@ -82,7 +69,7 @@ class MsgBoxSizePluginConfigDialog(GajimPluginConfigDialog):
self
.
xml
.
add_objects_from_file
(
self
.
GTK_BUILDER_FILE_PATH
,
[
'
vbox1
'
])
self
.
xml
.
add_objects_from_file
(
self
.
GTK_BUILDER_FILE_PATH
,
[
'
vbox1
'
])
self
.
checkbutton
=
self
.
xml
.
get_object
(
'
checkbutton
'
)
self
.
checkbutton
=
self
.
xml
.
get_object
(
'
checkbutton
'
)
self
.
spinbutton
=
self
.
xml
.
get_object
(
'
message_box_size
'
)
self
.
spinbutton
=
self
.
xml
.
get_object
(
'
message_box_size
'
)
self
.
spinbutton
.
get_adjustment
().
set_all
(
20
,
1
5
,
3
20
,
1
,
10
,
0
)
self
.
spinbutton
.
get_adjustment
().
set_all
(
20
,
1
6
,
2
0
0
,
1
,
10
,
0
)
vbox
=
self
.
xml
.
get_object
(
'
vbox1
'
)
vbox
=
self
.
xml
.
get_object
(
'
vbox1
'
)
self
.
child
.
pack_start
(
vbox
)
self
.
child
.
pack_start
(
vbox
)
...
...
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