aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-dialog.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-10-11 03:24:33 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-10-11 03:24:33 +0800
commit44592d8463a27f756746201136a97e2d47dcc4f8 (patch)
tree05c53587966742bd4be74dc3217904ac026ff120 /lib/ephy-dialog.c
parent63c8906e7436c3910348a6549dfd8d6199772624 (diff)
downloadgsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar
gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar.gz
gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar.bz2
gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar.lz
gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar.xz
gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.tar.zst
gsoc2013-epiphany-44592d8463a27f756746201136a97e2d47dcc4f8.zip
Reenable deprecated api where necessary, fixup some header inclusions.
2003-10-10 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/FilePicker.cpp: * embed/mozilla/FilePicker.h: * embed/mozilla/mozilla-embed-single.cpp: * lib/Makefile.am: * lib/ephy-dialog.c: (get_pref_type_from_widget), (prefs_connect_signals), (load_props), (save_props): * lib/ephy-gui.h: * lib/widgets/Makefile.am: * src/Makefile.am: * src/bookmarks/Makefile.am: * src/bookmarks/ephy-topic-action.c: * src/ephy-history-window.c: Reenable deprecated api where necessary, fixup some header inclusions. Remove unused color picker control in ephy-dialog. Remove unused file types optionmenu in Filepicker.
Diffstat (limited to 'lib/ephy-dialog.c')
-rw-r--r--lib/ephy-dialog.c68
1 files changed, 1 insertions, 67 deletions
diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c
index 973aca87a..721cfa4cf 100644
--- a/lib/ephy-dialog.c
+++ b/lib/ephy-dialog.c
@@ -24,6 +24,7 @@
#include "ephy-gui.h"
#include "eel-gconf-extensions.h"
+#include <stdlib.h>
#include <string.h>
#include <gtk/gtktogglebutton.h>
@@ -80,7 +81,6 @@ typedef enum
PT_TOGGLEBUTTON,
PT_RADIOBUTTON,
PT_SPINBUTTON,
- PT_COLOR,
PT_OPTIONMENU,
PT_ENTRY,
PT_UNKNOWN
@@ -335,23 +335,6 @@ set_config_from_togglebutton (GtkWidget *togglebutton, const char *config_name)
}
static void
-set_config_from_color (GtkWidget *colorpicker, const char *config_name)
-{
- guint8 r, g, b, a;
- gchar color_string[9];
-
- /* get color values from color picker */
- gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (colorpicker),
- &r, &g, &b, &a);
-
- /* write into string (bounded size) */
- g_snprintf (color_string, 9, "#%02X%02X%02X", r, g, b);
-
- /* set the configuration value */
- eel_gconf_set_string (config_name, color_string);
-}
-
-static void
set_editable_from_config (GtkWidget *editable, const char *config_name)
{
GConfValue *gcvalue = eel_gconf_get_value (config_name);
@@ -502,26 +485,6 @@ set_togglebutton_from_config (GtkWidget *togglebutton, const char *config_name)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (togglebutton), value);
}
-static void
-set_color_from_config (GtkWidget *colorpicker, const char *config_name)
-{
- gchar *color_string;
- guint r, g, b;
-
- /* get the string from config */
- color_string = eel_gconf_get_string (config_name);
-
- if (color_string)
- {
- /* parse it and setup the color picker */
- sscanf (color_string, "#%2X%2X%2X", &r, &g, &b);
- gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (colorpicker),
- r, g, b, 0);
- /* free the string */
- g_free (color_string);
- }
-}
-
static PrefType
get_pref_type_from_widget (GtkWidget *widget)
{
@@ -545,10 +508,6 @@ get_pref_type_from_widget (GtkWidget *widget)
{
return PT_ENTRY;
}
- else if (GNOME_IS_COLOR_PICKER (widget))
- {
- return PT_COLOR;
- }
return PT_UNKNOWN;
}
@@ -705,16 +664,6 @@ prefs_spinbutton_changed_cb (GtkWidget *widget, PropertyInfo *pi)
}
static void
-prefs_color_changed_cb (GtkWidget *widget, guint r, guint g,
- guint b, guint a, const PropertyInfo *pi)
-{
- if (pi->type == PT_AUTOAPPLY)
- {
- set_config_from_color (widget, pi->pref);
- }
-}
-
-static void
prefs_entry_changed_cb (GtkWidget *widget, PropertyInfo *pi)
{
if (pi->type == PT_AUTOAPPLY)
@@ -779,11 +728,6 @@ prefs_connect_signals (EphyDialog *dialog)
G_CALLBACK(prefs_spinbutton_changed_cb),
(gpointer)info);
break;
- case PT_COLOR:
- g_signal_connect (G_OBJECT (info->widget), "color_set",
- G_CALLBACK(prefs_color_changed_cb),
- (gpointer)info);
- break;
case PT_OPTIONMENU:
g_signal_connect (G_OBJECT (info->widget),
"changed",
@@ -875,11 +819,6 @@ load_props (PropertyInfo *props)
props[i].pref,
props[i].string_enum);
}
- else if (GNOME_IS_COLOR_PICKER(props[i].widget))
- {
- set_color_from_config (props[i].widget,
- props[i].pref);
- }
}
}
@@ -922,11 +861,6 @@ save_props (PropertyInfo *props)
props[i].pref,
props[i].string_enum);
}
- else if (GNOME_IS_COLOR_PICKER(props[i].widget))
- {
- set_config_from_color (props[i].widget,
- props[i].pref);
- }
}
}