[ghex] Remove custom print widgets



commit 69b2279032a49b589a432d0550f77f3e3b50fdfa
Author: RafaÅ MuÅyÅo <galtgendo gmail com>
Date:   Thu Jul 21 14:04:46 2011 +0200

    Remove custom print widgets

 po/POTFILES.in                |    2 -
 src/Makefile.am               |    2 -
 src/gnome-print-font-dialog.c |  298 -----------
 src/gnome-print-font-dialog.h |   56 ---
 src/gnome-print-font-picker.c | 1089 -----------------------------------------
 src/gnome-print-font-picker.h |  140 ------
 src/preferences.c             |   27 +-
 7 files changed, 8 insertions(+), 1606 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cdfdcf5..39727de 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,8 +7,6 @@ src/converter.c
 src/findreplace.c
 src/ghex-ui.xml
 src/ghex-window.c
-src/gnome-print-font-dialog.c
-src/gnome-print-font-picker.c
 src/gtkhex.c
 src/hex-dialog.c
 src/hex-document-ui.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 94160b2..753d14b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,8 +46,6 @@ ghex2_SOURCES = \
 	hex-document-ui.c preferences.c findreplace.c converter.c	\
 	config.c main.c ui.c chartable.c				\
 	print.c ghex-window.c ghex-window.h				\
-	gnome-print-font-dialog.c gnome-print-font-dialog.h		\
-	gnome-print-font-picker.c gnome-print-font-picker.h		\
 	factory.c factory.h hex-dialog.c hex-dialog.h			\
 	configuration.h preferences.h findreplace.h print.h		\
 	converter.h chartable.h ui.h
diff --git a/src/preferences.c b/src/preferences.c
index 2c2ef72..0769b2b 100644
--- a/src/preferences.c
+++ b/src/preferences.c
@@ -27,9 +27,6 @@
 
 #include <gtk/gtk.h>
 
-#include <libgnomeprintui/gnome-font-dialog.h>
-
-#include "gnome-print-font-picker.h"
 #include "preferences.h"
 #include "configuration.h"
 #include "ghex-window.h"
@@ -246,10 +243,7 @@ create_prefs_dialog()
 					 GTK_FILL, GTK_FILL,
 					 4, 4);
 
-	pui->df_button = gnome_print_font_picker_new();
-	gnome_print_font_picker_set_mode (GNOME_PRINT_FONT_PICKER (pui->df_button), GNOME_PRINT_FONT_PICKER_MODE_FONT_INFO);
-	gnome_print_font_picker_fi_set_use_font_in_label (GNOME_PRINT_FONT_PICKER (pui->df_button), TRUE, 14);
-	gnome_print_font_picker_fi_set_show_size (GNOME_PRINT_FONT_PICKER (pui->df_button), TRUE);
+	pui->df_button = gtk_font_button_new_with_font(def_font_name);
 	g_signal_connect (G_OBJECT (pui->df_button), "font_set",
 					  G_CALLBACK (select_font_cb), pui);
 	pui->df_label = gtk_label_new("");
@@ -278,10 +272,7 @@ create_prefs_dialog()
 	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
 					 GTK_FILL, GTK_FILL,
 					 4, 4);
-	pui->hf_button = gnome_print_font_picker_new();
-	gnome_print_font_picker_set_mode (GNOME_PRINT_FONT_PICKER (pui->hf_button), GNOME_PRINT_FONT_PICKER_MODE_FONT_INFO);
-	gnome_print_font_picker_fi_set_use_font_in_label (GNOME_PRINT_FONT_PICKER (pui->hf_button), TRUE, 14);
-	gnome_print_font_picker_fi_set_show_size (GNOME_PRINT_FONT_PICKER (pui->hf_button), TRUE);
+	pui->hf_button = gtk_font_button_new_with_font(def_font_name);
 	g_signal_connect (G_OBJECT (pui->hf_button), "font_set",
 					  G_CALLBACK (select_font_cb), pui);
 	pui->hf_label = gtk_label_new("");
@@ -382,12 +373,10 @@ void set_current_prefs(PropertyUI *pui) {
 	}
 
 	if(header_font_name)
-		gnome_print_font_picker_set_font_name
-			(GNOME_PRINT_FONT_PICKER(pui->hf_button),
+		gtk_font_button_set_font_name(GTK_FONT_BUTTON(pui->hf_button),
 			 header_font_name);
 	if(data_font_name)
-		gnome_print_font_picker_set_font_name
-			(GNOME_PRINT_FONT_PICKER(pui->df_button),
+		gtk_font_button_set_font_name(GTK_FONT_BUTTON(pui->df_button),
 			 data_font_name);
 	if(def_font_name)
 		gtk_font_button_set_font_name(GTK_FONT_BUTTON(pui->font_button),
@@ -524,8 +513,8 @@ select_font_cb(GtkWidget *w, const gchar *font_name, PropertyUI *pui)
 	if(w == pui->df_button) {
 		if(data_font_name)
 			g_free(data_font_name);
-		data_font_name = g_strdup(gnome_print_font_picker_get_font_name
-								  (GNOME_PRINT_FONT_PICKER (pui->df_button)));
+		data_font_name = g_strdup(gtk_font_button_get_font_name
+								  (GTK_FONT_BUTTON (pui->df_button)));
 		gconf_client_set_string (gconf_client,
 								 GHEX_BASE_KEY GHEX_PREF_DATA_FONT,
 								 data_font_name,
@@ -534,8 +523,8 @@ select_font_cb(GtkWidget *w, const gchar *font_name, PropertyUI *pui)
 	else if(w == pui->hf_button) {
 		if(header_font_name)
 			g_free(header_font_name);
-		header_font_name = g_strdup(gnome_print_font_picker_get_font_name
-									(GNOME_PRINT_FONT_PICKER (pui->hf_button)));
+		header_font_name = g_strdup(gtk_font_button_get_font_name
+									(GTK_FONT_BUTTON (pui->hf_button)));
 		gconf_client_set_string (gconf_client,
 								 GHEX_BASE_KEY GHEX_PREF_HEADER_FONT,
 								 header_font_name,



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