aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-02-27 04:13:24 +0800
committerChristian Persch <chpe@src.gnome.org>2008-02-27 04:13:24 +0800
commitebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d (patch)
tree250176687f20a62bf128771568d867c8182be4e8
parent752ecd8cb341d8be15a6d5b638a94a1f5c4d13a1 (diff)
downloadgsoc2013-epiphany-ebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d.tar
gsoc2013-epiphany-ebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d.tar.gz
gsoc2013-epiphany-ebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d.tar.bz2
gsoc2013-epiphany-ebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d.tar.lz
gsoc2013-epiphany-ebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d.tar.xz
gsoc2013-epiphany-ebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d.tar.zst
gsoc2013-epiphany-ebe63f46bd51ea845bae5bcbc6bb7fd3de04f65d.zip
Remove cruft
svn path=/trunk/; revision=7990
-rw-r--r--configure.ac93
-rw-r--r--data/glade/Makefile.am7
-rw-r--r--data/glade/certs-manager.glade530
-rw-r--r--embed/Makefile.am10
-rw-r--r--embed/ephy-certificate-manager.c72
-rw-r--r--embed/ephy-certificate-manager.h68
-rw-r--r--embed/ephy-x509-cert.c53
-rw-r--r--embed/ephy-x509-cert.h61
-rw-r--r--embed/mozilla/Makefile.am6
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp158
-rw-r--r--embed/mozilla/mozilla-x509-cert.cpp219
-rw-r--r--embed/mozilla/mozilla-x509-cert.h63
-rw-r--r--embed/xulrunner/embed/Makefile.am6
-rw-r--r--embed/xulrunner/embed/mozilla-x509-cert.cpp261
-rw-r--r--embed/xulrunner/embed/mozilla-x509-cert.h63
-rw-r--r--po/POTFILES.skip2
-rw-r--r--src/Makefile.am8
-rw-r--r--src/ephy-cert-manager-dialog.c488
-rw-r--r--src/ephy-cert-manager-dialog.h59
-rw-r--r--src/ephy-window.c2
-rw-r--r--src/window-commands.c13
21 files changed, 25 insertions, 2217 deletions
diff --git a/configure.ac b/configure.ac
index 84ec54998..f118ef8c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -583,26 +583,6 @@ fi
AM_CONDITIONAL([ENABLE_ZEROCONF],[test "$enable_zeroconf" = "yes"])
-# Certificates manager
-
-if test "$enable_psm" = "yes"; then
-
-AC_MSG_CHECKING([whether to build the certificates manager])
-AC_ARG_ENABLE([certificate-manager],
- AS_HELP_STRING([--enable-certificate-manager],[Whether to enable the certificate manager (experimental; default:disabled)]),
- [],[enable_certificate_manager=no])
-AC_MSG_RESULT([$enable_certificate_manager])
-
-fi
-
-if test "$enable_certificate_manager" = "yes"; then
- AC_DEFINE([ENABLE_CERTIFICATE_MANAGER],[1],[Define to enable the certificate manager build])
-else
- enable_certificate_manager=no
-fi
-
-AM_CONDITIONAL([ENABLE_CERTIFICATE_MANAGER],[test "$enable_certificate_manager" = "yes"])
-
# NetworkManager
AC_MSG_CHECKING([whether to enable NetworkManager support])
@@ -722,6 +702,27 @@ AM_GLIB_GNU_GETTEXT
# uninstalled share dir to search data
AC_DEFINE_UNQUOTED([SHARE_UNINSTALLED_DIR], ["`pwd`/data"], [path to source data dir])
+# ****************
+# Distributor name
+# ****************
+
+AC_ARG_WITH([distributor-name],
+ AS_HELP_STRING([--with-distributor-name=name],[Set the distributor name]),
+ [LSB_DISTRIBUTOR="$withval"])
+
+if test -z "$LSB_DISTRIBUTOR" = ""; then
+ AC_CHECK_PROGS([LSB_RELEASE], [lsb_release],)
+ if test -n "$LSB_RELEASE"; then
+ # Fallback on lsb_release if available
+ LSB_DISTRIBUTOR=$($LSB_RELEASE -i -s)
+ else
+ # Fallback on the product name
+ LSB_DISTRIBUTOR="Epiphany"
+ fi
+fi
+
+AC_DEFINE_UNQUOTED([LSB_DISTRIBUTOR],["$LSB_DISTRIBUTOR"],[Distributor name])
+
# *****************
# API Documentation
# *****************
@@ -774,57 +775,6 @@ po/Makefile.in
[],
[EPIPHANY_API_VERSION=$EPIPHANY_API_VERSION])
-# new gecko embedding
-
-PKG_CHECK_MODULES([GTK],[gtk+-2.0 >= $GTK_REQUIRED])
-PKG_CHECK_MODULES([GTKPRINT],[gtk+-unix-print-2.0 >= $GTK_REQUIRED])
-PKG_CHECK_MODULES([GCONF],[gconf-2.0])
-PKG_CHECK_MODULES([GLADE],[libglade-2.0 >= $LIBGLADE_REQUIRED])
-PKG_CHECK_MODULES([GNOME],[libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED])
-
-# Distributor name
-
-AC_ARG_WITH(distributor-name,
-[ --with-distributor-name=name Distributor name.],LSB_DISTRIBUTOR="$withval",)
-
-if test "x$LSB_DISTRIBUTOR" = "x"; then
- AC_CHECK_PROGS([LSB_RELEASE], [lsb_release],)
- if test -n "$LSB_RELEASE"; then
- # Fallback on lsb_release if available
- LSB_DISTRIBUTOR=$($LSB_RELEASE -i -s)
- else
- # Fallback on the product name
- LSB_DISTRIBUTOR="Epiphany"
- fi
-fi
-
-AC_DEFINE_UNQUOTED(LSB_DISTRIBUTOR, "$LSB_DISTRIBUTOR", [Distributor name.])
-
-# compat cruft
-GGE_VERSION=0
-AC_SUBST([GGE_VERSION])
-
-GGE_API_VERSION=0
-AC_SUBST([GGE_API_VERSION])
-
-AC_CONFIG_FILES([
-embed/xulrunner/Makefile
-embed/xulrunner/bindings/Makefile
-embed/xulrunner/bindings/python/Makefile
-embed/xulrunner/components/Makefile
-embed/xulrunner/data/Makefile
-embed/xulrunner/embed/Makefile
-embed/xulrunner/src/Makefile
-embed/xulrunner/tests/Makefile
-embed/xulrunner/utils/Makefile
-xulapp/Makefile
-xulapp/application.ini
-])
-
-AC_CONFIG_FILES([
-embed/xulrunner/data/gnome-gecko-embed-${GGE_API_VERSION}.pc:embed/xulrunner/data/gnome-gecko-embed.pc.in
-],[],[GGE_API_VERSION=$GGE_API_VERSION])
-
AC_OUTPUT
# *************************************
@@ -850,6 +800,5 @@ Epiphany was configured with the following options:
if test "$with_engine" = "mozilla"; then
echo " Gecko backend : $gecko_cv_gecko version $gecko_cv_gecko_version
PSM support : $enable_psm
- Certificate manager : $enable_certificate_manager (experimental)
"
fi
diff --git a/data/glade/Makefile.am b/data/glade/Makefile.am
index 0ef74593f..08794e3aa 100644
--- a/data/glade/Makefile.am
+++ b/data/glade/Makefile.am
@@ -6,9 +6,4 @@ glade_DATA = \
prefs-dialog.glade \
print.glade
-if ENABLE_CERTIFICATE_MANAGER
-glade_DATA += \
- certs-manager.glade
-endif
-
-EXTRA_DIST = $(glade_DATA) certs-manager.glade
+EXTRA_DIST = $(glade_DATA)
diff --git a/data/glade/certs-manager.glade b/data/glade/certs-manager.glade
deleted file mode 100644
index 16a662df0..000000000
--- a/data/glade/certs-manager.glade
+++ /dev/null
@@ -1,530 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="certs_manager_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Certificates</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="icon_name">gtk-dialog-authentication</property>
- <property name="role">epiphany-certificate-manager</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="helpbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="import_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Import</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">1</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="closebutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-7</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="personal_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="personal_remove_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="personal_view_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_View</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="personal_export_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Export</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Personal</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox15">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="server_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment15">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox5">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="server_remove_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="server_view_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_View</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="server_props_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-properties</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Web Sites</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox18">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow6">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="ca_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment18">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox6">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="ca_remove_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ca_view_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_View</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ca_props_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-properties</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Authorities</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/embed/Makefile.am b/embed/Makefile.am
index 22c8b56be..e01687e74 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -69,16 +69,6 @@ libephyembed_la_SOURCES = \
$(INST_H_FILES) \
$(NOINST_H_FILES)
-if ENABLE_CERTIFICATE_MANAGER
-INST_H_FILES += \
- ephy-certificate-manager.h \
- ephy-x509-cert.h
-
-libephyembed_la_SOURCES += \
- ephy-certificate-manager.c \
- ephy-x509-cert.c
-endif
-
nodist_libephyembed_la_SOURCES = \
$(BUILT_SOURCES)
diff --git a/embed/ephy-certificate-manager.c b/embed/ephy-certificate-manager.c
deleted file mode 100644
index 1495cc7c6..000000000
--- a/embed/ephy-certificate-manager.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- * Copyright © 2005 Crispin Flowerday
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#include <config.h>
-
-#include "ephy-certificate-manager.h"
-
-GType
-ephy_certificate_manager_get_type (void)
-{
- static GType ephy_certificate_manager_type = 0;
-
- if (ephy_certificate_manager_type == 0)
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyCertificateManagerIface),
- NULL,
- NULL,
- };
-
- ephy_certificate_manager_type = g_type_register_static (G_TYPE_INTERFACE,
- "EphyCertificateManager",
- &our_info,
- (GTypeFlags)0);
- }
-
- return ephy_certificate_manager_type;
-}
-
-/* Certificates */
-GList *
-ephy_certificate_manager_get_certificates (EphyCertificateManager *manager,
- EphyX509CertType type)
-{
- EphyCertificateManagerIface *iface = EPHY_CERTIFICATE_MANAGER_GET_IFACE (manager);
- return iface->get_certificates (manager, type);
-}
-
-gboolean
-ephy_certificate_manager_remove_certificate (EphyCertificateManager *manager,
- EphyX509Cert *cert)
-{
- EphyCertificateManagerIface *iface = EPHY_CERTIFICATE_MANAGER_GET_IFACE (manager);
- return iface->remove_certificate (manager, cert);
-}
-
-gboolean
-ephy_certificate_manager_import (EphyCertificateManager *manager,
- const gchar *file)
-{
- EphyCertificateManagerIface *iface = EPHY_CERTIFICATE_MANAGER_GET_IFACE (manager);
- return iface->import (manager, file);
-}
diff --git a/embed/ephy-certificate-manager.h b/embed/ephy-certificate-manager.h
deleted file mode 100644
index 6e5c70ce5..000000000
--- a/embed/ephy-certificate-manager.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- * Copyright © 2005 Crispin Flowerday
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#ifndef EPHY_CERTIFICATE_MANAGER_H
-#define EPHY_CERTIFICATE_MANAGER_H
-
-#include <glib-object.h>
-
-#include "ephy-x509-cert.h"
-
-G_BEGIN_DECLS
-
-#define EPHY_TYPE_CERTIFICATE_MANAGER (ephy_certificate_manager_get_type ())
-#define EPHY_CERTIFICATE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EPHY_TYPE_CERTIFICATE_MANAGER, EphyCertificateManager))
-#define EPHY_CERTIFICATE_MANAGER_IFACE(klass) (G_TYPE_CHECK_IFACE_CAST ((klass), EPHY_TYPE_CERTIFICATE_MANAGER, EphyCertificateManagerIface))
-#define EPHY_IS_CERTIFICATE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EPHY_TYPE_CERTIFICATE_MANAGER))
-#define EPHY_IS_CERTIFICATE_MANAGER_IFACE(klass) (G_TYPE_CHECK_IFACE_TYPE ((klass), EPHY_TYPE_CERTIFICATE_MANAGER))
-#define EPHY_CERTIFICATE_MANAGER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_CERTIFICATE_MANAGER, EphyCertificateManagerIface))
-
-typedef struct _EphyCertificateManager EphyCertificateManager;
-typedef struct _EphyCertificateManagerIface EphyCertificateManagerIface;
-
-struct _EphyCertificateManagerIface
-{
- GTypeInterface base_iface;
-
- /* Methods */
- GList * (* get_certificates) (EphyCertificateManager *manager,
- EphyX509CertType type);
- gboolean (* remove_certificate) (EphyCertificateManager *manager,
- EphyX509Cert *cert);
- gboolean (* import) (EphyCertificateManager *manager,
- const gchar *file);
-};
-
-GType ephy_certificate_manager_get_type (void);
-
-/* Certificate */
-GList * ephy_certificate_manager_get_certificates (EphyCertificateManager *manager,
- EphyX509CertType type);
-
-gboolean ephy_certificate_manager_remove_certificate (EphyCertificateManager *manager,
- EphyX509Cert *cert);
-
-gboolean ephy_certificate_manager_import (EphyCertificateManager *manager,
- const gchar *file);
-
-G_END_DECLS
-
-#endif
diff --git a/embed/ephy-x509-cert.c b/embed/ephy-x509-cert.c
deleted file mode 100644
index 15a65e343..000000000
--- a/embed/ephy-x509-cert.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- * Copyright © 2005 Crispin Flowerday
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#include <config.h>
-
-#include "ephy-x509-cert.h"
-
-GType
-ephy_x509_cert_get_type (void)
-{
- static GType ephy_x509_cert_type = 0;
-
- if (ephy_x509_cert_type == 0)
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyX509CertIface),
- NULL,
- NULL,
- };
- ephy_x509_cert_type = g_type_register_static (G_TYPE_INTERFACE,
- "EphyEmbedX509cert",
- &our_info,
- (GTypeFlags)0);
- }
-
- return ephy_x509_cert_type;
-}
-
-const char *
-ephy_x509_cert_get_title (EphyX509Cert *cert)
-{
- EphyX509CertIface *iface = EPHY_X509_CERT_GET_IFACE (cert);
- return iface->get_title (cert);
-}
diff --git a/embed/ephy-x509-cert.h b/embed/ephy-x509-cert.h
deleted file mode 100644
index 660ec15fa..000000000
--- a/embed/ephy-x509-cert.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#ifndef EPHY_X509_CERT_H
-#define EPHY_X509_CERT_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-typedef enum
-{
- PERSONAL_CERTIFICATE,
- SERVER_CERTIFICATE,
- CA_CERTIFICATE
-} EphyX509CertType;
-
-
-#define EPHY_TYPE_X509_CERT (ephy_x509_cert_get_type ())
-#define EPHY_X509_CERT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EPHY_TYPE_X509_CERT, EphyX509Cert))
-#define EPHY_X509_CERT_IFACE(klass) (G_TYPE_CHECK_IFACE_CAST ((klass), EPHY_TYPE_X509_CERT, EphyX509CertIface))
-#define EPHY_IS_X509_CERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EPHY_TYPE_X509_CERT))
-#define EPHY_IS_X509_CERT_IFACE(klass) (G_TYPE_CHECK_IFACE_TYPE ((klass), EPHY_TYPE_X509_CERT))
-#define EPHY_X509_CERT_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_X509_CERT, EphyX509CertIface))
-
-typedef struct _EphyX509Cert EphyX509Cert;
-typedef struct _EphyX509CertIface EphyX509CertIface;
-
-struct _EphyX509CertIface
-{
- GTypeInterface base_iface;
-
- /* Methods */
- const char * (* get_title) (EphyX509Cert *cert);
-};
-
-GType ephy_x509_cert_get_type (void);
-
-/* Base */
-const char * ephy_x509_cert_get_title (EphyX509Cert *cert);
-
-G_END_DECLS
-
-#endif
diff --git a/embed/mozilla/Makefile.am b/embed/mozilla/Makefile.am
index ef3efed61..007cac5d0 100644
--- a/embed/mozilla/Makefile.am
+++ b/embed/mozilla/Makefile.am
@@ -91,12 +91,6 @@ libephymozillaembed_la_SOURCES += \
GtkNSSSecurityWarningDialogs.h
endif
-if ENABLE_CERTIFICATE_MANAGER
-libephymozillaembed_la_SOURCES += \
- mozilla-x509-cert.cpp \
- mozilla-x509-cert.h
-endif
-
if ENABLE_SPELLCHECKER
libephymozillaembed_la_SOURCES += \
GeckoSpellCheckEngine.cpp \
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index f8ef54f0d..f95c8a107 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -54,11 +54,6 @@
#include <nsMemory.h>
#include <nsServiceManagerUtils.h>
-#ifdef HAVE_MOZILLA_PSM
-#include <nsIX509Cert.h>
-#include <nsIX509CertDB.h>
-#endif
-
#ifdef ALLOW_PRIVATE_API
#include <nsICacheService.h>
#include <nsIFontEnumerator.h>
@@ -74,7 +69,6 @@
#include "ephy-file-helpers.h"
#include "eel-gconf-extensions.h"
-#include "ephy-certificate-manager.h"
#include "ephy-cookie-manager.h"
#include "ephy-debug.h"
#include "ephy-embed-prefs.h"
@@ -85,7 +79,6 @@
#include "ephy-string.h"
#include "mozilla-embed.h"
#include "mozilla-notifiers.h"
-#include "mozilla-x509-cert.h"
#include "EphyBrowser.h"
#include "EphyDirectoryProvider.h"
@@ -131,26 +124,6 @@ static void ephy_password_manager_iface_init (EphyPasswordManagerIface *iface);
static void ephy_permission_manager_iface_init (EphyPermissionManagerIface *iface);
static void mozilla_embed_single_init (MozillaEmbedSingle *ges);
-#ifdef ENABLE_CERTIFICATE_MANAGER
-static void ephy_certificate_manager_iface_init (EphyCertificateManagerIface *iface);
-#endif
-
-/* Some compilers (like gcc 2.95) don't support preprocessor directives inside macros,
- so we have to duplicate the whole thing */
-
-#ifdef ENABLE_CERTIFICATE_MANAGER
-G_DEFINE_TYPE_WITH_CODE (MozillaEmbedSingle, mozilla_embed_single, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE,
- ephy_embed_single_iface_init)
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_COOKIE_MANAGER,
- ephy_cookie_manager_iface_init)
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER,
- ephy_password_manager_iface_init)
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_CERTIFICATE_MANAGER,
- ephy_certificate_manager_iface_init)
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER,
- ephy_permission_manager_iface_init))
-#else
G_DEFINE_TYPE_WITH_CODE (MozillaEmbedSingle, mozilla_embed_single, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE,
ephy_embed_single_iface_init)
@@ -160,7 +133,6 @@ G_DEFINE_TYPE_WITH_CODE (MozillaEmbedSingle, mozilla_embed_single, G_TYPE_OBJECT
ephy_password_manager_iface_init)
G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER,
ephy_permission_manager_iface_init))
-#endif
static gboolean
mozilla_set_default_prefs (MozillaEmbedSingle *mes)
@@ -1188,124 +1160,6 @@ impl_open_window (EphyEmbedSingle *single,
return EphyUtils::FindEmbed (newWindow);
}
-#ifdef ENABLE_CERTIFICATE_MANAGER
-
-static gboolean
-impl_remove_certificate (EphyCertificateManager *manager,
- EphyX509Cert *cert)
-{
- nsresult rv;
-
- nsCOMPtr<nsIX509CertDB> certDB;
- certDB = do_GetService (NS_X509CERTDB_CONTRACTID);
- if (!certDB) return FALSE;
-
- nsCOMPtr<nsIX509Cert> mozCert;
- rv = mozilla_x509_cert_get_mozilla_cert (MOZILLA_X509_CERT (cert),
- getter_AddRefs (mozCert));
- if (NS_FAILED (rv)) return FALSE;
-
- rv = certDB->DeleteCertificate (mozCert);
- if (NS_FAILED (rv)) return FALSE;
-
- return TRUE;
-}
-
-#define NICK_DELIMITER PRUnichar('\001')
-
-static GList *
-retrieveCerts (PRUint32 type)
-{
- nsresult rv;
-
- nsCOMPtr<nsIX509CertDB> certDB;
- certDB = do_GetService (NS_X509CERTDB_CONTRACTID);
- if (!certDB) return NULL;
-
- PRUint32 count;
- PRUnichar **certNameList = NULL;
-
- rv = certDB->FindCertNicknames (NULL, type, &count, &certNameList);
- if (NS_FAILED (rv)) return NULL;
-
- LOG("Certificates found: %i", count);
-
- GList *list = NULL;
- for (PRUint32 i = 0; i < count; i++)
- {
- /* HACK HACK, this is EVIL, the string for each cert is:
- <DELIMITER>nicknameOrEmailAddress<DELIMITER>dbKey
- So we need to chop off the dbKey to look it up in the database.
-
- https://bugzilla.mozilla.org/show_bug.cgi?id=214742
- */
- nsCString full_string;
- NS_UTF16ToCString (nsString(certNameList[i]),
- NS_CSTRING_ENCODING_UTF8, full_string);
-
- const char *key = full_string.get();
- char *pos = strrchr (key, NICK_DELIMITER);
- if (!pos) continue;
-
- nsCOMPtr<nsIX509Cert> mozilla_cert;
- rv = certDB->FindCertByDBKey (pos, NULL, getter_AddRefs (mozilla_cert));
- if (NS_FAILED (rv)) continue;
-
- MozillaX509Cert *cert = mozilla_x509_cert_new (mozilla_cert);
- list = g_list_prepend (list, cert);
- }
-
- NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY (count, certNameList);
- return list;
-}
-
-static GList *
-impl_get_certificates (EphyCertificateManager *manager,
- EphyX509CertType type)
-{
- int moz_type = nsIX509Cert::USER_CERT;
- switch (type)
- {
- case PERSONAL_CERTIFICATE:
- moz_type = nsIX509Cert::USER_CERT;
- break;
- case SERVER_CERTIFICATE:
- moz_type = nsIX509Cert::SERVER_CERT;
- break;
- case CA_CERTIFICATE:
- moz_type = nsIX509Cert::CA_CERT;
- break;
- }
- return retrieveCerts (moz_type);
-}
-
-static gboolean
-impl_import (EphyCertificateManager *manager,
- const gchar *file)
-{
- nsresult rv;
- nsCOMPtr<nsIX509CertDB> certDB;
- certDB = do_GetService (NS_X509CERTDB_CONTRACTID);
- if (!certDB) return FALSE;
-
- nsCOMPtr<nsILocalFile> localFile;
- localFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID);
-
- // TODO Is this correct ?
- nsString path;
- NS_CStringToUTF16 (nsCString(file),
- NS_CSTRING_ENCODING_UTF8, path);
-
-
- localFile->InitWithPath (path);
- rv = certDB->ImportPKCS12File(NULL, localFile);
- if (NS_FAILED (rv)) return FALSE;
-
- return TRUE;
-}
-
-#endif /* ENABLE_CERTIFICATE_MANAGER */
-
static void
mozilla_embed_single_get_property (GObject *object,
guint prop_id,
@@ -1391,15 +1245,3 @@ ephy_permission_manager_iface_init (EphyPermissionManagerIface *iface)
iface->test = impl_permission_manager_test;
iface->list = impl_permission_manager_list;
}
-
-#ifdef ENABLE_CERTIFICATE_MANAGER
-
-static void
-ephy_certificate_manager_iface_init (EphyCertificateManagerIface *iface)
-{
- iface->get_certificates = impl_get_certificates;
- iface->remove_certificate = impl_remove_certificate;
- iface->import = impl_import;
-}
-
-#endif /* ENABLE_CERTIFICATE_MANAGER */
diff --git a/embed/mozilla/mozilla-x509-cert.cpp b/embed/mozilla/mozilla-x509-cert.cpp
deleted file mode 100644
index 97885701e..000000000
--- a/embed/mozilla/mozilla-x509-cert.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- * Copyright © 2005 Crispin Flowerday
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#include "mozilla-config.h"
-#include "config.h"
-
-#include <nsStringAPI.h>
-
-#include "ephy-debug.h"
-
-#include "mozilla-x509-cert.h"
-
-#define MOZILLA_X509_CERT_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- MOZILLA_TYPE_X509_CERT, MozillaX509CertPrivate))
-
-static void mozilla_x509_cert_class_init (MozillaX509CertClass *klass);
-static void ephy_x509_cert_init (EphyX509CertIface *iface);
-static void mozilla_x509_cert_init (MozillaX509Cert *cert);
-
-struct _MozillaX509CertPrivate
-{
- nsIX509Cert * mozilla_cert;
- gchar *title;
-};
-
-enum
-{
- PROP_0,
- PROP_MOZILLA_CERT
-};
-
-G_DEFINE_TYPE_WITH_CODE (MozillaX509Cert, mozilla_x509_cert, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_X509_CERT,
- ephy_x509_cert_init))
-
-static void
-mozilla_x509_cert_set_mozilla_cert (MozillaX509Cert *cert,
- nsIX509Cert *mozilla_cert)
-{
- nsCOMPtr<nsIX509Cert> tmpcert = cert->priv->mozilla_cert;
-
- if (cert->priv->mozilla_cert)
- {
- NS_RELEASE (cert->priv->mozilla_cert);
- }
-
- cert->priv->mozilla_cert = mozilla_cert;
- NS_IF_ADDREF (cert->priv->mozilla_cert);
-}
-
-
-nsresult
-mozilla_x509_cert_get_mozilla_cert (MozillaX509Cert *cert, nsIX509Cert**aCert)
-{
- *aCert = cert->priv->mozilla_cert;
- NS_IF_ADDREF (*aCert);
-
- return *aCert ? NS_OK : NS_ERROR_FAILURE;
-}
-
-static const char*
-impl_get_title (EphyX509Cert *cert)
-{
- MozillaX509Cert *m_cert = MOZILLA_X509_CERT (cert);
-
- /* lazy initialization of the title private variable */
- if (m_cert->priv->title != NULL)
- {
- return m_cert->priv->title;
- }
-
- /* This title logic is adapted from Mozilla source at
- mozilla/security/manager/ssl/src/nsCertTree.cpp */
- nsString name;
- m_cert->priv->mozilla_cert->GetCommonName (name);
- if (name.Length())
- {
- nsCString cname;
- NS_UTF16ToCString (name, NS_CSTRING_ENCODING_UTF8, cname);
-
- m_cert->priv->title = g_strdup (cname.get());
- }
- else
- {
- /* No common name, so get the nickname instead */
- nsString nick;
- m_cert->priv->mozilla_cert->GetNickname (nick);
-
- nsCString cnick;
- NS_UTF16ToCString (nick, NS_CSTRING_ENCODING_UTF8, cnick);
-
- const char * str = cnick.get();
- char * colon = strchr (str, ':');
- if (colon)
- {
- m_cert->priv->title = g_strdup (colon+1);
- }
- else
- {
- m_cert->priv->title = g_strdup (cnick.get());
- }
- }
-
- return m_cert->priv->title;
-}
-
-static void
-impl_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- MozillaX509Cert *cert = MOZILLA_X509_CERT (object);
-
- switch (prop_id)
- {
- case PROP_MOZILLA_CERT:
- mozilla_x509_cert_set_mozilla_cert(cert,
- (nsIX509Cert*)g_value_get_pointer (value));
- break;
- default:
- break;
- }
-}
-
-static void
-impl_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- MozillaX509Cert *cert = MOZILLA_X509_CERT (object);
-
- switch (prop_id)
- {
- case PROP_MOZILLA_CERT:
- g_value_set_pointer (value, cert->priv->mozilla_cert);
- break;
- default:
- break;
- }
-}
-
-static void
-mozilla_x509_cert_init (MozillaX509Cert *cert)
-{
- cert->priv = MOZILLA_X509_CERT_GET_PRIVATE (cert);
-}
-
-static void
-mozilla_x509_cert_finalize (GObject *object)
-{
- MozillaX509Cert *cert = MOZILLA_X509_CERT (object);
-
- LOG ("Finalizing MozillaX509Cert %p", cert);
-
- if (cert->priv->mozilla_cert)
- {
- NS_RELEASE (cert->priv->mozilla_cert);
- }
-
- if (cert->priv->title)
- {
- g_free (cert->priv->title);
- }
-
- G_OBJECT_CLASS (mozilla_x509_cert_parent_class)->finalize (object);
-}
-
-static void
-ephy_x509_cert_init (EphyX509CertIface *iface)
-{
- iface->get_title = impl_get_title;
-}
-
-static void
-mozilla_x509_cert_class_init (MozillaX509CertClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->finalize = mozilla_x509_cert_finalize;
- object_class->set_property = impl_set_property;
- object_class->get_property = impl_get_property;
-
- g_object_class_install_property (object_class,
- PROP_MOZILLA_CERT,
- g_param_spec_pointer ("mozilla-cert",
- "Mozilla-Cert",
- "Mozilla XPCOM certificate",
- (GParamFlags)(G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));
-
- g_type_class_add_private (object_class, sizeof (MozillaX509CertPrivate));
-}
-
-MozillaX509Cert *
-mozilla_x509_cert_new (nsIX509Cert *moz_cert)
-{
- return g_object_new (MOZILLA_TYPE_X509_CERT,
- "mozilla-cert", moz_cert,
- NULL);
-}
diff --git a/embed/mozilla/mozilla-x509-cert.h b/embed/mozilla/mozilla-x509-cert.h
deleted file mode 100644
index 1efbdc7d1..000000000
--- a/embed/mozilla/mozilla-x509-cert.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#ifndef MOZILLA_X509_CERT_H
-#define MOZILLA_X509_CERT_H
-
-#include "ephy-x509-cert.h"
-
-#include <glib-object.h>
-
-#include <nsCOMPtr.h>
-#include <nsIX509Cert.h>
-
-G_BEGIN_DECLS
-
-#define MOZILLA_TYPE_X509_CERT (mozilla_x509_cert_get_type ())
-#define MOZILLA_X509_CERT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOZILLA_TYPE_X509_CERT, MozillaX509Cert))
-#define MOZILLA_X509_CERT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOZILLA_TYPE_X509_CERT, MozillaX509CertClass))
-#define MOZILLA_IS_X509_CERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOZILLA_TYPE_X509_CERT))
-#define MOZILLA_IS_X509_CERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOZILLA_TYPE_X509_CERT))
-#define MOZILLA_X509_CERT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOZILLA_TYPE_X509_CERT, MozillaX509CertClass))
-
-typedef struct _MozillaX509Cert MozillaX509Cert;
-typedef struct _MozillaX509CertPrivate MozillaX509CertPrivate;
-typedef struct _MozillaX509CertClass MozillaX509CertClass;
-
-struct _MozillaX509Cert
-{
- GObject parent;
- MozillaX509CertPrivate *priv;
-};
-
-struct _MozillaX509CertClass
-{
- GObjectClass parent_class;
-};
-
-GType mozilla_x509_cert_get_type (void);
-
-MozillaX509Cert *mozilla_x509_cert_new (nsIX509Cert *aMozCert);
-
-nsresult mozilla_x509_cert_get_mozilla_cert (MozillaX509Cert *cert, nsIX509Cert **aCert);
-
-G_END_DECLS
-
-#endif
diff --git a/embed/xulrunner/embed/Makefile.am b/embed/xulrunner/embed/Makefile.am
index 4e6375ee0..124054a0a 100644
--- a/embed/xulrunner/embed/Makefile.am
+++ b/embed/xulrunner/embed/Makefile.am
@@ -28,12 +28,6 @@ libephyxulrunnerembed_la_SOURCES = \
mozilla-notifiers.cpp \
mozilla-notifiers.h
-# if ENABLE_CERTIFICATE_MANAGER
-# libephyxulrunnerembed_la_SOURCES += \
-# mozilla-x509-cert.cpp \
-# mozilla-x509-cert.h
-# endif
-
libephyxulrunnerembed_la_CPPFLAGS = \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/embed \
diff --git a/embed/xulrunner/embed/mozilla-x509-cert.cpp b/embed/xulrunner/embed/mozilla-x509-cert.cpp
deleted file mode 100644
index cb5d38fc2..000000000
--- a/embed/xulrunner/embed/mozilla-x509-cert.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- * Copyright © 2005 Crispin Flowerday
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#include <xpcom-config.h>
-#include "config.h"
-
-#include <nsStringGlue.h>
-
-#include "ephy-debug.h"
-
-#include "mozilla-x509-cert.h"
-
-#define MOZILLA_X509_CERT_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- MOZILLA_TYPE_X509_CERT, MozillaX509CertPrivate))
-
-static void mozilla_x509_cert_class_init (MozillaX509CertClass *klass);
-static void ephy_x509_cert_init (EphyX509CertIface *iface);
-static void mozilla_x509_cert_init (MozillaX509Cert *cert);
-
-struct _MozillaX509CertPrivate
-{
- nsIX509Cert * mozilla_cert;
- gchar *title;
-};
-
-enum
-{
- PROP_0,
- PROP_MOZILLA_CERT
-};
-
-static GObjectClass *parent_class = NULL;
-
-GType
-mozilla_x509_cert_get_type (void)
-{
- static GType mozilla_x509_cert_type = 0;
-
- if (mozilla_x509_cert_type == 0)
- {
- const GTypeInfo our_info =
- {
- sizeof (MozillaX509CertClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) mozilla_x509_cert_class_init,
- NULL,
- NULL, /* class_data */
- sizeof (MozillaX509Cert),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mozilla_x509_cert_init
- };
-
- const GInterfaceInfo x509_cert_info =
- {
- (GInterfaceInitFunc) ephy_x509_cert_init, /* interface_init */
- NULL, /* interface_finalize */
- NULL /* interface_data */
- };
-
- mozilla_x509_cert_type = g_type_register_static (G_TYPE_OBJECT,
- "MozillaX509Cert",
- &our_info,
- (GTypeFlags)0);
- g_type_add_interface_static (mozilla_x509_cert_type,
- EPHY_TYPE_X509_CERT,
- &x509_cert_info);
- }
-
- return mozilla_x509_cert_type;
-}
-
-static void
-mozilla_x509_cert_set_mozilla_cert (MozillaX509Cert *cert,
- nsIX509Cert *mozilla_cert)
-{
- nsCOMPtr<nsIX509Cert> tmpcert = cert->priv->mozilla_cert;
-
- if (cert->priv->mozilla_cert)
- {
- NS_RELEASE (cert->priv->mozilla_cert);
- }
-
- cert->priv->mozilla_cert = mozilla_cert;
- NS_IF_ADDREF (cert->priv->mozilla_cert);
-}
-
-
-nsresult
-mozilla_x509_cert_get_mozilla_cert (MozillaX509Cert *cert, nsIX509Cert**aCert)
-{
- *aCert = cert->priv->mozilla_cert;
- NS_IF_ADDREF (*aCert);
-
- return *aCert ? NS_OK : NS_ERROR_FAILURE;
-}
-
-static const char*
-impl_get_title (EphyX509Cert *cert)
-{
- MozillaX509Cert *m_cert = MOZILLA_X509_CERT (cert);
-
- /* lazy initialization of the title private variable */
- if (m_cert->priv->title != NULL)
- {
- return m_cert->priv->title;
- }
-
- /* This title logic is adapted from Mozilla source at
- mozilla/security/manager/ssl/src/nsCertTree.cpp */
- nsString name;
- m_cert->priv->mozilla_cert->GetCommonName (name);
- if (name.Length())
- {
- nsCString cname;
- NS_UTF16ToCString (name, NS_CSTRING_ENCODING_UTF8, cname);
-
- m_cert->priv->title = g_strdup (cname.get());
- }
- else
- {
- /* No common name, so get the nickname instead */
- nsString nick;
- m_cert->priv->mozilla_cert->GetNickname (nick);
-
- nsCString cnick;
- NS_UTF16ToCString (nick, NS_CSTRING_ENCODING_UTF8, cnick);
-
- const char * str = cnick.get();
- char * colon = strchr (str, ':');
- if (colon)
- {
- m_cert->priv->title = g_strdup (colon+1);
- }
- else
- {
- m_cert->priv->title = g_strdup (cnick.get());
- }
- }
-
- return m_cert->priv->title;
-}
-
-static void
-impl_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- MozillaX509Cert *cert = MOZILLA_X509_CERT (object);
-
- switch (prop_id)
- {
- case PROP_MOZILLA_CERT:
- mozilla_x509_cert_set_mozilla_cert(cert,
- (nsIX509Cert*)g_value_get_pointer (value));
- break;
- default:
- break;
- }
-}
-
-static void
-impl_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- MozillaX509Cert *cert = MOZILLA_X509_CERT (object);
-
- switch (prop_id)
- {
- case PROP_MOZILLA_CERT:
- g_value_set_pointer (value, cert->priv->mozilla_cert);
- break;
- default:
- break;
- }
-}
-
-static void
-mozilla_x509_cert_init (MozillaX509Cert *cert)
-{
- cert->priv = MOZILLA_X509_CERT_GET_PRIVATE (cert);
-}
-
-static void
-mozilla_x509_cert_finalize (GObject *object)
-{
- MozillaX509Cert *cert = MOZILLA_X509_CERT (object);
-
- LOG ("Finalizing MozillaX509Cert %p", cert);
-
- if (cert->priv->mozilla_cert)
- {
- NS_RELEASE (cert->priv->mozilla_cert);
- }
-
- if (cert->priv->title)
- {
- g_free (cert->priv->title);
- }
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-ephy_x509_cert_init (EphyX509CertIface *iface)
-{
- iface->get_title = impl_get_title;
-}
-
-static void
-mozilla_x509_cert_class_init (MozillaX509CertClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = (GObjectClass*)g_type_class_peek_parent (klass);
-
- object_class->finalize = mozilla_x509_cert_finalize;
- object_class->set_property = impl_set_property;
- object_class->get_property = impl_get_property;
-
- g_object_class_install_property (object_class,
- PROP_MOZILLA_CERT,
- g_param_spec_pointer ("mozilla-cert",
- "Mozilla-Cert",
- "Mozilla XPCOM certificate",
- (GParamFlags)(G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));
-
- g_type_class_add_private (object_class, sizeof (MozillaX509CertPrivate));
-}
-
-MozillaX509Cert *
-mozilla_x509_cert_new (nsIX509Cert *moz_cert)
-{
- MozillaX509Cert *cert;
-
- cert = (MozillaX509Cert*)g_object_new (MOZILLA_TYPE_X509_CERT,
- "mozilla-cert", moz_cert,
- (char *) NULL);
- return cert;
-}
diff --git a/embed/xulrunner/embed/mozilla-x509-cert.h b/embed/xulrunner/embed/mozilla-x509-cert.h
deleted file mode 100644
index 9bb61d216..000000000
--- a/embed/xulrunner/embed/mozilla-x509-cert.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#ifndef MOZILLA_X509_CERT_H
-#define MOZILLA_X509_CERT_H
-
-#include "ephy-x509-cert.h"
-
-#include <glib-object.h>
-
-#include <nsCOMPtr.h>
-#include <nsIX509Cert.h>
-
-G_BEGIN_DECLS
-
-#define MOZILLA_TYPE_X509_CERT (mozilla_x509_cert_get_type ())
-#define MOZILLA_X509_CERT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOZILLA_TYPE_X509_CERT, MozillaX509Cert))
-#define MOZILLA_X509_CERT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOZILLA_TYPE_X509_CERT, MozillaX509CertClass))
-#define MOZILLA_IS_X509_CERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOZILLA_TYPE_X509_CERT))
-#define MOZILLA_IS_X509_CERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOZILLA_TYPE_X509_CERT))
-#define MOZILLA_X509_CERT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOZILLA_TYPE_X509_CERT, MozillaX509CertClass))
-
-typedef struct _MozillaX509Cert MozillaX509Cert;
-typedef struct _MozillaX509CertPrivate MozillaX509CertPrivate;
-typedef struct _MozillaX509CertClass MozillaX509CertClass;
-
-struct _MozillaX509Cert
-{
- GObject parent;
- MozillaX509CertPrivate *priv;
-};
-
-struct _MozillaX509CertClass
-{
- GObjectClass parent_class;
-};
-
-GType mozilla_x509_cert_get_type (void);
-
-MozillaX509Cert *mozilla_x509_cert_new (nsIX509Cert *aMozCert);
-
-nsresult mozilla_x509_cert_get_mozilla_cert (MozillaX509Cert *cert, nsIX509Cert **cert);
-
-G_END_DECLS
-
-#endif
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 59914d298..86e20f853 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,5 +1,3 @@
-data/glade/certs-manager.glade
-src/ephy-cert-manager-dialog.c
data/bme.desktop.in
data/epiphany.desktop.in
diff --git a/src/Makefile.am b/src/Makefile.am
index f34f5cfe3..6d8c4b968 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -97,14 +97,6 @@ libephymain_la_SOURCES = \
nodist_libephymain_la_SOURCES = \
$(TYPES_SOURCE)
-if ENABLE_CERTIFICATE_MANAGER
-NOINST_H_FILES += \
- ephy-cert-manager-dialog.h
-
-libephymain_la_SOURCES += \
- ephy-cert-manager-dialog.c
-endif
-
libephymain_la_CPPFLAGS = \
-I$(top_builddir)/lib \
-I$(top_builddir)/lib/egg \
diff --git a/src/ephy-cert-manager-dialog.c b/src/ephy-cert-manager-dialog.c
deleted file mode 100644
index bb3eb2d8a..000000000
--- a/src/ephy-cert-manager-dialog.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- * Copyright © 2005 Crispin Flowerday
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#include "config.h"
-
-#include "ephy-cert-manager-dialog.h"
-#include "ephy-shell.h"
-#include "ephy-embed-shell.h"
-#include "ephy-gui.h"
-#include "ephy-x509-cert.h"
-#include "ephy-certificate-manager.h"
-#include "ephy-embed-single.h"
-#include "ephy-file-helpers.h"
-#include "ephy-file-chooser.h"
-
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkcellrenderertext.h>
-#include <gtk/gtktreeview.h>
-#include <gtk/gtktreeselection.h>
-#include <gtk/gtkliststore.h>
-
-#include <glib/gi18n.h>
-#include <glib.h>
-
-/* Glade callbacks */
-void
-certs_manager_dialog_response_cb (GtkDialog *dialog,
- gint response_id,
- CertsManagerDialog *cm_dialog);
-void
-certs_manager_dialog_remove_button_clicked_cb (GtkButton *button,
- CertsManagerDialog *dialog);
-static void
-tree_view_selection_changed_cb (GtkTreeSelection *selection,
- CertsManagerDialog *dialog);
-
-#define EPHY_CERTIFICATE_MANAGER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_CERTS_MANAGER_DIALOG, CertsManagerDialogPrivate))
-
-struct _CertsManagerDialogPrivate
-{
- EphyCertificateManager *certs_manager;
-};
-
-enum
-{
- RESPONSE_IMPORT = 1
-};
-
-enum
-{
- PROP_WINDOW,
- PERSONAL_TREE_VIEW,
- PERSONAL_REMOVE_BUTTON,
- PERSONAL_VIEW_BUTTON,
- PERSONAL_EXPORT_BUTTON,
- SERVER_TREE_VIEW,
- SERVER_REMOVE_BUTTON,
- SERVER_VIEW_BUTTON,
- SERVER_PROPS_BUTTON,
- CA_TREE_VIEW,
- CA_REMOVE_BUTTON,
- CA_VIEW_BUTTON,
- CA_PROPS_BUTTON
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { "certs_manager_dialog", NULL, PT_NORMAL, 0 },
- { "personal_treeview", NULL, PT_NORMAL, 0 },
- { "personal_remove_button", NULL, PT_NORMAL, 0 },
- { "personal_view_button", NULL, PT_NORMAL, 0 },
- { "personal_export_button", NULL, PT_NORMAL, 0 },
- { "server_treeview", NULL, PT_NORMAL, 0 },
- { "server_remove_button", NULL, PT_NORMAL, 0 },
- { "server_view_button", NULL, PT_NORMAL, 0 },
- { "server_props_button", NULL, PT_NORMAL, 0 },
- { "ca_treeview", NULL, PT_NORMAL, 0 },
- { "ca_remove_button", NULL, PT_NORMAL, 0 },
- { "ca_view_button", NULL, PT_NORMAL, 0 },
- { "ca_props_button", NULL, PT_NORMAL, 0 },
-
- { NULL }
-};
-
-enum
-{
- COL_NAME,
- COL_CERT,
- N_COLUMNS
-};
-
-static void
-init_tree_view (CertsManagerDialog *dialog, GtkTreeView *tree_view)
-{
- GtkCellRenderer *renderer;
- GtkTreeSelection *selection;
- GtkTreeViewColumn * column;
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_set_headers_visible (tree_view, TRUE);
- gtk_tree_view_insert_column_with_attributes (tree_view,
- -1,
- _("Name"),
- renderer,
- "text", COL_NAME,
- NULL);
- column = gtk_tree_view_get_column (tree_view, COL_NAME);
- gtk_tree_view_column_set_sort_column_id (column, COL_NAME);
- selection = gtk_tree_view_get_selection (tree_view);
- g_signal_connect (selection,
- "changed",
- G_CALLBACK (tree_view_selection_changed_cb),
- dialog);
-
-
-}
-
-
-static void
-append_cert (EphyX509Cert* cert, GtkListStore *list_store)
-{
- GtkTreeIter iter;
- const char *title;
-
- title = ephy_x509_cert_get_title (cert);
- gtk_list_store_append (list_store, &iter);
- gtk_list_store_set (list_store, &iter,
- COL_NAME, title,
- COL_CERT, cert,
- -1);
-}
-
-static void
-fill_tree_view_from_list (GtkTreeView *tree_view,
- GList *list)
-{
- GtkListStore *list_store;
-
- list_store = gtk_list_store_new (N_COLUMNS,
- G_TYPE_STRING,
- G_TYPE_OBJECT);
- g_list_foreach (list, (GFunc)append_cert, list_store);
- gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL (list_store));
-}
-
-static void
-set_buttons_sensitive (CertsManagerDialog *dialog,
- gint button1,
- gint button2,
- gint button3,
- gboolean value)
-{
- GtkWidget *widget;
-
- widget = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[button1].id);
- gtk_widget_set_sensitive (widget, value);
-
- widget = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[button2].id);
- gtk_widget_set_sensitive (widget, value);
-
- widget = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[button3].id);
- gtk_widget_set_sensitive (widget, value);
-}
-
-
-static void
-chooser_response_cb (EphyFileChooser *chooser,
- int response,
- CertsManagerDialog *dialog)
-{
- CertsManagerDialogPrivate *priv = dialog->priv;
- if (response == GTK_RESPONSE_ACCEPT)
- {
- char *file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
-
- ephy_certificate_manager_import (priv->certs_manager, file);
-
- g_free (file);
- }
-
- gtk_widget_destroy (GTK_WIDGET (chooser));
-}
-
-static void
-import (GtkDialog *dialog, CertsManagerDialog *cm_dialog)
-{
- EphyFileChooser *chooser;
-
- chooser = ephy_file_chooser_new (_("Import Certificate"),
- GTK_WIDGET (dialog),
- GTK_FILE_CHOOSER_ACTION_OPEN,
- NULL,
- EPHY_FILE_FILTER_ALL);
-
- g_signal_connect (chooser, "response", G_CALLBACK (chooser_response_cb), cm_dialog);
-
- gtk_widget_show (GTK_WIDGET (chooser));
-}
-
-void
-certs_manager_dialog_response_cb (GtkDialog *widget,
- int response,
- CertsManagerDialog *dialog)
-{
- if (response == GTK_RESPONSE_HELP)
- {
- /* TODO open help */
- return;
- }
- else if (response == RESPONSE_IMPORT)
- {
- import (widget, dialog);
- return;
- }
-
- g_object_unref (dialog);
-}
-
-void
-certs_manager_dialog_remove_button_clicked_cb (GtkButton *button,
- CertsManagerDialog *dialog)
-{
- CertsManagerDialogPrivate *priv = dialog->priv;
- GtkTreeView *tree_view = NULL;
- GtkTreeModel *model;
- GtkTreeSelection *tree_selection;
- EphyDialog *ephy_dialog;
- GtkButton *personal_button;
- GtkButton *server_button;
- GtkButton *ca_button;
- GList *selected_list, *remove_list = NULL, *l, *r;
- GtkTreeIter iter;
- GtkTreePath *path;
-
- ephy_dialog = EPHY_DIALOG (dialog);
- personal_button = GTK_BUTTON (ephy_dialog_get_control
- (ephy_dialog,
- properties[PERSONAL_REMOVE_BUTTON].id));
- server_button = GTK_BUTTON (ephy_dialog_get_control
- (ephy_dialog,
- properties[SERVER_REMOVE_BUTTON].id));
- ca_button = GTK_BUTTON (ephy_dialog_get_control
- (ephy_dialog,
- properties[CA_REMOVE_BUTTON].id));
- if (button == personal_button)
- tree_view = GTK_TREE_VIEW (ephy_dialog_get_control
- (ephy_dialog,
- properties[PERSONAL_TREE_VIEW].id));
- else if (button == server_button)
- tree_view = GTK_TREE_VIEW (ephy_dialog_get_control
- (ephy_dialog,
- properties[SERVER_TREE_VIEW].id));
- else if (button == ca_button)
- tree_view = GTK_TREE_VIEW (ephy_dialog_get_control
- (ephy_dialog,
- properties[CA_TREE_VIEW].id));
- g_assert (tree_view != NULL);
- tree_selection = gtk_tree_view_get_selection (tree_view);
- selected_list = gtk_tree_selection_get_selected_rows (tree_selection, &model);
-
- for (l = selected_list; l != NULL; l = l->next)
- {
- remove_list = g_list_prepend (remove_list,
- gtk_tree_row_reference_new (model,
- (GtkTreePath *)l->data));
- }
- for (r = remove_list; r != NULL; r = r->next)
- {
- EphyX509Cert *cert;
- GValue val = {0, };
- path = gtk_tree_row_reference_get_path ((GtkTreeRowReference *)r->data);
-
- gtk_tree_model_get_iter (model, &iter, path);
- gtk_tree_model_get_value (model, &iter, COL_CERT, &val);
- cert = EPHY_X509_CERT (g_value_dup_object (&val));
- g_value_unset (&val);
-
- /* TODO check return value and notify if an error ocurred */
- ephy_certificate_manager_remove_certificate (priv->certs_manager,
- cert);
- g_object_unref (cert);
-
- gtk_list_store_remove (GTK_LIST_STORE (model),
- &iter);
-
- gtk_tree_row_reference_free ((GtkTreeRowReference *)r->data);
- gtk_tree_path_free (path);
- }
- g_list_free (selected_list);
- g_list_free (remove_list);
-}
-
-static void
-tree_view_selection_changed_cb (GtkTreeSelection *selection,
- CertsManagerDialog *dialog)
-{
- gint count;
- EphyDialog *ephy_dialog;
- GtkTreeView *tree_view;
- GtkTreeView *personal_tree_view;
- GtkTreeView *server_tree_view;
- GtkTreeView *ca_tree_view;
- gboolean has_selection;
-
- ephy_dialog = EPHY_DIALOG (dialog);
- tree_view = gtk_tree_selection_get_tree_view (selection);
- personal_tree_view = GTK_TREE_VIEW (ephy_dialog_get_control
- (ephy_dialog,
- properties[PERSONAL_TREE_VIEW].id));
- server_tree_view = GTK_TREE_VIEW (ephy_dialog_get_control
- (ephy_dialog,
- properties[SERVER_TREE_VIEW].id));
- ca_tree_view = GTK_TREE_VIEW (ephy_dialog_get_control
- (ephy_dialog,
- properties[CA_TREE_VIEW].id));
- count = gtk_tree_selection_count_selected_rows (selection);
- has_selection = count == 0 ? FALSE : TRUE;
- if (tree_view == personal_tree_view)
- set_buttons_sensitive (dialog,
- PERSONAL_REMOVE_BUTTON,
- PERSONAL_VIEW_BUTTON,
- PERSONAL_EXPORT_BUTTON,
- has_selection);
- else if (tree_view == server_tree_view)
- set_buttons_sensitive (dialog,
- SERVER_REMOVE_BUTTON,
- SERVER_VIEW_BUTTON,
- SERVER_PROPS_BUTTON,
- has_selection);
- else if (tree_view == ca_tree_view)
- set_buttons_sensitive (dialog,
- CA_REMOVE_BUTTON,
- CA_VIEW_BUTTON,
- CA_PROPS_BUTTON,
- has_selection);
-}
-
-
-static void
-certs_manager_dialog_init (CertsManagerDialog *dialog)
-{
- CertsManagerDialogPrivate *priv;
- EphyEmbedShell *shell;
- GtkWidget *window;
- GtkTreeView *personal_treeview;
- GtkTreeView *server_treeview;
- GtkTreeView *ca_treeview;
- GList *personalCerts;
- GList *serverCerts;
- GList *caCerts;
- GtkWidget *button;
-
- priv = dialog->priv = EPHY_CERTIFICATE_MANAGER_GET_PRIVATE (dialog);
-
- shell = ephy_embed_shell_get_default ();
- g_object_ref (shell);
-
- priv->certs_manager = EPHY_CERTIFICATE_MANAGER (ephy_embed_shell_get_embed_single (shell));
-
- ephy_dialog_construct (EPHY_DIALOG (dialog),
- properties,
- ephy_file ("certs-manager.glade"),
- "certs_manager_dialog",
- NULL);
-
- window = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[PROP_WINDOW].id);
- g_signal_connect (window, "response",
- G_CALLBACK (certs_manager_dialog_response_cb), dialog);
-
- button = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[PERSONAL_REMOVE_BUTTON].id);
- g_signal_connect (button, "clicked",
- G_CALLBACK (certs_manager_dialog_remove_button_clicked_cb), dialog);
- button = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[CA_REMOVE_BUTTON].id);
- g_signal_connect (button, "clicked",
- G_CALLBACK (certs_manager_dialog_remove_button_clicked_cb), dialog);
- button = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[SERVER_REMOVE_BUTTON].id);
- g_signal_connect (button, "clicked",
- G_CALLBACK (certs_manager_dialog_remove_button_clicked_cb), dialog);
-
- /* disabling buttons until a certificate is selected */
- set_buttons_sensitive (dialog,
- PERSONAL_REMOVE_BUTTON,
- PERSONAL_VIEW_BUTTON,
- PERSONAL_EXPORT_BUTTON,
- FALSE);
- set_buttons_sensitive (dialog,
- SERVER_REMOVE_BUTTON,
- SERVER_VIEW_BUTTON,
- SERVER_PROPS_BUTTON,
- FALSE);
- set_buttons_sensitive (dialog,
- CA_REMOVE_BUTTON,
- CA_VIEW_BUTTON,
- CA_PROPS_BUTTON,
- FALSE);
-
- /* filling personal treeview */
- personalCerts = ephy_certificate_manager_get_certificates (priv->certs_manager,
- PERSONAL_CERTIFICATE);
-
- personal_treeview = GTK_TREE_VIEW (ephy_dialog_get_control
- (EPHY_DIALOG(dialog),
- properties[PERSONAL_TREE_VIEW].id));
- init_tree_view (dialog, personal_treeview);
- fill_tree_view_from_list (personal_treeview, personalCerts);
- /* filling server treeview */
- serverCerts = ephy_certificate_manager_get_certificates (priv->certs_manager,
- SERVER_CERTIFICATE);
- server_treeview = GTK_TREE_VIEW (ephy_dialog_get_control
- (EPHY_DIALOG(dialog),
- properties[SERVER_TREE_VIEW].id));
- init_tree_view (dialog, server_treeview);
- fill_tree_view_from_list (server_treeview, serverCerts);
- /* filling ca treeview */
- caCerts = ephy_certificate_manager_get_certificates (priv->certs_manager,
- CA_CERTIFICATE);
- ca_treeview = GTK_TREE_VIEW (ephy_dialog_get_control
- (EPHY_DIALOG(dialog),
- properties[CA_TREE_VIEW].id));
- init_tree_view (dialog, ca_treeview);
- fill_tree_view_from_list (ca_treeview, caCerts);
-
- g_list_foreach (personalCerts, (GFunc)g_object_unref, NULL);
- g_list_free (personalCerts);
-
- g_list_foreach (serverCerts, (GFunc)g_object_unref, NULL);
- g_list_free (serverCerts);
-
- g_list_foreach (caCerts, (GFunc)g_object_unref, NULL);
- g_list_free (caCerts);
-}
-
-static void
-certs_manager_dialog_finalize (GObject *object)
-{
-/*
- CertsManagerDialog *dialog = EPHY_CERTS_MANAGER_DIALOG (object);
- CertsManagerDialogPrivate *priv = dialog->priv;
-*/
- EphyEmbedShell *shell;
-
- /* TODO free certs in the treeviews */
-
- G_OBJECT_CLASS (certs_manager_dialog_parent_class)->finalize (object);
-
- shell = ephy_embed_shell_get_default ();
- g_object_unref (shell);
-}
-
-static void
-certs_manager_dialog_class_init (CertsManagerDialogClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->finalize = certs_manager_dialog_finalize;
-
- g_type_class_add_private (object_class, sizeof (CertsManagerDialogPrivate));
-}
-
-/* public functions */
-
-G_DEFINE_TYPE (CertsManagerDialog, certs_manager_dialog, EPHY_TYPE_DIALOG)
-
-EphyDialog *
-certs_manager_dialog_new (void)
-{
- return g_object_new (EPHY_TYPE_CERTS_MANAGER_DIALOG, NULL);
-}
diff --git a/src/ephy-cert-manager-dialog.h b/src/ephy-cert-manager-dialog.h
deleted file mode 100644
index 792ba9bb2..000000000
--- a/src/ephy-cert-manager-dialog.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright © 2003 Robert Marcano
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $Id$
- */
-
-#ifndef EPHY_CERT_MANAGER_DIALOG_H
-#define EPHY_CERT_MANAGER_DIALOG_H
-
-#include <glib.h>
-#include "ephy-dialog.h"
-
-G_BEGIN_DECLS
-
-#define EPHY_TYPE_CERTS_MANAGER_DIALOG (certs_manager_dialog_get_type ())
-#define EPHY_CERTS_MANAGER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_CERTS_MANAGER_DIALOG, CertsManagerDialog))
-#define EPHY_CERTS_MANAGER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_CERTS_MANAGER_DIALOG, CertsManagerDialogClass))
-#define EPHY_IS_CERTS_MANAGER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_CERTS_MANAGER_DIALOG))
-#define EPHY_IS_CERTS_MANAGER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_CERTS_MANAGER_DIALOG))
-#define EPHY_CERTS_MANAGER_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_CERTS_MANAGER_DIALOG, CertsManagerDialogClass))
-
-typedef struct _CertsManagerDialogClass CertsManagerDialogClass;
-typedef struct _CertsManagerDialog CertsManagerDialog;
-typedef struct _CertsManagerDialogPrivate CertsManagerDialogPrivate;
-
-struct _CertsManagerDialogClass
-{
- EphyDialogClass parent_class;
-};
-
-struct _CertsManagerDialog
-{
- EphyDialog parent;
-
- /*< private >*/
- CertsManagerDialogPrivate *priv;
-};
-
-GType certs_manager_dialog_get_type (void);
-
-EphyDialog *certs_manager_dialog_new (void);
-
-G_END_DECLS
-
-#endif
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 46da33704..cfb3027d8 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -187,7 +187,7 @@ static const GtkActionEntry ephy_menu_entries [] = {
{ "EditPersonalData", NULL, N_("P_ersonal Data"), NULL,
N_("View and remove cookies and passwords"),
G_CALLBACK (window_cmd_edit_personal_data) },
-#ifdef ENABLE_CERTIFICATE_MANAGER
+#if 0
{ "EditCertificates", NULL, N_("Certificate_s"), NULL,
N_("Manage Certificates"),
G_CALLBACK (window_cmd_edit_certificates) },
diff --git a/src/window-commands.c b/src/window-commands.c
index dd5bd634d..ec5bfe50c 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -726,22 +726,13 @@ window_cmd_edit_personal_data (GtkAction *action,
g_free (host);
}
-#ifdef ENABLE_CERTIFICATE_MANAGER
-
-#include "ephy-cert-manager-dialog.h"
-
+#if 0
void
window_cmd_edit_certificates (GtkAction *action,
EphyWindow *window)
{
- EphyDialog *dialog;
-
- dialog = certs_manager_dialog_new ();
-
- ephy_dialog_show (dialog);
}
-
-#endif /* ENABLE_CERTIFICATE_MANAGER */
+#endif
void
window_cmd_edit_prefs (GtkAction *action,