Changes
6 changed files (+97/-104)
-
-
@@ -41,6 +41,7 @@ };const gresources = [_][]const u8{ "data/ui/server-list.ui", "data/ui/generic-error-dialog.ui", "data/ui/server-list-unexpected-error-dialog.ui", "data/ui/server-list-network-error-dialog.ui", };
-
-
-
@@ -19,6 +19,7 @@ --><gresources> <gresource prefix="/jp/pocka/plac/gtk-adwaita"> <file preprocess="xml-stripblanks">ui/server-list.ui</file> <file preprocess="xml-stripblanks">ui/generic-error-dialog.ui</file> <file preprocess="xml-stripblanks">ui/server-list-unexpected-error-dialog.ui</file> <file preprocess="xml-stripblanks">ui/server-list-network-error-dialog.ui</file> </gresource>
-
-
-
@@ -0,0 +1,67 @@<?xml version="1.0" encoding="utf-8"?> <!-- Copyright 2025 Shota FUJI Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. SPDX-License-Identifier: Apache-2.0 --> <interface> <template class="PlacGenericErrorDialog" parent="AdwDialog"> <property name="content-width">400</property> <child> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar" /> </child> <property name="content"> <object class="GtkBox"> <property name="orientation">vertical</property> <property name="spacing">4</property> <property name="margin-top">4</property> <property name="margin-bottom">16</property> <property name="margin-start">12</property> <property name="margin-end">12</property> <child> <object class="GtkLabel" id="description_label"> <property name="wrap">true</property> <property name="halign">start</property> <property name="natural-wrap-mode">none</property> <property name="xalign">0</property> </object> </child> <child> <object class="GtkLabel"> <property name="label">Details</property> <property name="margin-top">12</property> <property name="halign">start</property> <style> <class name="heading" /> </style> </object> </child> <child> <object class="GtkLabel" id="details_label"> <property name="wrap">true</property> <property name="halign">start</property> <property name="natural-wrap-mode">none</property> <property name="xalign">0</property> </object> </child> </object> </property> </object> </child> </template> </interface>
-
-
-
@@ -17,49 +17,9 @@SPDX-License-Identifier: Apache-2.0 --> <interface> <template class="PlacServerListNetworkErrorDialog" parent="AdwDialog"> <property name="content-width">500</property> <template class="PlacServerListNetworkErrorDialog" parent="PlacGenericErrorDialog"> <property name="title">Failed to scan Roon Servers</property> <child> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar" /> </child> <property name="content"> <object class="GtkBox"> <property name="orientation">vertical</property> <property name="spacing">4</property> <property name="margin-top">4</property> <property name="margin-bottom">16</property> <property name="margin-start">12</property> <property name="margin-end">12</property> <child> <object class="GtkLabel"> <property name="wrap">true</property> <property name="label">Unable to scan Roon Servers due to a network error. Check network connection and this software has permissions for network access.</property> <property name="halign">start</property> </object> </child> <child> <object class="GtkLabel"> <property name="label">Details</property> <property name="margin-top">12</property> <property name="halign">start</property> <style> <class name="heading" /> </style> </object> </child> <child> <object class="GtkLabel" id="details_label"> <property name="wrap">true</property> <property name="halign">start</property> </object> </child> </object> </property> </object> </child> <property name="description">Unable to scan Roon Servers due to a network error. Check network connection and this software has permissions for network access.</property> </template> </interface>
-
-
-
@@ -17,48 +17,8 @@SPDX-License-Identifier: Apache-2.0 --> <interface> <template class="PlacServerListUnexpectedErrorDialog" parent="AdwDialog"> <property name="content-width">500</property> <template class="PlacServerListUnexpectedErrorDialog" parent="PlacGenericErrorDialog"> <property name="title">Failed to scan Roon Servers</property> <child> <object class="AdwToolbarView"> <child type="top"> <object class="AdwHeaderBar" /> </child> <property name="content"> <object class="GtkBox"> <property name="orientation">vertical</property> <property name="spacing">4</property> <property name="margin-top">4</property> <property name="margin-bottom">16</property> <property name="margin-start">12</property> <property name="margin-end">12</property> <child> <object class="GtkLabel"> <property name="wrap">true</property> <property name="label">Encountered an unexpected error during scan operation. Scan again to see if the problem resolves.</property> <property name="halign">start</property> </object> </child> <child> <object class="GtkLabel"> <property name="label">Details</property> <property name="margin-top">12</property> <property name="halign">start</property> <style> <class name="heading" /> </style> </object> </child> <child> <object class="GtkLabel" id="details_label"> <property name="wrap">true</property> <property name="halign">start</property> </object> </child> </object> </property> </object> </child> <property name="description">Encountered an unexpected error during scan operation. Scan again to see if the problem resolves.</property> </template> </interface>
-
-
-
@@ -33,6 +33,28 @@ return new App().run(args);} } [GtkTemplate(ui = "/jp/pocka/plac/gtk-adwaita/ui/generic-error-dialog.ui")] class GenericErrorDialog : Adw.Dialog { [GtkChild] private unowned Gtk.Label description_label; [GtkChild] private unowned Gtk.Label details_label; public string description { get { return description_label.label; } set { description_label.label = value; } } public string details { get { return details_label.label; } set { details_label.label = value; } } public GenericErrorDialog() { Object(); } } public errordomain ScanError { UNEXPECTED_ERROR, NETWORK_ERROR,
-
@@ -181,34 +203,16 @@ }} [GtkTemplate(ui = "/jp/pocka/plac/gtk-adwaita/ui/server-list-unexpected-error-dialog.ui")] class ServerListUnexpectedErrorDialog : Adw.Dialog { [GtkChild] private unowned Gtk.Label details_label; public string details { get; construct; } class ServerListUnexpectedErrorDialog : GenericErrorDialog { public ServerListUnexpectedErrorDialog(string details) { Object(details: details); } construct { details_label.label = details; } } [GtkTemplate(ui = "/jp/pocka/plac/gtk-adwaita/ui/server-list-network-error-dialog.ui")] class ServerListNetworkErrorDialog : Adw.Dialog { [GtkChild] private unowned Gtk.Label details_label; public string details { get; construct; } class ServerListNetworkErrorDialog : GenericErrorDialog { public ServerListNetworkErrorDialog(string details) { Object(details: details); } construct { details_label.label = details; } } }
-