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
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
178
Issues
178
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poezio
poezio
Commits
ed5f7b18
Commit
ed5f7b18
authored
Apr 02, 2016
by
Link Mauve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the global Win._win_core, instead pass core to the two *GlobalInfoBar.
parent
b08688c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
12 deletions
+6
-12
poezio/core/core.py
poezio/core/core.py
+2
-2
poezio/windows/base_wins.py
poezio/windows/base_wins.py
+0
-8
poezio/windows/info_bar.py
poezio/windows/info_bar.py
+4
-2
No files found.
poezio/core/core.py
View file @
ed5f7b18
...
...
@@ -86,7 +86,7 @@ class Core(object):
self
.
information_buffer
.
add_window
(
self
.
information_win
)
self
.
left_tab_win
=
None
self
.
tab_win
=
windows
.
GlobalInfoBar
()
self
.
tab_win
=
windows
.
GlobalInfoBar
(
self
)
# Whether the XML tab is opened
self
.
xml_tab
=
None
self
.
xml_buffer
=
TextBuffer
()
...
...
@@ -1641,7 +1641,7 @@ class Core(object):
except
:
log
.
error
(
'Curses error on infobar resize'
,
exc_info
=
True
)
return
self
.
left_tab_win
=
windows
.
VerticalGlobalInfoBar
(
truncated_win
)
self
.
left_tab_win
=
windows
.
VerticalGlobalInfoBar
(
self
,
truncated_win
)
elif
not
self
.
size
.
core_degrade_y
:
self
.
tab_win
.
resize
(
1
,
tabs
.
Tab
.
width
,
tabs
.
Tab
.
height
-
2
,
0
)
...
...
poezio/windows/base_wins.py
View file @
ed5f7b18
...
...
@@ -34,7 +34,6 @@ class DummyWin(object):
return
False
class
Win
(
object
):
_win_core
=
None
_tab_win
=
None
def
__init__
(
self
):
self
.
_win
=
None
...
...
@@ -149,10 +148,3 @@ class Win(object):
self
.
addnstr
(
' '
*
size
,
size
,
to_curses_attr
(
color
))
else
:
self
.
addnstr
(
' '
*
size
,
size
)
@
property
def
core
(
self
):
if
not
Win
.
_win_core
:
Win
.
_win_core
=
singleton
.
Singleton
(
core
.
Core
)
return
Win
.
_win_core
poezio/windows/info_bar.py
View file @
ed5f7b18
...
...
@@ -16,8 +16,9 @@ from . import Win
from
theming
import
get_theme
,
to_curses_attr
class
GlobalInfoBar
(
Win
):
def
__init__
(
self
):
def
__init__
(
self
,
core
):
Win
.
__init__
(
self
)
self
.
core
=
core
def
refresh
(
self
):
log
.
debug
(
'Refresh: %s'
,
self
.
__class__
.
__name__
)
...
...
@@ -62,8 +63,9 @@ class GlobalInfoBar(Win):
self
.
_refresh
()
class
VerticalGlobalInfoBar
(
Win
):
def
__init__
(
self
,
scr
):
def
__init__
(
self
,
core
,
scr
):
Win
.
__init__
(
self
)
self
.
core
=
core
self
.
_win
=
scr
def
refresh
(
self
):
...
...
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