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
9ed0edf3
Commit
9ed0edf3
authored
7 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Port ipython command from gajim-remote
parent
aec3a6df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gajim/app_actions.py
+12
-0
12 additions, 0 deletions
gajim/app_actions.py
gajim/gajim.py
+12
-0
12 additions, 0 deletions
gajim/gajim.py
with
24 additions
and
0 deletions
gajim/app_actions.py
+
12
−
0
View file @
9ed0edf3
...
...
@@ -274,3 +274,15 @@ class AppActions():
app
.
interface
.
handle_event
(
dict_
[
'
account
'
],
dict_
[
'
jid
'
],
dict_
[
'
type_
'
])
# Other Actions
def
toggle_ipython
(
self
,
action
,
param
):
"""
Show/hide the ipython window
"""
win
=
app
.
ipython_window
if
win
and
win
.
window
.
is_visible
():
win
.
present
()
else
:
app
.
interface
.
create_ipython_window
()
This diff is collapsed.
Click to expand it.
gajim/gajim.py
+
12
−
0
View file @
9ed0edf3
...
...
@@ -91,6 +91,9 @@ class GajimApplication(Gtk.Application):
self
.
add_main_option
(
'
warnings
'
,
ord
(
'
w
'
),
GLib
.
OptionFlags
.
NONE
,
GLib
.
OptionArg
.
NONE
,
_
(
'
Show all warnings
'
))
self
.
add_main_option
(
'
ipython
'
,
ord
(
'
i
'
),
GLib
.
OptionFlags
.
NONE
,
GLib
.
OptionArg
.
NONE
,
_
(
'
open ipython shell
'
))
self
.
connect
(
'
handle-local-options
'
,
self
.
_handle_local_options
)
self
.
connect
(
'
startup
'
,
self
.
_startup
)
...
...
@@ -294,6 +297,11 @@ class GajimApplication(Gtk.Application):
app_id
=
'
%s.%s
'
%
(
self
.
get_application_id
(),
profile
)
self
.
set_application_id
(
app_id
)
self
.
profile
=
profile
# Register the Application, so it knows if its primary or not
# This is needed so we can execute actions on the remote instance
self
.
register
(
None
)
if
options
.
contains
(
'
separate
'
):
self
.
profile_separation
=
True
if
options
.
contains
(
'
config-path
'
):
...
...
@@ -311,6 +319,9 @@ class GajimApplication(Gtk.Application):
logging_helpers
.
set_loglevels
(
loglevel
)
if
options
.
contains
(
'
warnings
'
):
self
.
show_warnings
()
if
options
.
contains
(
'
ipython
'
):
self
.
activate_action
(
'
ipython
'
)
return
0
return
-
1
def
show_warnings
(
self
):
...
...
@@ -386,6 +397,7 @@ class GajimApplication(Gtk.Application):
(
'
content
'
,
action
.
on_contents
),
(
'
about
'
,
action
.
on_about
),
(
'
faq
'
,
action
.
on_faq
),
(
'
ipython
'
,
action
.
toggle_ipython
),
]
act
=
Gio
.
SimpleAction
.
new
(
'
add-contact
'
,
GLib
.
VariantType
.
new
(
'
s
'
))
...
...
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