gnome-commander r1961 - in branches/gcmd-1-3: . libgcmd src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r1961 - in branches/gcmd-1-3: . libgcmd src
- Date: Mon, 11 Aug 2008 21:32:57 +0000 (UTC)
Author: epiotr
Date: Mon Aug 11 21:32:57 2008
New Revision: 1961
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1961&view=rev
Log:
Replaced obsoleted code for GnomeFontPicker with GtkFontButton
Modified:
branches/gcmd-1-3/ChangeLog
branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.c
branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.h
branches/gcmd-1-3/src/gnome-cmd-options-dialog.cc
Modified: branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.c
==============================================================================
--- branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.c (original)
+++ branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.c Mon Aug 11 21:32:57 2008
@@ -396,18 +396,6 @@
GtkWidget *
-create_font_picker (GtkWidget *parent, gchar *name)
-{
- GtkWidget *w = gnome_font_picker_new ();
- gtk_widget_ref (w);
- gtk_object_set_data_full (GTK_OBJECT (parent), name, w,
- (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (w);
- return w;
-}
-
-
-GtkWidget *
create_scale (GtkWidget *parent, gchar *name, gint value, gint min, gint max)
{
GtkWidget *scale = gtk_hscale_new (
Modified: branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.h
==============================================================================
--- branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.h (original)
+++ branches/gcmd-1-3/libgcmd/libgcmd-widget-factory.h Mon Aug 11 21:32:57 2008
@@ -110,9 +110,6 @@
create_icon_entry (GtkWidget *parent, gchar *name, const gchar *icon_path);
GtkWidget *
-create_font_picker (GtkWidget *parent, gchar *name);
-
-GtkWidget *
create_scale (GtkWidget *parent, gchar *name, gint value, gint min, gint max);
GtkWidget *
Modified: branches/gcmd-1-3/src/gnome-cmd-options-dialog.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-options-dialog.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-options-dialog.cc Mon Aug 11 21:32:57 2008
@@ -39,6 +39,19 @@
};
+
+inline GtkWidget *create_font_picker (GtkWidget *parent, gchar *name)
+{
+ GtkWidget *w = gtk_font_button_new ();
+ gtk_widget_ref (w);
+ gtk_object_set_data_full (GTK_OBJECT (parent), name, w, (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (w);
+
+ return w;
+}
+
+
+
/***********************************************************************
*
* The General tab
@@ -459,9 +472,9 @@
fpicker = create_font_picker (parent, "list_font_picker");
table_add (table, fpicker, 1, 0, GTK_FILL);
- gnome_font_picker_set_font_name (GNOME_FONT_PICKER (fpicker), gnome_cmd_data_get_list_font ());
- gnome_font_picker_set_preview_text (GNOME_FONT_PICKER (fpicker),
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");
+ gtk_font_button_set_font_name (GTK_FONT_BUTTON (fpicker), gnome_cmd_data_get_list_font ());
+ gtk_font_button_set_use_font (GTK_FONT_BUTTON (fpicker), TRUE);
+
spin = create_spin (parent, "row_height_spin", 8, 64, gnome_cmd_data_get_list_row_height());
table_add (table, spin, 1, 1, GTK_FILL);
@@ -569,9 +582,8 @@
gnome_cmd_data_set_use_ls_colors (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (use_ls)));
- const gchar *list_font = gnome_font_picker_get_font_name (GNOME_FONT_PICKER (list_font_picker));
- if (strcmp (list_font, "default") != 0)
- gnome_cmd_data_set_list_font (list_font);
+ const gchar *list_font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (list_font_picker));
+ gnome_cmd_data_set_list_font (list_font);
gnome_cmd_data_set_theme_icon_dir (gtk_entry_get_text (GTK_ENTRY (theme_icondir_entry)));
gnome_cmd_data_set_document_icon_dir (gtk_entry_get_text (GTK_ENTRY (doc_icondir_entry)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]