diff options
author | JP Rosevear <jpr@ximian.com> | 2002-01-15 05:05:48 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-01-15 05:05:48 +0800 |
commit | 4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf (patch) | |
tree | 2d68dba264dc01f210401460fb6d49700018ea74 /e-util | |
parent | 861de26de348c0d9a8272f788527ce91408a1e72 (diff) | |
download | gsoc2013-evolution-4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf.tar gsoc2013-evolution-4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf.tar.gz gsoc2013-evolution-4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf.tar.bz2 gsoc2013-evolution-4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf.tar.lz gsoc2013-evolution-4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf.tar.xz gsoc2013-evolution-4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf.tar.zst gsoc2013-evolution-4e6779f2fd26ec5b1220b20a786e0dffc4bd0cbf.zip |
compile new files
2002-01-14 JP Rosevear <jpr@ximian.com>
* Makefile.am: compile new files
* e-pilot-settings.[hc]: beginnings of a general conduit
configuration gui
svn path=/trunk/; revision=15321
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 7 | ||||
-rw-r--r-- | e-util/Makefile.am | 8 | ||||
-rw-r--r-- | e-util/e-pilot-settings.c | 149 | ||||
-rw-r--r-- | e-util/e-pilot-settings.h | 70 |
4 files changed, 231 insertions, 3 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 69f0b37bff..175d81e314 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,10 @@ +2002-01-14 JP Rosevear <jpr@ximian.com> + + * Makefile.am: compile new files + + * e-pilot-settings.[hc]: beginnings of a general conduit + configuration gui + 2002-01-10 Christopher James Lahey <clahey@ximian.com> * ename/e-name-western.c (e_name_western_word_is_suffix): Allow diff --git a/e-util/Makefile.am b/e-util/Makefile.am index 4e6199b3d1..805ae03ea9 100644 --- a/e-util/Makefile.am +++ b/e-util/Makefile.am @@ -73,9 +73,11 @@ libeutil_static_la_LIBADD = $(libeutil_la_LIBADD) libeutil_static_la_LDFLAGS = --all-static pilot_sources = \ - e-pilot-map.c \ - e-pilot-map.h \ - e-pilot-util.c \ + e-pilot-map.c \ + e-pilot-map.h \ + e-pilot-settings.c \ + e-pilot-settings.h \ + e-pilot-util.c \ e-pilot-util.h if ENABLE_PILOT_CONDUITS diff --git a/e-util/e-pilot-settings.c b/e-util/e-pilot-settings.c new file mode 100644 index 0000000000..4b5c55ebca --- /dev/null +++ b/e-util/e-pilot-settings.c @@ -0,0 +1,149 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* e-pilot-settings.c + * + * Copyright (C) 2001 JP Rosevear + * + * 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 of the + * License, 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. + * + * Author: JP Rosevear + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <gnome.h> +#include "e-pilot-settings.h" + +struct _EPilotSettingsPrivate +{ + GtkWidget *secret; + GtkWidget *cat; + GtkWidget *cat_btn; +}; + + +static void class_init (EPilotSettingsClass *klass); +static void init (EPilotSettings *ps); + +static GtkObjectClass *parent_class = NULL; + + +GtkType +e_pilot_settings_get_type (void) +{ + static GtkType type = 0; + + if (type == 0) + { + static const GtkTypeInfo info = + { + "EPilotSettings", + sizeof (EPilotSettings), + sizeof (EPilotSettingsClass), + (GtkClassInitFunc) class_init, + (GtkObjectInitFunc) init, + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, + }; + + type = gtk_type_unique (gtk_table_get_type (), &info); + } + + return type; +} + +static void +class_init (EPilotSettingsClass *klass) +{ + GtkObjectClass *object_class; + + object_class = GTK_OBJECT_CLASS (klass); + + parent_class = gtk_type_class (gtk_table_get_type ()); + +} + + +static void +init (EPilotSettings *ps) +{ + EPilotSettingsPrivate *priv; + GtkWidget *lbl; + + priv = g_new0 (EPilotSettingsPrivate, 1); + + ps->priv = priv; + + gtk_table_resize (GTK_TABLE (ps), 2, 2); + gtk_container_set_border_width (GTK_CONTAINER (ps), 4); + gtk_table_set_col_spacings (GTK_TABLE (ps), 4); + + lbl = gtk_label_new (_("Sync Private Records:")); + gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5); + priv->secret = gtk_check_button_new (); + gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 0, 1); + gtk_table_attach_defaults (GTK_TABLE (ps), priv->secret, 1, 2, 0, 1); + gtk_widget_show (lbl); + gtk_widget_show (priv->secret); + +#if 0 + lbl = gtk_label_new (_("Sync Categories:")); + gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5); + priv->cat = gtk_check_button_new (); + gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 1, 2); + gtk_table_attach_defaults (GTK_TABLE (ps), priv->cat, 1, 2, 1, 2); + gtk_widget_show (lbl); + gtk_widget_show (priv->cat); +#endif +} + + + +GtkWidget * +e_pilot_settings_new (void) +{ + return gtk_type_new (E_TYPE_PILOT_SETTINGS); +} + +gboolean +e_pilot_settings_get_secret (EPilotSettings *ps) +{ + EPilotSettingsPrivate *priv; + + g_return_val_if_fail (ps != NULL, FALSE); + g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), FALSE); + + priv = ps->priv; + + return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->secret)); +} + +void +e_pilot_settings_set_secret (EPilotSettings *ps, gboolean secret) +{ + EPilotSettingsPrivate *priv; + + g_return_if_fail (ps != NULL); + g_return_if_fail (E_IS_PILOT_SETTINGS (ps)); + + priv = ps->priv; + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->secret), + secret); +} + diff --git a/e-util/e-pilot-settings.h b/e-util/e-pilot-settings.h new file mode 100644 index 0000000000..cdbb91495a --- /dev/null +++ b/e-util/e-pilot-settings.h @@ -0,0 +1,70 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ +/* e-pilot-settings.h + * + * Copyright (C) 2001 JP Rosevear + * + * 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 of the + * License, 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. + * + * Author: JP Rosevear + */ + +#ifndef _E_PILOT_SETTINGS_H_ +#define _E_PILOT_SETTINGS_H_ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <gnome.h> + +#ifdef __cplusplus +extern "C" { +#pragma } +#endif /* __cplusplus */ + +#define E_TYPE_PILOT_SETTINGS (e_pilot_settings_get_type ()) +#define E_PILOT_SETTINGS(obj) (GTK_CHECK_CAST ((obj), E_TYPE_PILOT_SETTINGS, EPilotSettings)) +#define E_PILOT_SETTINGS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_PILOT_SETTINGS, EPilotSettingsClass)) +#define E_IS_PILOT_SETTINGS(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_PILOT_SETTINGS)) +#define E_IS_PILOT_SETTINGS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_PILOT_SETTINGS)) + + +typedef struct _EPilotSettings EPilotSettings; +typedef struct _EPilotSettingsPrivate EPilotSettingsPrivate; +typedef struct _EPilotSettingsClass EPilotSettingsClass; + +struct _EPilotSettings { + GtkTable parent; + + EPilotSettingsPrivate *priv; +}; + +struct _EPilotSettingsClass { + GtkTableClass parent_class; +}; + + +GtkType e_pilot_settings_get_type (void); +GtkWidget *e_pilot_settings_new (void); + +gboolean e_pilot_settings_get_secret (EPilotSettings *ps); +void e_pilot_settings_set_secret (EPilotSettings *ps, gboolean secret); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _E_PILOT_SETTINGS_H_ */ |