aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/ephy-shell.c1
-rw-r--r--src/prefs-dialog.c21
-rwxr-xr-xsrc/ui-prefs.c232
-rw-r--r--src/ui-prefs.h58
5 files changed, 19 insertions, 295 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 81f3a02a6..e3b977cd8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -87,8 +87,6 @@ epiphany_SOURCES = \
statusbar.h \
toolbar.c \
toolbar.h \
- ui-prefs.c \
- ui-prefs.h \
window-commands.c \
window-commands.h
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index dd8ac4eca..6f5ca6445 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -347,6 +347,7 @@ ephy_init_services (EphyShell *gs)
/* it also enables notifiers support */
eel_gconf_monitor_add ("/apps/epiphany");
eel_gconf_monitor_add ("/apps/nautilus/preferences");
+ eel_gconf_monitor_add ("/system/proxy");
#ifdef ENABLE_NAUTILUS_VIEW
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 1d7bb34ee..813821cb6 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -23,7 +23,6 @@
#include "prefs-dialog.h"
#include "general-prefs.h"
#include "appearance-prefs.h"
-#include "ui-prefs.h"
#include "ephy-dialog.h"
#include "ephy-prefs.h"
#include "ephy-embed-prefs.h"
@@ -78,6 +77,23 @@ EphyDialogProperty network_properties [] =
{ -1, NULL, NULL }
};
+enum
+{
+ OPEN_IN_TABS_PROP,
+ JUMP_TO_PROP,
+ POPUPS_PROP
+};
+
+static const
+EphyDialogProperty ui_properties [] =
+{
+ { OPEN_IN_TABS_PROP, "open_in_tabs_checkbutton", CONF_TABS_TABBED, PT_AUTOAPPLY, NULL },
+ { JUMP_TO_PROP, "jump_to_checkbutton", CONF_TABS_TABBED_AUTOJUMP, PT_AUTOAPPLY, NULL },
+ { POPUPS_PROP, "popups_checkbutton", CONF_TABS_TABBED_POPUPS, PT_AUTOAPPLY, NULL },
+
+ { -1, NULL, NULL }
+};
+
struct PrefsDialogPrivate
{
GtkWidget *notebook;
@@ -167,8 +183,6 @@ create_page (PrefsPageID id,
page = appearance_prefs_new ();
break;
case PREFS_PAGE_UI:
- page = ui_prefs_new ();
- break;
case PREFS_PAGE_ADVANCED:
page = ephy_dialog_new ();
ephy_dialog_construct (EPHY_DIALOG(page),
@@ -199,6 +213,7 @@ prefs_dialog_get_page (PrefsDialog *pd,
break;
case PREFS_PAGE_UI:
page_widget = "ui_page_box";
+ prop = ui_properties;
break;
case PREFS_PAGE_ADVANCED:
page_widget = "network_page_box";
diff --git a/src/ui-prefs.c b/src/ui-prefs.c
deleted file mode 100755
index e461bf7e6..000000000
--- a/src/ui-prefs.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright (C) 2002 Marco Pesenti Gritti
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "ui-prefs.h"
-#include "ephy-shell.h"
-#include "ephy-prefs.h"
-#include "eel-gconf-extensions.h"
-#include "ephy-spinner.h"
-
-#include <string.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-icon-list.h>
-
-static void ui_prefs_class_init (UIPrefsClass *klass);
-static void ui_prefs_init (UIPrefs *dialog);
-static void ui_prefs_finalize (GObject *object);
-
-/* Glade callbacks */
-void
-spinners_iconlist_select_icon_cb (GtkWidget *iconlist, gint num,
- GdkEvent *event, UIPrefs *dialog);
-
-static GObjectClass *parent_class = NULL;
-
-struct UIPrefsPrivate
-{
- gpointer dummy;
- GList *spinner_list;
-};
-
-enum
-{
- SPINNERS_PROP,
- OPEN_IN_TABS_PROP,
- JUMP_TO_PROP,
- POPUPS_PROP
-};
-
-static const
-EphyDialogProperty properties [] =
-{
- { SPINNERS_PROP, "spinners_iconlist", NULL, PT_NORMAL, NULL },
- { OPEN_IN_TABS_PROP, "open_in_tabs_checkbutton", CONF_TABS_TABBED, PT_AUTOAPPLY, NULL },
- { JUMP_TO_PROP, "jump_to_checkbutton", CONF_TABS_TABBED_AUTOJUMP, PT_AUTOAPPLY, NULL },
- { POPUPS_PROP, "popups_checkbutton", CONF_TABS_TABBED_POPUPS, PT_AUTOAPPLY, NULL },
-
- { -1, NULL, NULL }
-};
-
-GType
-ui_prefs_get_type (void)
-{
- static GType ui_prefs_type = 0;
-
- if (ui_prefs_type == 0)
- {
- static const GTypeInfo our_info =
- {
- sizeof (UIPrefsClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ui_prefs_class_init,
- NULL,
- NULL, /* class_data */
- sizeof (UIPrefs),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ui_prefs_init
- };
-
- ui_prefs_type = g_type_register_static (EPHY_DIALOG_TYPE,
- "UIPrefs",
- &our_info, 0);
- }
-
- return ui_prefs_type;
-
-}
-
-static void
-ui_prefs_class_init (UIPrefsClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = ui_prefs_finalize;
-}
-
-/**
- * Free any existing spinner list.
- */
-static void
-free_spinner_list (UIPrefs *dialog)
-{
- GList *node;
-
- for (node = dialog->priv->spinner_list; node; node = node->next)
- g_free(node->data);
-
- g_list_free(dialog->priv->spinner_list);
- dialog->priv->spinner_list = NULL;
-}
-
-/**
- * spinner_get_path_from_index: used in prefs_callbacks.c to get the
- * path of selected icon
- */
-static const gchar *
-spinner_get_path_from_index (UIPrefs *dialog, gint index)
-{
- gchar *path;
-
- path = g_list_nth_data (dialog->priv->spinner_list, index);
-
- return path;
-}
-
-/*
- * spinner_fill_iconlist: fill a gnome icon list with icons of available spinners
- */
-static void
-spinner_fill_iconlist (UIPrefs *dialog, GnomeIconList *icon_list)
-{
- GList *spinners, *tmp;
- gchar *pref_spinner_path;
- gint index;
-
- /* clear spinner list */
- free_spinner_list (dialog);
- gnome_icon_list_clear (GNOME_ICON_LIST (icon_list));
-
- pref_spinner_path =
- eel_gconf_get_string (CONF_TOOLBAR_SPINNER_THEME);
- index = gnome_icon_list_get_num_icons (icon_list);
-
- spinners = ephy_spinner_list_spinners ();
- for (tmp = spinners; tmp != NULL; tmp = g_list_next (tmp))
- {
- EphySpinnerInfo *info = tmp->data;
-
- dialog->priv->spinner_list =
- g_list_append (dialog->priv->spinner_list,
- g_strdup (info->name));
-
- gnome_icon_list_append (icon_list, info->filename, info->name);
-
- /* Select the icon configured in prefs */
- if (pref_spinner_path &&
- strcmp (pref_spinner_path, info->name) == 0)
- {
- gnome_icon_list_select_icon (icon_list, index);
- }
- index++;
- }
- g_list_foreach (spinners, (GFunc)ephy_spinner_info_free, NULL);
- g_list_free (spinners);
-
- g_free (pref_spinner_path);
-}
-
-static void
-ui_prefs_init (UIPrefs *dialog)
-{
- GtkWidget *icon_list;
-
- dialog->priv = g_new0 (UIPrefsPrivate, 1);
- dialog->priv->spinner_list = NULL;
-
- ephy_dialog_construct (EPHY_DIALOG(dialog),
- properties,
- "prefs-dialog.glade",
- "ui_page_box");
-
- icon_list = ephy_dialog_get_control (EPHY_DIALOG(dialog),
- SPINNERS_PROP);
-
- spinner_fill_iconlist (dialog, GNOME_ICON_LIST (icon_list));
-}
-
-static void
-ui_prefs_finalize (GObject *object)
-{
- UIPrefs *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_UI_PREFS (object));
-
- dialog = UI_PREFS (object);
-
- g_return_if_fail (dialog->priv != NULL);
-
- free_spinner_list (dialog);
-
- g_free (dialog->priv);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-EphyDialog *
-ui_prefs_new (void)
-{
- UIPrefs *dialog;
-
- dialog = UI_PREFS (g_object_new (UI_PREFS_TYPE,
- NULL));
-
- return EPHY_DIALOG(dialog);
-}
-
-void
-spinners_iconlist_select_icon_cb (GtkWidget *iconlist, gint num,
- GdkEvent *event, UIPrefs *dialog)
-{
- const char *path;
- path = spinner_get_path_from_index (dialog, num);
- eel_gconf_set_string (CONF_TOOLBAR_SPINNER_THEME, path);
-}
diff --git a/src/ui-prefs.h b/src/ui-prefs.h
deleted file mode 100644
index bbd3dbe75..000000000
--- a/src/ui-prefs.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2002 Jorn Baayen
- *
- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef UI_PREFS_H
-#define UI_PREFS_H
-
-#include "ephy-dialog.h"
-
-#include <glib-object.h>
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-typedef struct UIPrefs UIPrefs;
-typedef struct UIPrefsClass UIPrefsClass;
-
-#define UI_PREFS_TYPE (ui_prefs_get_type ())
-#define UI_PREFS(obj) (GTK_CHECK_CAST ((obj), UI_PREFS_TYPE, UIPrefs))
-#define UI_PREFS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), UI_PREFS, UIPrefsClass))
-#define IS_UI_PREFS(obj) (GTK_CHECK_TYPE ((obj), UI_PREFS_TYPE))
-#define IS_UI_PREFS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), UI_PREFS))
-
-typedef struct UIPrefsPrivate UIPrefsPrivate;
-
-struct UIPrefs
-{
- EphyDialog parent;
- UIPrefsPrivate *priv;
-};
-
-struct UIPrefsClass
-{
- EphyDialogClass parent_class;
-};
-
-GType ui_prefs_get_type (void);
-
-EphyDialog *ui_prefs_new (void);
-
-G_END_DECLS
-
-#endif
-