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
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
Evert Mouw
gajim-plugins
Commits
f65f9d3b
Commit
f65f9d3b
authored
11 years ago
by
Dicson
Browse files
Options
Downloads
Patches
Plain Diff
UrlShortenerPlugin. coding style
parent
b0fc66bd
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
gui_for_me/gui_for_me.py
+1
-1
1 addition, 1 deletion
gui_for_me/gui_for_me.py
url_shortener/manifest.ini
+1
-1
1 addition, 1 deletion
url_shortener/manifest.ini
url_shortener/url_shortener.py
+4
-11
4 additions, 11 deletions
url_shortener/url_shortener.py
with
6 additions
and
13 deletions
gui_for_me/gui_for_me.py
+
1
−
1
View file @
f65f9d3b
...
...
@@ -56,7 +56,7 @@ class Base(object):
self
.
create_buttons
()
def
create_buttons
(
self
):
# create
juick
button
# create
/me
button
actions_hbox
=
self
.
chat_control
.
xml
.
get_object
(
'
actions_hbox
'
)
self
.
button
=
Gtk
.
Button
(
label
=
None
,
stock
=
None
,
use_underline
=
True
)
self
.
button
.
set_property
(
'
relief
'
,
Gtk
.
ReliefStyle
.
NONE
)
...
...
This diff is collapsed.
Click to expand it.
url_shortener/manifest.ini
+
1
−
1
View file @
f65f9d3b
[info]
name:
Url
Shortener
short_name:
url_shortener
version:
0.3.
2
version:
0.3.
3
description:
Plugin
that
allows
users
to
shorten
a
long
URL
in
messages.
For
example,
you
can
turn
this
link:
https://trac.gajim.org/timeline
...
...
This diff is collapsed.
Click to expand it.
url_shortener/url_shortener.py
+
4
−
11
View file @
f65f9d3b
...
...
@@ -32,13 +32,12 @@ class UrlShortenerPlugin(GajimPlugin):
'
MAX_CHARS
'
:
(
50
,
(
'
MAX_CHARS(30-...)
'
)),
'
IN_MAX_CHARS
'
:
(
50
,
(
'
MAX_CHARS(30-...)
'
)),
'
SHORTEN_OUTGOING
'
:
(
False
,
''
),}
self
.
events_handlers
[
'
message-outgoing
'
]
=
(
ged
.
OUT_PRECORE
,
self
.
handle_outgoing_msg
)
self
.
events_handlers
[
'
gc-message-outgoing
'
]
=
(
ged
.
OUT_PRECORE
,
self
.
handle_outgoing_msg
)
self
.
events_handlers
=
{
'
message-outgoing
'
:
(
ged
.
OUT_PRECORE
,
self
.
handle_outgoing_msg
)
,
'
gc-message-outgoing
'
:
(
ged
.
OUT_PRECORE
,
self
.
handle_outgoing_msg
)
}
self
.
chat_control
=
None
self
.
controls
=
[]
self
.
is_active
=
None
def
handle_outgoing_msg
(
self
,
event
):
if
not
self
.
active
:
...
...
@@ -99,12 +98,6 @@ class UrlShortenerPlugin(GajimPlugin):
control
.
disconnect_from_chat_control
()
self
.
controls
.
remove
(
control
)
def
activate
(
self
):
self
.
active
=
True
def
deactivate
(
self
):
self
.
active
=
False
class
Base
(
object
):
def
__init__
(
self
,
plugin
,
chat_control
):
...
...
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