Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim-plugins
Commits
f65f9d3b
Commit
f65f9d3b
authored
Aug 15, 2013
by
Dicson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UrlShortenerPlugin. coding style
parent
b0fc66bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
13 deletions
+6
-13
gui_for_me/gui_for_me.py
gui_for_me/gui_for_me.py
+1
-1
url_shortener/manifest.ini
url_shortener/manifest.ini
+1
-1
url_shortener/url_shortener.py
url_shortener/url_shortener.py
+4
-11
No files found.
gui_for_me/gui_for_me.py
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
)
...
...
url_shortener/manifest.ini
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
...
...
url_shortener/url_shortener.py
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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment