[gnome-boxes/wip/rishi/my-fixes: 9/9] foo
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/rishi/my-fixes: 9/9] foo
- Date: Thu, 24 Aug 2017 17:39:53 +0000 (UTC)
commit 4f3b7f24a5881dd4d7bc6139ecd8f2b1f24314ee
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Aug 24 18:19:50 2017 +0200
foo
configure.ac | 1 +
data/ui/wizard-source.ui | 58 ++++++++++++++++++++++++++++++++++++++++++++++
src/Makefile.am | 1 +
src/app.vala | 4 +++
src/wizard-source.vala | 15 ++++++++++++
5 files changed, 79 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4981425..764db43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,7 @@ PKG_CHECK_MODULES(BOXES, [
libosinfo-1.0 >= $OSINFO_MIN_VERSION
libsoup-2.4 >= $LIBSOUP_REQUIRED
libarchive >= $LIBARCHIVE_MIN_VERSION
+ webkit2gtk-4.0
])
diff --git a/data/ui/wizard-source.ui b/data/ui/wizard-source.ui
index d00a974..963ca0c 100644
--- a/data/ui/wizard-source.ui
+++ b/data/ui/wizard-source.ui
@@ -117,6 +117,53 @@
</child>
<child>
+ <object class="GtkButton" id="install_rhel_button">
+ <property name="visible">True</property>
+ <signal name="clicked" handler="on_install_rhel_button_clicked"/>
+ <style>
+ <class name="boxes-menu-row"/>
+ </style>
+ <child>
+ <object class="GtkBox" id="install_rhel_box">
+ <property name="visible">True</property>
+ <property name="margin-top">10</property>
+ <property name="margin-bottom">10</property>
+ <property name="margin-start">20</property>
+ <property name="margin-end">20</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="install_rhel_label">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="label" translatable="yes">Red Hat Enterprise Linux</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="install_rhel_details_label">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Available with a free Red Hat developer
account</property>
+ <style>
+ <class name="boxes-step-label"/>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+
+ <child>
<object class="GtkButton" id="enter_url_button">
<property name="visible">True</property>
<signal name="clicked" handler="on_enter_url_button_clicked"/>
@@ -225,6 +272,17 @@
</packing>
</child>
+ <!-- RHEL web view page -->
+ <child>
+ <object class="WebKitWebView" id="rhel_web_view">
+ <property name="visible">True</property>
+ </object>
+
+ <packing>
+ <property name="name">rhel-web-view-page</property>
+ </packing>
+ </child>
+
<!-- URL page -->
<child>
<object class="GtkBox" id="url_menubox">
diff --git a/src/Makefile.am b/src/Makefile.am
index 182ff92..129e1a2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,6 +44,7 @@ AM_VALAFLAGS = \
--pkg spice-client-gtk-3.0 \
--pkg tracker-sparql-$(TRACKER_VERSION) \
--pkg gmodule-2.0 \
+ --pkg webkit2gtk-4.0 \
--gresources $(gresource_file) \
$(VALA_DEBUG_FLAGS) \
$(NULL)
diff --git a/src/app.vala b/src/app.vala
index 66b5151..40ade90 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -576,6 +576,10 @@ private class Boxes.App: Gtk.Application {
}
public AppWindow add_new_window () {
+ // Register GTypes needed by various templates that fail to auto-register.
+ // https://bugs.webkit.org/show_bug.cgi?id=175937
+ typeof (WebKit.WebView);
+
var window = new Boxes.AppWindow (this);
windows.append (window);
diff --git a/src/wizard-source.vala b/src/wizard-source.vala
index 35bd250..3d8399d 100644
--- a/src/wizard-source.vala
+++ b/src/wizard-source.vala
@@ -123,6 +123,8 @@ private class Boxes.WizardSource: Gtk.Stack {
private Gtk.Button libvirt_sys_import_button;
[GtkChild]
private Gtk.Label libvirt_sys_import_label;
+ [GtkChild]
+ private WebKit.WebView rhel_web_view;
private AppWindow window;
@@ -320,4 +322,17 @@ private class Boxes.WizardSource: Gtk.Stack {
warning ("Failed to setup installation media '%s': %s", media.device_file, error.message);
}
}
+
+ [GtkCallback]
+ private void on_install_rhel_button_clicked () {
+ var cached_path = get_cache ("developers.redhat.com", "rhel");
+ FileUtils.unlink (cached_path);
+
+ var downloader = Downloader.get_instance ();
+ var file = File.new_for_uri ("https://developers.redhat.com/download-manager/rest/available/rhel");
+ var cached_paths = { cached_path };
+ file = yield downloader.download(file, cached_paths);
+
+ var info = yield file.query_info_async (FileAttribute.STANDARD_CONTENT_TYPE,
FileQueryInfoFlags.NONE);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]