-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
149 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import inject | ||
from gi.repository import Adw, Gtk | ||
|
||
from cozy.view_model.playback_speed_view_model import PlaybackSpeedViewModel | ||
from cozy.ui.widgets.error_reporting import ErrorReporting | ||
from cozy.settings import ApplicationSettings | ||
|
||
|
||
@Gtk.Template.from_resource('/com/github/geigi/cozy/ui/welcome_dialog.ui') | ||
class WelcomeDialog(Adw.Dialog): | ||
__gtype_name__ = "WelcomeDialog" | ||
|
||
app_settings: ApplicationSettings = inject.attr(ApplicationSettings) | ||
|
||
carousel: Adw.Carousel = Gtk.Template.Child() | ||
welcome_page: Adw.StatusPage = Gtk.Template.Child() | ||
reporting_page: Gtk.Box = Gtk.Template.Child() | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.order = [self.welcome_page, self.reporting_page, self.welcome_page] | ||
|
||
@Gtk.Template.Callback() | ||
def deny_reporting(self, _): | ||
self.app_settings.report_level = 0 | ||
self.advance() | ||
|
||
@Gtk.Template.Callback() | ||
def accept_reporting(self, _): | ||
self.advance() | ||
|
||
def advance(self): | ||
self.carousel.scroll_to(self.order[int(self.carousel.get_position()) + 1], True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,174 +1,49 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
Adjustment verbose_adjustment { | ||
lower: 1; | ||
upper: 5; | ||
value: 3; | ||
step-increment: 1; | ||
page-increment: 1; | ||
page-size: 1; | ||
} | ||
|
||
template $ErrorReporting: Box { | ||
orientation: vertical; | ||
spacing: 10; | ||
|
||
styles [ | ||
"card", | ||
] | ||
|
||
Box header_box { | ||
halign: center; | ||
spacing: 15; | ||
spacing: 12; | ||
|
||
Label { | ||
halign: fill; | ||
hexpand: true; | ||
label: C_("Error and crash reporting dialog", "You can help us improve Cozy by contributing information in case of errors and crashes."); | ||
wrap: true; | ||
xalign: 0; | ||
} | ||
|
||
Label { | ||
label: _("User feedback"); | ||
wrap: true; | ||
Label { | ||
halign: fill; | ||
hexpand: true; | ||
label: C_("Error and crash reporting dialog", "Contributing this information is optional and completely anonymous. We will never collect personal data, files you import or any information that could identify you."); | ||
wrap: true; | ||
xalign: 0; | ||
} | ||
|
||
styles [ | ||
"title-3", | ||
] | ||
} | ||
Label { | ||
halign: fill; | ||
hexpand: true; | ||
label: C_("Error and crash reporting dialog", "Cozy is developed in the open, and the error reporting code can be inspected here:"); | ||
wrap: true; | ||
xalign: 0; | ||
} | ||
|
||
Image { | ||
pixel-size: 32; | ||
icon-name: 'book-alert-symbolic'; | ||
} | ||
LinkButton { | ||
label: _("Sourcecode on GitHub"); | ||
uri: "https://github.com/geigi/cozy/tree/master/cozy/report"; | ||
margin-bottom: 6; | ||
} | ||
|
||
ListBox { | ||
styles ["boxed-list"] | ||
selection-mode: none; | ||
activate-on-single-click: false; | ||
|
||
styles [ | ||
"transparent_bg", | ||
] | ||
|
||
ListBoxRow { | ||
activatable: false; | ||
selectable: false; | ||
|
||
child: Box { | ||
margin-start: 10; | ||
margin-end: 10; | ||
margin-top: 10; | ||
margin-bottom: 10; | ||
orientation: vertical; | ||
spacing: 10; | ||
|
||
Box { | ||
valign: center; | ||
orientation: vertical; | ||
spacing: 10; | ||
|
||
Label { | ||
halign: start; | ||
valign: center; | ||
label: C_("Error and crash reporting dialog", "You can help improve Cozy by contributing information in case of errors and crashes. "); | ||
wrap: true; | ||
xalign: 0; | ||
} | ||
|
||
Label { | ||
valign: center; | ||
label: C_("Error and crash reporting dialog", "Contributing this information is optional and completely anonymous. We will never collect personal data, files you import or any information that could identify you."); | ||
wrap: true; | ||
xalign: 0; | ||
} | ||
|
||
Label { | ||
valign: center; | ||
halign: start; | ||
label: C_("Error and crash reporting dialog", "Cozy is opensource and the user feedback source code can be inspected here: "); | ||
wrap: true; | ||
xalign: 0; | ||
} | ||
} | ||
|
||
Label { | ||
label: _("<a href=\"https://github.com/geigi/cozy/tree/master/cozy/report\">Sourcecode on GitHub</a>"); | ||
use-markup: true; | ||
} | ||
}; | ||
Adw.ComboRow detail_combo { | ||
title: "Detail Level"; | ||
} | ||
|
||
ListBoxRow { | ||
activatable: false; | ||
selectable: false; | ||
|
||
child: Separator { | ||
margin-start: 5; | ||
margin-end: 5; | ||
}; | ||
} | ||
|
||
ListBoxRow { | ||
activatable: false; | ||
selectable: false; | ||
|
||
child: Scale verbose_scale { | ||
focusable: true; | ||
margin-start: 20; | ||
margin-end: 20; | ||
margin-top: 10; | ||
margin-bottom: 10; | ||
adjustment: verbose_adjustment; | ||
restrict-to-fill-level: false; | ||
fill-level: 0; | ||
round-digits: 0; | ||
}; | ||
} | ||
|
||
ListBoxRow { | ||
activatable: false; | ||
selectable: false; | ||
|
||
child: Separator { | ||
margin-start: 5; | ||
margin-end: 5; | ||
}; | ||
} | ||
|
||
ListBoxRow { | ||
activatable: false; | ||
selectable: false; | ||
|
||
child: Box { | ||
halign: start; | ||
valign: center; | ||
margin-start: 10; | ||
margin-end: 10; | ||
margin-top: 10; | ||
margin-bottom: 10; | ||
orientation: vertical; | ||
spacing: 10; | ||
|
||
Label level_label { | ||
halign: start; | ||
label: _("Detailed error reporting with import errors"); | ||
wrap: true; | ||
xalign: 0; | ||
|
||
styles [ | ||
"heading", | ||
] | ||
} | ||
|
||
Label description_label { | ||
halign: start; | ||
valign: start; | ||
label: _("The following information will be sent in case of an error or crash:"); | ||
wrap: true; | ||
xalign: 0; | ||
} | ||
|
||
Label details_label { | ||
vexpand: true; | ||
halign: start; | ||
valign: start; | ||
wrap: true; | ||
} | ||
}; | ||
} | ||
Adw.ActionRow description {} | ||
} | ||
} | ||
} |
Oops, something went wrong.