View | Details | Raw Unified | Return to bug 55271
Collapse All | Expand All

(-)a/data/org.gnome.software.gschema.xml (+8 lines)
Lines 1-5 Link Here
1
<schemalist>
1
<schemalist>
2
  <schema id="org.gnome.software" path="/org/gnome/software/" gettext-domain="gnome-software">
2
  <schema id="org.gnome.software" path="/org/gnome/software/" gettext-domain="gnome-software">
3
    <key name="enable-hostname-whitelist" type="b">
4
      <default>true</default>
5
    </key>
6
    <key name="hostname-whitelist" type="as">
7
      <default>[]</default>
8
      <summary>A list of trusted origin hostnames</summary>
9
      <description>If enable-hostname-whitelist</description>
10
    </key>
3
    <key name="compatible-projects" type="as">
11
    <key name="compatible-projects" type="as">
4
      <default>['GNOME', 'KDE', 'XFCE']</default>
12
      <default>['GNOME', 'KDE', 'XFCE']</default>
5
      <summary>A list of compatible projects</summary>
13
      <summary>A list of compatible projects</summary>
(-)a/po/ru.po (+6 lines)
Lines 25-30 msgstr "" Link Here
25
"n%100>=20) ? 1 : 2);\n"
25
"n%100>=20) ? 1 : 2);\n"
26
"X-Generator: Poedit 3.6\n"
26
"X-Generator: Poedit 3.6\n"
27
27
28
msgid "This application is distributed through a third party source!"
29
msgstr "Приложение распространяется из стороннего источника!"
30
31
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."
32
msgstr "Будьте осторожны при использовании сторонних материалов: такие материалы могут содержать исполняемый код, который не был протестирован разработчиками %s на предмет безопасности, стабильности или качества."
33
28
#  перевод по аналогии с ubuntu software - центр приложений ubuntu
34
#  перевод по аналогии с ubuntu software - центр приложений ubuntu
29
#: data/metainfo/org.gnome.Software.metainfo.xml.in:7 src/gs-shell.ui:35
35
#: data/metainfo/org.gnome.Software.metainfo.xml.in:7 src/gs-shell.ui:35
30
#: src/org.gnome.Software.desktop.in:3
36
#: src/org.gnome.Software.desktop.in:3
(-)a/src/gs-details-page.c (+25 lines)
Lines 135-140 struct _GsDetailsPage Link Here
135
	GtkWidget		*button_update;
135
	GtkWidget		*button_update;
136
	GtkWidget		*button_remove;
136
	GtkWidget		*button_remove;
137
	GsProgressButton	*button_cancel;
137
	GsProgressButton	*button_cancel;
138
	GtkWidget		*infobar_details_untrusted;
139
	GtkWidget		*infobar_details_label_untrusted;
138
	GtkWidget		*infobar_details_eol;
140
	GtkWidget		*infobar_details_eol;
139
	GtkWidget		*label_eol;
141
	GtkWidget		*label_eol;
140
	GtkWidget		*infobar_details_problems_label;
142
	GtkWidget		*infobar_details_problems_label;
Lines 1304-1309 gs_details_page_refresh_all (GsDetailsPage *self) Link Here
1304
	const gchar *tmp;
1306
	const gchar *tmp;
1305
	g_autoptr(GPtrArray) version_history = NULL;
1307
	g_autoptr(GPtrArray) version_history = NULL;
1306
	gboolean link_rows_visible;
1308
	gboolean link_rows_visible;
1309
	gboolean show_untrusted_card = FALSE;
1310
1311
	tmp = gs_app_get_origin_hostname(self->app);
1312
	if (g_settings_get_boolean(self->settings, "enable-hostname-whitelist") && gs_app_get_bundle_kind(self->app) != AS_BUNDLE_KIND_PACKAGE) {
1313
		if (tmp != NULL && tmp[0] != '\0') {
1314
			if (!g_strv_contains((const gchar * const*) g_settings_get_strv(self->settings, "hostname-whitelist"), tmp)) {
1315
				show_untrusted_card = TRUE;
1316
			}
1317
		} else {
1318
			show_untrusted_card = TRUE;
1319
		}
1320
	}
1321
1322
	gtk_label_set_label(
1323
		GTK_LABEL(self->infobar_details_label_untrusted),
1324
		g_strdup_printf(
1325
			_("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."),
1326
			g_get_os_info(G_OS_INFO_KEY_NAME)
1327
		)
1328
	);
1329
	gtk_widget_set_visible(self->infobar_details_untrusted, show_untrusted_card);
1307
1330
1308
	/* change widgets */
1331
	/* change widgets */
1309
	tmp = gs_app_get_name (self->app);
1332
	tmp = gs_app_get_name (self->app);
Lines 2780-2785 gs_details_page_class_init (GsDetailsPageClass *klass) Link Here
2780
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_update);
2803
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_update);
2781
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_remove);
2804
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_remove);
2782
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_cancel);
2805
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_cancel);
2806
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_untrusted);
2807
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_label_untrusted);
2783
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_eol);
2808
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_eol);
2784
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_eol);
2809
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_eol);
2785
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_problems_label);
2810
	gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, infobar_details_problems_label);
(-)a/src/gs-details-page.ui (+38 lines)
Lines 390-395 Link Here
390
                              </object>
390
                              </object>
391
                            </child>
391
                            </child>
392
392
393
                            <child>
394
                              <object class="AdwClamp">
395
                                <property name="visible" bind-source="infobar_details_untrusted" bind-property="visible" bind-flags="sync-create"/>
396
                                <property name="maximum-size">860</property>
397
                                <!-- ~⅔ of the maximum size. -->
398
                                <property name="tightening-threshold">576</property>
399
                                <property name="margin-start">12</property>
400
                                <property name="margin-end">12</property>
401
                                <child>
402
                                  <object class="GtkBox" id="infobar_details_untrusted">
403
                                    <property name="orientation">vertical</property>
404
                                    <child>
405
                                      <object class="GtkLabel">
406
                                        <property name="justify">center</property>
407
                                        <property name="label" translatable="yes">This application is distributed through a third party source!</property>
408
                                        <property name="wrap">True</property>
409
                                        <style>
410
                                          <class name="heading"/>
411
                                        </style>
412
                                      </object>
413
                                    </child>
414
                                    <child>
415
                                      <object class="GtkLabel" id="infobar_details_label_untrusted">
416
                                        <property name="justify">center</property>
417
                                        <property name="label"></property>
418
                                        <property name="wrap">True</property>
419
                                      </object>
420
                                    </child>
421
                                    <style>
422
                                      <class name="card"/>
423
                                      <class name="error"/>
424
                                      <class name="infobox"/>
425
                                    </style>
426
                                  </object>
427
                                </child>
428
                              </object>
429
                            </child>
430
393
                            <child>
431
                            <child>
394
                              <object class="AdwClamp">
432
                              <object class="AdwClamp">
395
                                <property name="maximum-size">860</property>
433
                                <property name="maximum-size">860</property>
(-)a/src/style.css (+5 lines)
Lines 202-207 clamp.large .category-tile:not(.category-tile-iconless) { Link Here
202
	color: @window_fg_color;
202
	color: @window_fg_color;
203
}
203
}
204
204
205
.card.error {
206
	background-color: mix(@error_bg_color, @window_bg_color, .7);
207
	color: @window_fg_color;
208
}
209
205
.infobox {
210
.infobox {
206
	border-spacing: 6px;
211
	border-spacing: 6px;
207
	padding: 12px;
212
	padding: 12px;

Return to bug 55271