ALT Linux Bugzilla
– Attachment 19136 Details for
Bug 55271
[gnome-software] Добавить функционал предупреждения при использовании непроверенных репозиториев flatpak
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Patch with feature realization
good.patch (text/plain), 7.42 KB, created by
Alex
on 2025-07-18 17:43:40 MSK
(
hide
)
Description:
Patch with feature realization
Filename:
MIME Type:
Creator:
Alex
Created:
2025-07-18 17:43:40 MSK
Size:
7.42 KB
patch
obsolete
>diff --git a/data/org.gnome.software.gschema.xml b/data/org.gnome.software.gschema.xml >index 2bc33c72f..0c3956454 100644 >--- a/data/org.gnome.software.gschema.xml >+++ b/data/org.gnome.software.gschema.xml >@@ -1,5 +1,13 @@ > <schemalist> > <schema id="org.gnome.software" path="/org/gnome/software/" gettext-domain="gnome-software"> >+ <key name="enable-hostname-whitelist" type="b"> >+ <default>true</default> >+ </key> >+ <key name="hostname-whitelist" type="as"> >+ <default>[]</default> >+ <summary>A list of trusted origin hostnames</summary> >+ <description>If enable-hostname-whitelist</description> >+ </key> > <key name="compatible-projects" type="as"> > <default>['GNOME', 'KDE', 'XFCE']</default> > <summary>A list of compatible projects</summary> >diff --git a/po/ru.po b/po/ru.po >index 9ed79103c..4645820e6 100644 >--- a/po/ru.po >+++ b/po/ru.po >@@ -25,6 +25,12 @@ msgstr "" > "n%100>=20) ? 1 : 2);\n" > "X-Generator: Poedit 3.6\n" > >+msgid "This application is distributed through a third party source!" >+msgstr "ÐÑиложение ÑаÑпÑоÑÑÑанÑеÑÑÑ Ð¸Ð· ÑÑоÑоннего иÑÑоÑника!" >+ >+msgid "Use caution when accessing third party content shown here, as it may contain executable code that hasn't been tested by %s for safety, stability, or quality." >+msgstr "ÐÑдÑÑе оÑÑоÑÐ¾Ð¶Ð½Ñ Ð¿Ñи иÑполÑзовании ÑÑоÑÐ¾Ð½Ð½Ð¸Ñ Ð¼Ð°ÑеÑиалов: Ñакие маÑеÑÐ¸Ð°Ð»Ñ Ð¼Ð¾Ð³ÑÑ ÑодеÑжаÑÑ Ð¸ÑполнÑемÑй код, коÑоÑÑй не бÑл пÑоÑеÑÑиÑован ÑазÑабоÑÑиками %s на пÑÐµÐ´Ð¼ÐµÑ Ð±ÐµÐ·Ð¾Ð¿Ð°ÑноÑÑи, ÑÑабилÑноÑÑи или каÑеÑÑва." >+ > # пеÑевод по аналогии Ñ ubuntu software - ÑенÑÑ Ð¿Ñиложений ubuntu > #: data/metainfo/org.gnome.Software.metainfo.xml.in:7 src/gs-shell.ui:35 > #: src/org.gnome.Software.desktop.in:3 >diff --git a/src/gs-details-page.c b/src/gs-details-page.c >index a77d6532b..0fc8fdee3 100644 >--- a/src/gs-details-page.c >+++ b/src/gs-details-page.c >@@ -135,6 +135,8 @@ struct _GsDetailsPage > GtkWidget *button_update; > GtkWidget *button_remove; > GsProgressButton *button_cancel; >+ GtkWidget *infobar_details_untrusted; >+ GtkWidget *infobar_details_label_untrusted; > GtkWidget *infobar_details_eol; > GtkWidget *label_eol; > GtkWidget *infobar_details_problems_label; >@@ -1304,6 +1306,27 @@ gs_details_page_refresh_all (GsDetailsPage *self) > const gchar *tmp; > g_autoptr(GPtrArray) version_history = NULL; > gboolean link_rows_visible; >+ gboolean show_untrusted_card = FALSE; >+ >+ tmp = gs_app_get_origin_hostname(self->app); >+ if (g_settings_get_boolean(self->settings, "enable-hostname-whitelist") && gs_app_get_bundle_kind(self->app) != AS_BUNDLE_KIND_PACKAGE) { >+ if (tmp != NULL && tmp[0] != '\0') { >+ if (!g_strv_contains((const gchar * const*) g_settings_get_strv(self->settings, "hostname-whitelist"), tmp)) { >+ show_untrusted_card = TRUE; >+ } >+ } else { >+ show_untrusted_card = TRUE; >+ } >+ } >+ >+ gtk_label_set_label( >+ GTK_LABEL(self->infobar_details_label_untrusted), >+ g_strdup_printf( >+ _("Use caution when accessing third party content shown here, as it may contain executable code that hasn't been tested by %s for safety, stability, or quality."), >+ g_get_os_info(G_OS_INFO_KEY_NAME) >+ ) >+ ); >+ gtk_widget_set_visible(self->infobar_details_untrusted, show_untrusted_card); > > /* change widgets */ > tmp = gs_app_get_name (self->app); >@@ -2780,6 +2803,8 @@ gs_details_page_class_init (GsDetailsPageClass *klass) > gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_update); > gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_remove); > gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_cancel); >+ gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_untrusted); >+ gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_label_untrusted); > gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_eol); > gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_eol); > gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_problems_label); >diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui >index 460ea926c..3d98bc9fc 100644 >--- a/src/gs-details-page.ui >+++ b/src/gs-details-page.ui >@@ -390,6 +390,44 @@ > </object> > </child> > >+ <child> >+ <object class="AdwClamp"> >+ <property name="visible" bind-source="infobar_details_untrusted" bind-property="visible" bind-flags="sync-create"/> >+ <property name="maximum-size">860</property> >+ <!-- ~â of the maximum size. --> >+ <property name="tightening-threshold">576</property> >+ <property name="margin-start">12</property> >+ <property name="margin-end">12</property> >+ <child> >+ <object class="GtkBox" id="infobar_details_untrusted"> >+ <property name="orientation">vertical</property> >+ <child> >+ <object class="GtkLabel"> >+ <property name="justify">center</property> >+ <property name="label" translatable="yes">This application is distributed through a third party source!</property> >+ <property name="wrap">True</property> >+ <style> >+ <class name="heading"/> >+ </style> >+ </object> >+ </child> >+ <child> >+ <object class="GtkLabel" id="infobar_details_label_untrusted"> >+ <property name="justify">center</property> >+ <property name="label"></property> >+ <property name="wrap">True</property> >+ </object> >+ </child> >+ <style> >+ <class name="card"/> >+ <class name="error"/> >+ <class name="infobox"/> >+ </style> >+ </object> >+ </child> >+ </object> >+ </child> >+ > <child> > <object class="AdwClamp"> > <property name="maximum-size">860</property> >diff --git a/src/style.css b/src/style.css >index 9790ceed2..f36e9c5a4 100644 >--- a/src/style.css >+++ b/src/style.css >@@ -202,6 +202,11 @@ clamp.large .category-tile:not(.category-tile-iconless) { > color: @window_fg_color; > } > >+.card.error { >+ background-color: mix(@error_bg_color, @window_bg_color, .7); >+ color: @window_fg_color; >+} >+ > .infobox { > border-spacing: 6px; > padding: 12px;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55271
: 19136