epiphany r8191 - in trunk: data data/glade src



Author: chpe
Date: Mon Apr  7 10:34:49 2008
New Revision: 8191
URL: http://svn.gnome.org/viewvc/epiphany?rev=8191&view=rev

Log:
Remove detailed font prefs, they're obsolete on webkit.
Remove the epiphany-pango schemas file, same reason.


Removed:
   trunk/data/epiphany-fonts.schemas
   trunk/data/epiphany-pango.schemas
Modified:
   trunk/data/Makefile.am
   trunk/data/glade/prefs-dialog.glade
   trunk/src/prefs-dialog.c

Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am	(original)
+++ trunk/data/Makefile.am	Mon Apr  7 10:34:49 2008
@@ -11,9 +11,8 @@
 desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
 
 schemadir = $(GCONF_SCHEMA_FILE_DIR)
-extra_schema_files = epiphany-fonts.schemas epiphany-pango.schemas
 schema_in_files = epiphany.schemas.in epiphany-lockdown.schemas.in
-schema_DATA = $(schema_in_files:.schemas.in=.schemas) $(extra_schema_files)
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
 
 aboutdir = $(pkgdatadir)
 about_DATA = epiphany.xhtml
@@ -58,7 +57,6 @@
 	$(aboutdialog_DATA)		\
 	$(service_in_files)		\
 	$(schema_in_files)		\
-	$(extra_schema_files)		\
 	$(desktop_in_files)		\
 	$(about_DATA)			\
 	$(mimepermission_DATA)		\
@@ -67,8 +65,7 @@
 	$(service_DATA)			\
 	$(m4data_DATA)			\
 	epiphany-service.xml		\
-	check-mime.py			\
-	generate-font-schemas.py
+	check-mime.py
 
 DISTCLEANFILES = \
 	$(service_DATA)		\

Modified: trunk/data/glade/prefs-dialog.glade
==============================================================================
--- trunk/data/glade/prefs-dialog.glade	(original)
+++ trunk/data/glade/prefs-dialog.glade	Mon Apr  7 10:34:49 2008
@@ -423,90 +423,52 @@
 	      <property name="spacing">6</property>
 
 	      <child>
-		<widget class="GtkHBox" id="hbox182">
+		<widget class="GtkHBox" id="hbox177">
 		  <property name="visible">True</property>
 		  <property name="homogeneous">False</property>
-		  <property name="spacing">24</property>
+		  <property name="spacing">12</property>
 
 		  <child>
-		    <widget class="GtkHBox" id="hbox177">
+		    <widget class="GtkLabel" id="label1312">
 		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">12</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label1312">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Minimum size:</property>
-			  <property name="use_underline">True</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</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">min_size_spinbutton</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="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkSpinButton" id="min_size_spinbutton">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="climb_rate">1</property>
-			  <property name="digits">0</property>
-			  <property name="numeric">False</property>
-			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			  <property name="snap_to_ticks">False</property>
-			  <property name="wrap">False</property>
-			  <property name="adjustment">7 1 100 1 10 10</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
+		      <property name="label" translatable="yes">_Minimum size:</property>
+		      <property name="use_underline">True</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</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="mnemonic_widget">min_size_spinbutton</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="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
 		    </packing>
 		  </child>
 
 		  <child>
-		    <widget class="GtkHButtonBox" id="hbuttonbox16">
+		    <widget class="GtkSpinButton" id="min_size_spinbutton">
 		      <property name="visible">True</property>
-		      <property name="layout_style">GTK_BUTTONBOX_END</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkButton" id="font_prefs_button">
-			  <property name="visible">True</property>
-			  <property name="can_default">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">_Detailed Font Settingsâ</property>
-			  <property name="use_underline">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			</widget>
-		      </child>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">7 1 100 1 10 10</property>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
-		      <property name="expand">True</property>
+		      <property name="expand">False</property>
 		      <property name="fill">True</property>
 		    </packing>
 		  </child>
@@ -1726,329 +1688,4 @@
   </child>
 </widget>
 
-<widget class="GtkDialog" id="fonts_dialog">
-  <property name="border_width">5</property>
-  <property name="title" translatable="yes">Fonts</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="resizable">False</property>
-  <property name="destroy_with_parent">True</property>
-  <property name="icon_name">gtk-preferences</property>
-  <property name="role">epiphany-font-preferences</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_DIALOG</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-vbox4">
-      <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_area4">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="helpbutton2">
-	      <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="closebutton2">
-	      <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="GtkTable" id="table73">
-	  <property name="border_width">5</property>
-	  <property name="visible">True</property>
-	  <property name="n_rows">5</property>
-	  <property name="n_columns">3</property>
-	  <property name="homogeneous">False</property>
-	  <property name="row_spacing">6</property>
-	  <property name="column_spacing">12</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label1134">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Variable width:</property>
-	      <property name="use_underline">True</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</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">variable_combo</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="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label1138">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Fixed width:</property>
-	      <property name="use_underline">True</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</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">monospace_combo</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="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label1217">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Minimum size:</property>
-	      <property name="use_underline">True</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</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">min_size_spinbutton</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="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">4</property>
-	      <property name="bottom_attach">5</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkComboBox" id="monospace_combo">
-	      <property name="visible">True</property>
-	      <property name="add_tearoffs">False</property>
-	      <property name="focus_on_click">True</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="y_options">fill</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHSeparator" id="hseparator2">
-	      <property name="visible">True</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="y_padding">6</property>
-	      <property name="x_options">fill</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkComboBox" id="fonts_language_combo">
-	      <property name="visible">True</property>
-	      <property name="add_tearoffs">False</property>
-	      <property name="focus_on_click">True</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="y_options">fill</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkComboBox" id="variable_combo">
-	      <property name="visible">True</property>
-	      <property name="add_tearoffs">False</property>
-	      <property name="focus_on_click">True</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
-	      <property name="y_options">fill</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label1121">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">For l_anguage:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_CENTER</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">fonts_language_combo</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="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="min_size_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">1</property>
-	      <property name="digits">0</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">True</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">1 1 100 1 2 2</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">4</property>
-	      <property name="bottom_attach">5</property>
-	      <property name="x_options">shrink|fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="fixed_size_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">1</property>
-	      <property name="digits">0</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">True</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">1 1 100 1 2 2</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="x_options">shrink|fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSpinButton" id="variable_size_spinbutton">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="climb_rate">1</property>
-	      <property name="digits">0</property>
-	      <property name="numeric">True</property>
-	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-	      <property name="snap_to_ticks">True</property>
-	      <property name="wrap">False</property>
-	      <property name="adjustment">1 1 100 1 2 2</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
-	      <property name="x_options">shrink|fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
 </glade-interface>

Modified: trunk/src/prefs-dialog.c
==============================================================================
--- trunk/src/prefs-dialog.c	(original)
+++ trunk/src/prefs-dialog.c	Mon Apr  7 10:34:49 2008
@@ -64,7 +64,6 @@
 #include <gtk/gtkmain.h>
 #include <string.h>
 
-#define CONF_FONTS_FOR_LANGUAGE	"/apps/epiphany/dialogs/preferences_font_language"
 #define DOWNLOAD_BUTTON_WIDTH	8
 
 static void prefs_dialog_class_init	(PrefsDialogClass *klass);
@@ -79,39 +78,6 @@
 
 enum
 {
-	FONT_TYPE_VARIABLE,
-	FONT_TYPE_MONOSPACE
-};
-
-static const char * const fonts_types[] =
-{
-	"variable",
-	"monospace"
-};
-
-enum
-{
-	FONT_SIZE_FIXED,
-	FONT_SIZE_VAR,
-	FONT_SIZE_MIN
-};
-
-static const char * const size_prefs [] =
-{
-	CONF_RENDERING_FONT_FIXED_SIZE,
-	CONF_RENDERING_FONT_VAR_SIZE,
-	CONF_RENDERING_FONT_MIN_SIZE
-};
-
-static const int default_size [] =
-{
-	10,
-	11,
-	7
-};
-
-enum
-{
 	WINDOW_PROP,
 	NOTEBOOK_PROP,
 
@@ -126,7 +92,6 @@
 	/* Fonts and Colors */
 	USE_FONTS_PROP,
 	MIN_SIZE_PROP,
-	FONT_PREFS_BUTTON_PROP,
 	USE_COLORS_PROP,
 	SMOOTHSCROLL_PROP,
 	CSS_CONTAINER_PROP,
@@ -172,7 +137,6 @@
 	/* Fonts and Colors */
 	{ "use_fonts_checkbutton",	CONF_RENDERING_USE_OWN_FONTS,	PT_AUTOAPPLY | PT_INVERTED,	0 },
 	{ "min_size_spinbutton",	CONF_RENDERING_FONT_MIN_SIZE,	PT_AUTOAPPLY,	0 },
-	{ "font_prefs_button",		NULL,				PT_NORMAL,	0 },
 	{ "use_colors_checkbutton",	CONF_RENDERING_USE_OWN_COLORS,	PT_AUTOAPPLY | PT_INVERTED,	0 },
 	{ "smoothscroll_button",	CONF_DISPLAY_SMOOTHSCROLL,	PT_AUTOAPPLY,	0 },
 	{ "css_container",		NULL,				PT_NORMAL,	0 },
@@ -222,44 +186,6 @@
 
 enum
 {
-	FONTS_WINDOW_PROP,
-	FONTS_LANGUAGE_PROP,
-	FONTS_VARIABLE_PROP,
-	FONTS_MONOSPACE_PROP,
-	FONTS_VARIABLE_SIZE_PROP,
-	FONTS_FIXED_SIZE_PROP,
-	FONTS_MIN_SIZE_PROP,
-};
-
-static const
-EphyDialogProperty fonts_properties [] =
-{
-	{ "fonts_dialog",		NULL,				PT_NORMAL, 0},
-	{ "fonts_language_combo",	CONF_FONTS_FOR_LANGUAGE,	PT_AUTOAPPLY,	G_TYPE_STRING },
-	{ "variable_combo",		NULL,				PT_AUTOAPPLY,	G_TYPE_STRING },
-	{ "monospace_combo",		NULL,				PT_AUTOAPPLY,	G_TYPE_STRING },
-	{ "variable_size_spinbutton",	NULL,				PT_AUTOAPPLY,	0 },
-	{ "fixed_size_spinbutton",	NULL,				PT_AUTOAPPLY,	0 },
-	{ "min_size_spinbutton",	NULL,				PT_AUTOAPPLY,	0 },
-
-	{ NULL }
-};
-
-enum
-{
-	COL_FONTS_LANG_NAME,
-	COL_FONTS_LANG_CODE
-};
-
-enum
-{
-	COL_FONT_NAME,
-	COL_FONT_DATA,
-	COL_FONT_IS_SEP
-};
-
-enum
-{
 	COL_LANG_NAME,
 	COL_LANG_CODE
 };
@@ -283,7 +209,6 @@
 {
 	GtkTreeView *lang_treeview;
 	GtkTreeModel *lang_model;
-	EphyDialog *fonts_dialog;
 	EphyDialog *add_lang_dialog;
 	GtkWidget *lang_add_button;
 	GtkWidget *lang_remove_button;
@@ -301,16 +226,6 @@
 	PrefsDialog *dialog = EPHY_PREFS_DIALOG (object);
 	PrefsDialogPrivate *priv = dialog->priv;
 
-	if (priv->fonts_dialog != NULL)
-	{
-		EphyDialog **fonts_dialog = &priv->fonts_dialog;
-
-		g_object_remove_weak_pointer
-			(G_OBJECT (priv->fonts_dialog),
-			(gpointer *) fonts_dialog);
-		g_object_unref (priv->fonts_dialog);
-	}
-
 	if (priv->add_lang_dialog != NULL)
 	{
 		EphyDialog **add_lang_dialog = &priv->add_lang_dialog;
@@ -361,118 +276,6 @@
 	ephy_gui_help (GTK_WINDOW (window), "epiphany", help_preferences[id]);
 }
 
-static void
-setup_font_combo (EphyDialog *dialog,
-		  const char *type,
-		  const char *code,
-		  int prop)
-{
-	GtkWidget *combo;
-	GtkListStore *store;
-	GtkTreeIter iter;
-	GList *fonts, *l;
-	char key[255];
-	EphyEmbedSingle *single;
-
-	single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell));
-	fonts = ephy_embed_single_get_font_list (single, code);
-	fonts = g_list_sort (fonts, (GCompareFunc) strcmp);
-
-	g_snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT, type, code);
-
-	combo = ephy_dialog_get_control (dialog, fonts_properties[prop].id);
-	store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
-
-	gtk_list_store_append (store, &iter);
-	gtk_list_store_set (store, &iter,
-			    COL_FONT_NAME, _("Default"),
-			    COL_FONT_DATA, NULL,
-			    COL_FONT_IS_SEP, FALSE,
-			    -1);
-	gtk_list_store_append (store, &iter);
-	gtk_list_store_set (store, &iter,
-			    COL_FONT_NAME, "",
-			    COL_FONT_DATA, "",
-			    COL_FONT_IS_SEP, TRUE,
-			    -1);
-
-	for (l = fonts; l != NULL; l = l->next)
-	{
-		gtk_list_store_append (store, &iter);
-		gtk_list_store_set (store, &iter,
-				    COL_FONT_NAME, (char *) l->data,
-				    COL_FONT_DATA, (char *) l->data,
-				    COL_FONT_IS_SEP, FALSE,
-				    -1);
-	}
-	g_list_foreach (fonts, (GFunc) g_free, NULL);
-	g_list_free (fonts);
-
-	ephy_dialog_set_pref (dialog, fonts_properties[prop].id, NULL);
-
-	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (store));
-	gtk_combo_box_set_active (GTK_COMBO_BOX (combo), -1);
-
-	ephy_dialog_set_pref (dialog, fonts_properties[prop].id, key);
-
-	g_object_unref (store);
-}
-
-static void
-fonts_language_changed_cb (EphyDialog *dialog,
-			   const GValue *value,
-			   gpointer data)
-{
-	const char *code;
-	char key[128];
-	int size;
-
-	code = g_value_get_string (value);
-
-	LOG ("fonts language combo changed, new code '%s'", code);
-
-	setup_font_combo (dialog, "variable", code, FONTS_VARIABLE_PROP);
-	setup_font_combo (dialog, "monospace", code, FONTS_MONOSPACE_PROP);
-
-	g_snprintf (key, sizeof (key), "%s_%s", size_prefs[FONT_SIZE_VAR], code);
-	size = eel_gconf_get_integer (key);
-	if (size <= 0)
-	{
-		eel_gconf_set_integer (key, default_size[FONT_SIZE_VAR]);
-	}
-	ephy_dialog_set_pref (dialog, fonts_properties[FONTS_VARIABLE_SIZE_PROP].id, key);
-
-	g_snprintf (key, sizeof (key), "%s_%s", size_prefs[FONT_SIZE_FIXED], code);
-	size = eel_gconf_get_integer (key);
-	if (size <= 0)
-	{
-		eel_gconf_set_integer (key, default_size[FONT_SIZE_FIXED]);
-	}
-	ephy_dialog_set_pref (dialog, fonts_properties[FONTS_FIXED_SIZE_PROP].id, key);
-
-	g_snprintf (key, sizeof (key), "%s_%s", size_prefs[FONT_SIZE_MIN], code);
-	size = eel_gconf_get_integer (key);
-	if (size <= 0)
-	{
-		eel_gconf_set_integer (key, default_size[FONT_SIZE_MIN]);
-	}
-	ephy_dialog_set_pref (dialog, fonts_properties[FONTS_MIN_SIZE_PROP].id, key);
-}
-
-static void
-font_prefs_dialog_response_cb (GtkWidget *widget,
-			       int response,
-			       EphyDialog *dialog)
-{
-	if (response == GTK_RESPONSE_HELP)
-	{
-		ephy_gui_help (GTK_WINDOW (widget), "epiphany", "fonts-and-style-preferences");
-		return;
-	}
-
-	g_object_unref (dialog);
-}
-
 static gboolean
 row_is_separator (GtkTreeModel *model,
                   GtkTreeIter *iter,
@@ -486,126 +289,6 @@
 	return is_sep;
 }
 
-static EphyDialog *
-setup_fonts_dialog (PrefsDialog *pd)
-{
-	EphyDialog *dialog;
-	GtkWidget *window, *parent, *variable_combo, *monospace_combo;
-	GtkWidget *combo;
-	GtkCellRenderer *renderer;
-	GtkListStore *store;
-	GtkTreeModel *sortmodel;
-	GtkTreeIter iter;
-	guint n_fonts_languages, i;
-	const EphyFontsLanguageInfo *fonts_languages;
-
-	parent = ephy_dialog_get_control (EPHY_DIALOG (pd),
-					  properties[WINDOW_PROP].id);
-
-	dialog =  EPHY_DIALOG (g_object_new (EPHY_TYPE_DIALOG,
-					     "parent-window", parent,
-					     NULL));
-
-	ephy_dialog_construct (dialog, fonts_properties,
-			       ephy_file ("prefs-dialog.glade"),
-			       "fonts_dialog", NULL);
-
-	ephy_dialog_get_controls
-		(dialog,
-		 fonts_properties[FONTS_WINDOW_PROP].id, &window,
-		 fonts_properties[FONTS_LANGUAGE_PROP].id, &combo,
-		 fonts_properties[FONTS_VARIABLE_PROP].id, &variable_combo,
-		 fonts_properties[FONTS_MONOSPACE_PROP].id, &monospace_combo,
-		 NULL);
-
-	gtk_window_group_add_window (ephy_gui_ensure_window_group (GTK_WINDOW (parent)),
-				     GTK_WINDOW (window));
-	g_signal_connect (window, "response",
-			  G_CALLBACK (font_prefs_dialog_response_cb), dialog);
-
-	renderer = gtk_cell_renderer_text_new ();
-        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (variable_combo), renderer, TRUE);
-        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (variable_combo), renderer,
-                                        "text", COL_FONT_NAME,
-                                        NULL);
-	ephy_dialog_set_data_column (dialog, fonts_properties[FONTS_VARIABLE_PROP].id,
-				     COL_FONT_DATA);
-        renderer = gtk_cell_renderer_text_new ();
-        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (monospace_combo), renderer, TRUE);
-        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (monospace_combo), renderer,
-                                        "text", COL_FONT_NAME,
-                                        NULL);
-	ephy_dialog_set_data_column (dialog, fonts_properties[FONTS_MONOSPACE_PROP].id,
-				     COL_FONT_DATA);
-
-	gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (variable_combo),
-					      (GtkTreeViewRowSeparatorFunc) row_is_separator,
-					      GINT_TO_POINTER (COL_FONT_IS_SEP), NULL);
-	gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (monospace_combo),
-					      (GtkTreeViewRowSeparatorFunc) row_is_separator,
-					      GINT_TO_POINTER (COL_FONT_IS_SEP), NULL);
-
-	store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
-
-	fonts_languages = ephy_font_languages ();
-	n_fonts_languages = ephy_font_n_languages ();
-	
-	for (i = 0; i < n_fonts_languages; i++)
-	{
-		gtk_list_store_append (store, &iter);
-		gtk_list_store_set (store, &iter,
-				    COL_FONTS_LANG_NAME, Q_(fonts_languages[i].title),
-				    COL_FONTS_LANG_CODE, fonts_languages[i].code,
-				    -1);
-	}
-
-	sortmodel = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (store));
-	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sortmodel),
-					      COL_FONTS_LANG_NAME,
-					      GTK_SORT_ASCENDING);
-
-	gtk_combo_box_set_model (GTK_COMBO_BOX (combo), sortmodel);
-
-        renderer = gtk_cell_renderer_text_new ();
-        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
-        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
-                                        "text", COL_FONTS_LANG_NAME,
-                                        NULL);
-
-	ephy_dialog_set_data_column (dialog, fonts_properties[FONTS_LANGUAGE_PROP].id, COL_FONTS_LANG_CODE);
-
-	g_signal_connect (dialog, "changed::fonts_language_combo",
-			  G_CALLBACK (fonts_language_changed_cb),
-			  NULL);
-
-	g_object_unref (store);
-	g_object_unref (sortmodel);
-
-	return dialog;
-}
-
-static void
-font_prefs_button_clicked_cb (GtkWidget *button,
-			      PrefsDialog *pd)
-{
-	PrefsDialogPrivate *priv = pd->priv;
-
-	if (priv->fonts_dialog == NULL)
-	{
-		EphyDialog **fonts_dialog;
-
-		priv->fonts_dialog = setup_fonts_dialog (pd);
-
-		fonts_dialog = &priv->fonts_dialog;
-
-		g_object_add_weak_pointer
-			(G_OBJECT (priv->fonts_dialog),
-			(gpointer *) fonts_dialog);
-	}
-
-	ephy_dialog_show (priv->fonts_dialog);
-}
-
 static void
 css_checkbox_toggled (GtkToggleButton *button,
 		      GtkWidget *widget)
@@ -1491,7 +1174,7 @@
 	EphyDialog *dialog = EPHY_DIALOG (pd);
 	EphyEncodings *encodings;
 	GtkWidget *window, *curr_button, *blank_button;
-	GtkWidget *clear_cache_button, *font_prefs_button;
+	GtkWidget *clear_cache_button;
 	GtkWidget *css_checkbox, *css_edit_box, *css_edit_button, *css_container;
 	gboolean sensitive;
 
@@ -1511,7 +1194,6 @@
 		 properties[WINDOW_PROP].id, &window,
 		 properties[HOMEPAGE_CURRENT_PROP].id, &curr_button,
 		 properties[HOMEPAGE_BLANK_PROP].id, &blank_button,
-		 properties[FONT_PREFS_BUTTON_PROP].id, &font_prefs_button,
 		 properties[CSS_CHECKBOX_PROP].id, &css_checkbox,
 		 properties[CSS_EDIT_BOX_PROP].id, &css_edit_box,
 		 properties[CSS_EDIT_BUTTON_PROP].id, &css_edit_button,
@@ -1534,9 +1216,6 @@
 	gtk_widget_set_sensitive (curr_button, sensitive);
 	gtk_widget_set_sensitive (blank_button, sensitive);
 
-	g_signal_connect (font_prefs_button, "clicked",
-			  G_CALLBACK (font_prefs_button_clicked_cb), dialog);
-
 	css_checkbox_toggled (GTK_TOGGLE_BUTTON (css_checkbox), css_edit_box);
 	g_signal_connect (css_checkbox, "toggled",
 			  G_CALLBACK (css_checkbox_toggled), css_edit_box);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]