Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
L
live-installer
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
live-installer
Commits
2e1ffaf6
Kaydet (Commit)
2e1ffaf6
authored
Ock 15, 2020
tarafından
Clement Lefebvre
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix slideshow and partitions preview
Also add a slideshow test script
üst
a94e0e7f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
5 deletions
+81
-5
test-slideshow.py
test-slideshow.py
+2
-0
gtk_interface.py
usr/lib/live-installer/frontend/gtk_interface.py
+15
-3
test-slideshow.py
usr/lib/live-installer/test-slideshow.py
+47
-0
disk-partitions.html
usr/share/live-installer/disk-partitions.html
+1
-1
interface.ui
usr/share/live-installer/interface.ui
+16
-1
No files found.
test-slideshow.py
0 → 120000
Dosyayı görüntüle @
2e1ffaf6
usr
/
lib
/
live
-
installer
/
test
-
slideshow
.
py
\ No newline at end of file
usr/lib/live-installer/frontend/gtk_interface.py
Dosyayı görüntüle @
2e1ffaf6
...
...
@@ -250,19 +250,26 @@ class InstallerWindow:
self
.
window
.
fullscreen
()
# Initiate the slide show
# We have no significant browsing interface, so there isn't much point
# in WebKit creating a memory-hungry cache.
context
=
WebKit2
.
WebContext
.
get_default
()
context
.
set_cache_model
(
WebKit2
.
CacheModel
.
DOCUMENT_VIEWER
)
self
.
slideshow_path
=
"/usr/share/live-installer/slideshow"
if
os
.
path
.
exists
(
self
.
slideshow_path
):
self
.
slideshow_browser
=
WebKit2
.
WebView
()
s
=
self
.
slideshow_browser
.
get_settings
()
s
.
set_allow_file_access_from_file_urls
(
True
)
s
.
set_property
(
'enable-caret-browsing'
,
False
)
self
.
slideshow_browser
.
load_uri
(
"file://"
+
os
.
path
.
join
(
self
.
slideshow_path
,
'template.html'
))
self
.
builder
.
get_object
(
"vbox_install"
)
.
add
(
self
.
slideshow_browser
)
self
.
builder
.
get_object
(
"vbox_install"
)
.
show_all
()
self
.
builder
.
get_object
(
"scrolled_slideshow"
)
.
add
(
self
.
slideshow_browser
)
self
.
builder
.
get_object
(
"scrolled_slideshow"
)
.
show_all
()
self
.
slideshow_browser
.
connect
(
'context-menu'
,
self
.
on_context_menu
)
self
.
partitions_browser
=
WebKit2
.
WebView
()
s
=
self
.
partitions_browser
.
get_settings
()
s
.
set_allow_file_access_from_file_urls
(
True
)
#self.partitions_browser.set_transparent(True)
self
.
partitions_browser
.
show
()
self
.
partitions_browser
.
set_size_request
(
-
1
,
80
)
self
.
builder
.
get_object
(
"scrolled_partitions"
)
.
add
(
self
.
partitions_browser
)
self
.
window
.
show_all
()
...
...
@@ -270,6 +277,11 @@ class InstallerWindow:
# fix text wrap
self
.
fix_text_wrap
()
def
on_context_menu
(
self
,
unused_web_view
,
unused_context_menu
,
unused_event
,
unused_hit_test_result
):
# True will not show the menu
return
True
def
update_preview_cb
(
self
,
dialog
,
preview
):
filename
=
dialog
.
get_preview_filename
()
dialog
.
set_preview_widget_active
(
False
)
...
...
usr/lib/live-installer/test-slideshow.py
0 → 100755
Dosyayı görüntüle @
2e1ffaf6
#!/usr/bin/python2
import
sys
import
gi
import
os
from
slideshow
import
Slideshow
gi
.
require_version
(
"Gtk"
,
"3.0"
)
gi
.
require_version
(
"WebKit2"
,
"4.0"
)
from
gi.repository
import
Gtk
,
Gdk
,
WebKit2
def
on_context_menu
(
unused_web_view
,
unused_context_menu
,
unused_event
,
unused_hit_test_result
):
# True will not show the menu
return
True
resource_dir
=
'usr/share/live-installer/'
glade_file
=
os
.
path
.
join
(
resource_dir
,
'interface.ui'
)
builder
=
Gtk
.
Builder
()
builder
.
add_from_file
(
glade_file
)
# We have no significant browsing interface, so there isn't much point
# in WebKit creating a memory-hungry cache.
context
=
WebKit2
.
WebContext
.
get_default
()
context
.
set_cache_model
(
WebKit2
.
CacheModel
.
DOCUMENT_VIEWER
)
slideshow_path
=
"/usr/share/live-installer/slideshow"
webview
=
WebKit2
.
WebView
()
s
=
webview
.
get_settings
()
s
.
set_allow_file_access_from_file_urls
(
True
)
webview
.
connect
(
'context-menu'
,
on_context_menu
)
s
.
set_property
(
'enable-caret-browsing'
,
False
)
webview
.
load_uri
(
"file://"
+
os
.
path
.
join
(
slideshow_path
,
'template.html'
))
webview
.
show
()
builder
.
get_object
(
"scrolled_slideshow"
)
.
add
(
webview
)
slideshow
=
Slideshow
(
webview
,
slideshow_path
,
intervalSeconds
=
3
,
loopPages
=
True
)
slideshow
.
run
()
window
=
builder
.
get_object
(
"main_window"
)
builder
.
get_object
(
"notebook1"
)
.
set_current_page
(
1
)
window
.
show_all
()
window
.
connect
(
"destroy"
,
Gtk
.
main_quit
)
Gtk
.
main
()
usr/share/live-installer/disk-partitions.html
Dosyayı görüntüle @
2e1ffaf6
...
...
@@ -3,7 +3,7 @@
<style>
body
{
background-color
:
#
d6d6d6
;
background-color
:
#
f0f0f0
;
}
.partition
{
position
:
relative
;
...
...
usr/share/live-installer/interface.ui
Dosyayı görüntüle @
2e1ffaf6
...
...
@@ -1050,7 +1050,22 @@
</packing>
</child>
<child>
<placeholder/>
<object
class=
"GtkScrolledWindow"
id=
"scrolled_slideshow"
>
<property
name=
"height_request"
>
450
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hscrollbar_policy"
>
never
</property>
<property
name=
"vscrollbar_policy"
>
never
</property>
<property
name=
"shadow_type"
>
in
</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
...
...
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