# -*- coding: utf-8 -*-
#
#
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import locale
import gettext
import os
import socket
import string
import subprocess
import re
import gi
# There's probably a nicer way of including UTF-8 strings than this
# This needs to stay in sync with the method in /lib/svc/method/svc-webui-server
# for generating the hostname used in the site certificate to avoid TLS errors.
def get_solaris_dashboard_url():
if hostname != '':
bufsize=-1)
if p.returncode == 0:
if hostname == '':
hostname = "localhost"
return "https://%s:6787/" % hostname
help_link= {
'icon' : "resources.png",
'url_links' : [ ["http://docs.oracle.com/cd/E53394_01/pdf/E54847.pdf", N_("##What's new## with <b>Oracle Solaris 11.3</b>")], ["http://www.oracle.com/us/support/systems/index.html", N_("##Get world class support## with <b>Oracle Premier Support</b>")], [get_solaris_dashboard_url(), N_("##Explore## the <b>Oracle Solaris Dashboard</b> with system analytics and more")] ],
}
'icon' : "gnome.png",
'program_links' : [ ["yelp.desktop", N_("##Get Help## using the <b>GNOME Desktop</b>")], ["gnome-control-center.desktop", N_("##Change desktop settings## with <b>GNOME Control Center</b>")], ["gnome-universal-access-panel.desktop", N_("##Enable Accessibility## with <b>Settings > Universal Access</b>")] ],
}
'icon' : "participate.png",
'url_links' : [ ["https://community.oracle.com/community/server_%26_storage_systems/solaris", N_("##Join in on the discussion## of the <b>Oracle Solaris Forums</b>")], ["http://www.oracle.com/technetwork/server-storage/solaris11/community/index.html", N_("##Catch the latest## from the <b>Oracle Solaris Community</b>")] ],
}
# Set the dialog default spacing for about
# Logo
# scale = 48.0 / pixbuf.get_height()
# width_scale = pixbuf.get_width() * scale
# height_scale = pixbuf.get_height() * scale
# pixbuf = pixbuf.scale_simple (int(width_scale), int(height_scale), GdkPixbuf.InterpType.BILINEAR)
try:
except Exception, e:
print '''Warning: could not execute file "%s" : %s''' % (uri, e)
return True
if 'program_links' in section_link:
for i in section_link['program_links']:
if 'url_links' in section_link:
for i in section_link['url_links']:
def main():
css = """
GtkDialog {
background-image: url('/usr/share/os-about/about-os-background.jpg');
background-position: left top;
}
"""
)
if __name__ == '__main__':
main()