aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-settings-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-settings-dialog.c')
-rw-r--r--shell/e-shell-settings-dialog.c170
1 files changed, 170 insertions, 0 deletions
diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c
new file mode 100644
index 0000000000..139344fbe1
--- /dev/null
+++ b/shell/e-shell-settings-dialog.c
@@ -0,0 +1,170 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* e-shell-settings-dialog.c
+ *
+ * Copyright (C) 2002 Ximian, Inc.
+ *
+ * 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: Ettore Perazzoli <ettore@ximian.com>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "e-shell-settings-dialog.h"
+
+#include <gal/util/e-util.h>
+
+#include <bonobo/bonobo-widget.h>
+
+#include <liboaf/liboaf.h>
+
+#include <string.h>
+
+
+#define PARENT_TYPE e_multi_config_dialog_get_type ()
+static EMultiConfigDialogClass *parent_class = NULL;
+
+
+static GSList *
+get_language_list (void)
+{
+ const char *env;
+ const char *p;
+
+ env = g_getenv ("LANGUAGE");
+ if (env == NULL) {
+ env = g_getenv ("LANG");
+ if (env == NULL)
+ return NULL;
+ }
+
+ p = strchr (env, '=');
+ if (p != NULL)
+ return g_slist_prepend (NULL, (void *) (p + 1));
+ else
+ return g_slist_prepend (NULL, (void *) env);
+}
+
+static void
+load_pages (EShellSettingsDialog *dialog)
+{
+ OAF_ServerInfoList *control_list;
+ CORBA_Environment ev;
+ GSList *language_list;
+ int i;
+
+ CORBA_exception_init (&ev);
+
+ control_list = oaf_query ("defined(evolution:config_item:title)", NULL, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION || control_list == NULL) {
+ g_warning ("Cannot load configuration pages -- %s", ev._repo_id);
+ CORBA_exception_free (&ev);
+ return;
+ }
+
+ language_list = get_language_list ();
+
+ for (i = 0; i < control_list->_length; i ++) {
+ CORBA_Object corba_object;
+ OAF_ServerInfo *info;
+ const char *title;
+ const char *description;
+ const char *icon_path;
+ GdkPixbuf *icon;
+
+ info = & control_list->_buffer[i];
+
+ title = oaf_server_info_prop_lookup (info, "evolution:config_item:title", language_list);
+ description = oaf_server_info_prop_lookup (info, "evolution:config_item:description", language_list);
+ icon_path = oaf_server_info_prop_lookup (info, "evolution:config_item:icon_path", language_list);
+
+ if (icon_path == NULL)
+ icon = NULL;
+ else
+ icon = gdk_pixbuf_new_from_file (icon_path);
+
+ corba_object = oaf_activate_from_id ((char *) info->iid, 0, NULL, &ev);
+ if (ev._major == CORBA_NO_EXCEPTION) {
+ GtkWidget *widget;
+
+ widget = bonobo_widget_new_control_from_objref (corba_object, CORBA_OBJECT_NIL);
+ e_multi_config_dialog_add_page (E_MULTI_CONFIG_DIALOG (dialog),
+ title, description, icon, widget);
+ }
+
+ if (icon != NULL)
+ gdk_pixbuf_unref (icon);
+ }
+
+ CORBA_free (control_list);
+
+ g_slist_free (language_list);
+
+ CORBA_exception_free (&ev);
+}
+
+
+/* GtkObject methods. */
+
+static void
+impl_destroy (GtkObject *object)
+{
+ EShellSettingsDialog *dialog;
+
+ dialog = E_SHELL_SETTINGS_DIALOG (object);
+
+ /* (Really nothing to do here for now.) */
+
+ (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+}
+
+
+static void
+class_init (EShellSettingsDialog *class)
+{
+ GtkObjectClass *object_class;
+
+ object_class = GTK_OBJECT_CLASS (class);
+ object_class->destroy = impl_destroy;
+
+ parent_class = gtk_type_class (PARENT_TYPE);
+}
+
+static void
+init (EShellSettingsDialog *dialog)
+{
+ load_pages (dialog);
+
+ gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 450);
+}
+
+
+GtkWidget *
+e_shell_settings_dialog_new (void)
+{
+ EShellSettingsDialog *new;
+
+ new = gtk_type_new (e_shell_settings_dialog_get_type ());
+
+ return GTK_WIDGET (new);
+}
+
+
+E_MAKE_TYPE (e_shell_settings_dialog, "EShellSettingsDialog", EShellSettingsDialog,
+ class_init, init, PARENT_TYPE)
+
d>-10/+0 * Update to 0.7.0.adamw2003-04-202-2/+2 * fix strange build problem on stableijliao2003-04-121-0/+10 * s/diable/disable/marcus2003-04-111-1/+1 * Update to 0.61.marcus2003-04-113-3/+7 * Fix the accelerator keys (i.e. Ctl+Q, Ctl+I, etc.). This bug has beenmarcus2003-04-092-1/+23 * Add I18N conversion to IRC topic messages.marcus2003-04-082-0/+36 * Add dependency on autoheader.edwin2003-04-071-0/+1 * add libyahoo2 0.6.3ijliao2003-04-065-0/+78 * Added INSTALLS_SHLIB to Makefile. Informed maintainer.edwin2003-04-061-0/+2 * Update to 2.1.1.nsayer2003-04-062-2/+2 * Convert to new GNOME infrastructure.marcus2003-04-061-1/+1 * Add a missing dependency on audiofile.marcus2003-04-061-1/+2 * Gaim no longer needs WANT_GNOME.marcus2003-04-061-1/+0 * Update to 0.60. Note, this is now a GTK+-2 application.marcus2003-04-068-260/+227 * Jabber MSN-Transport moduleedwin2003-04-054-0/+39 * Update to 0.99.marcus2003-04-048-22/+138 * New Port: irc/porkedwin2003-04-014-0/+283 * Update to 1.1perky2003-03-316-10/+68 * - add patch to fix:dinoex2003-03-292-0/+23 * - update to licq-base-1.2.6, licq-qt-gui-1.2.6, licq-console-1.2.6dinoex2003-03-255-7/+46 * Fix Build after recent SSL changes.arved2003-03-242-0/+30 * Update to 0.11.5.6.adamw2003-03-232-6/+6 * Fix URLs.flathill2003-03-071-3/+3 * Fix URLs.flathill2003-03-073-6/+6 * Clear moonlight beckons.ade2003-03-0728-14/+14 * Update to 0.59.9.marcus2003-03-032-3/+2 * De-pkg-comment.marcus2003-02-262-1/+1 * De-pkg-comment for my ports.perky2003-02-256-3/+3 * De-pkg-commentlioux2003-02-248-4/+4 * * Change gnet dependency to gnet-glib2 which should fix some crashes usersmarcus2003-02-244-8/+10 * update port: net/naim to latest version 0.11.5.5leeym2003-02-233-3/+8 * - Morten Østergaard created a nice demon logo to get rid of the penguinandreas2003-02-222-0/+79 * Add missing directorykris2003-02-221-0/+1 * De-pkg-comment.knu2003-02-2134-17/+17 * - retire pkg-commentdinoex2003-02-213-3/+0 * De-pkg-comment.knu2003-02-2114-7/+7 * - add COMMENTdinoex2003-02-213-0/+3 * - use COMMENTleeym2003-02-202-2/+2 * update to naim-0.11.5.4leeym2003-02-153-4/+4 * Gratuitous PORTREVISION bumps to handle implicit dependencies.marcus2003-02-082-0/+2 * Fix maintainers email addressedwin2003-02-051-1/+1 * - convert INCDIR -> LICQ_PORTdinoex2003-02-054-7/+6 * Update to 0.4.10.1.nork2003-02-026-8/+14 * Add a WITHOUT_SSL knob.arved2003-02-022-0/+8 * import of amsn 0.71andreas2003-02-027-0/+228 * - allows licq used as master-port. e.G. for socks.dinoex2003-01-313-7/+22 * Properly handle OMF files.marcus2003-01-312-0/+4 * Fixed because maintainer did not follow protocol in referencing Qt libsalane2003-01-291-3/+2 * - fix Probem of noexisted dependeny, noted by kris.dinoex2003-01-281-1/+1 * - add option LICQ_PORT= to alter location of master portdinoex2003-01-271-2/+3 * - Update to 1.2.4dinoex2003-01-272-5/+5 * - make portlint happierdinoex2003-01-231-1/+1 * upgrade to 4.9.2ijliao2003-01-222-3/+3 * New port: IMCom command-line Jabber clientedwin2003-01-206-0/+90 * Add p5-Net-AIM 1.22, a perl extension for the AOL Instant Messengerpetef2003-01-195-0/+39 * Update to 0.11.5.2arved2003-01-194-27/+11 * Add standard termination strings and correct the message conversion betweenmarcus2003-01-162-0/+13 * Update to 0.4.10arved2003-01-138-28/+70 * Update to 0.59.8.marcus2003-01-113-23/+2 * New port ocaml-jabbr version 0.0.20021124: XML Messaging and Presencelioux2003-01-095-0/+124 * licq:dinoex2003-01-098-42/+29 * fix UTF-8 nicknameijliao2003-01-072-2/+16 * Fix build on -STABLE.perky2003-01-072-0/+10 * Fix the problem where users were unable to sign on to Yahoo, or weremarcus2003-01-072-0/+21 * chase gdbm lib versionijliao2003-01-032-2/+2 * Update to 0.11.5.petef2003-01-034-5/+29 * Update to 0.8.1arved2003-01-0312-52/+48 * Update to 0.9.8perky2003-01-026-164/+16 * - new feature GUI_KDEdinoex2003-01-022-3/+26 * - make socks-patch portabledinoex2003-01-021-9/+11 * Update to 0.59.7.marcus2003-01-023-52/+2 * upgrade to 4.9.0ijliao2002-12-205-103/+79 * Maintainer asked for modification of master_site.edwin2002-12-111-1/+1 * Fix build with bison 1.75.marcus2002-12-021-0/+42 * fix core dump when getenv("LANG") return NULLijliao2002-11-273-15/+21 * fix coredump with MSN UTF-8ijliao2002-11-252-30/+41 * Fix a segfault in the Yahoo protocol that can occur when a user receivesmarcus2002-11-242-0/+50 * Fix Build on -CURRENT.arved2002-11-232-0/+38 * Maintainer update to version 0.11.4.13edwin2002-11-233-5/+4 * Fix build problem.nork2002-11-221-0/+1 * When requested to do cp1251<->koi8 conversion convert to/from koi8-u, notsobomax2002-11-222-1/+17 * add ccmsn 0.3p3ijliao2002-11-206-0/+110 * fix previous commitijliao2002-11-202-2/+6 * Update to 0.9.7.2perky2002-11-208-112/+96 * MSN UTF-8 support correctlyijliao2002-11-194-200/+219 * Update Maintainers Emailaddress in pkg-descr [1]arved2002-11-164-8/+4 * Add simicq, another KDE-ICQ clone.arved2002-11-1610-0/+176 * - implement charset conversion for offline messagesfjoe2002-11-155-16/+57 * upgrade to 7.2.8.1fjoe2002-11-128-95/+40 * Depend on the qssl port. Simply having that installed will enable psidd2002-11-111-1/+2 * Update to 0.98.126.marcus2002-11-118-50/+62 * Add Jarl, a Perl/Tk Jabber client.dd2002-11-116-0/+408 * Upgrade to 0.8.7.dd2002-11-118-116/+45 * o Rollback PORTCOMMENT modifications while this feature's implementationlioux2002-11-1110-11/+5 * Update to 0.59.6.marcus2002-11-093-20/+2 * Fix issues documented in PRs ports/43152 and ports/42128.edwin2002-11-071-5/+17 * Use PORTCOMMENT in the Makefile, and whack the pkg-comment.adamw2002-11-0710-5/+10 * PERL -> REINPLACEedwin2002-11-041-0/+1 * - Fix GGC problem on currentdinoex2002-11-042-0/+23 * upgrade to 4.8.7ijliao2002-11-032-3/+3 * support utf-8 encoding with msnijliao2002-10-302-1/+200 * Add net/icmpchat - Simple chat program based on the ICMP protocol.pat2002-10-295-0/+40 * Unbreak build of net/kmerlin.edwin2002-10-291-2/+1 * Fix build on -current (#include <wchar.h> instead of <rune.h>)kris2002-10-261-5/+12 * Fix right-clicking behavior on Qt3.perky2002-10-212-4/+12 * Fix the plist in the case where esound support is built without libpanelmarcus2002-10-212-11/+13 * Release all my ports.nsayer2002-10-211-1/+1 * Fix the icon installation. Bump PORTREVISION.marcus2002-10-203-6/+6 * Update to 2.1nsayer2002-10-192-2/+4 * fix configure on -currentijliao2002-10-191-1/+1 * upgrade to 4.8.6ijliao2002-10-183-8/+8 * Fix a segfault on sign on when no ~/.gtkrc file exists. This has beenmarcus2002-10-182-0/+18 * Update to 0.59.5.marcus2002-10-173-15/+2 * Upgrade to 0.4.9.4.vanilla2002-10-1618-306/+62 * workaround for installed autoconf/automake griefdinoex2002-10-151-0/+4 * ncurses is goneijliao2002-10-131-7/+1 * Fix a segfault in the Yahoo! module.marcus2002-10-132-1/+13 * Fix build on -CURRENT.marcus2002-10-132-0/+26 * Add the sample config filensayer2002-10-132-0/+2 * Add jabber-yahoo 2.0.1, jabber Yahoo Transport module.nsayer2002-10-126-0/+51 * Make esound support optional.marcus2002-10-121-1/+13 * Update to 0.59.4.marcus2002-10-122-2/+2 * CC, CXX, CFLAGS, PTHREAD_CFLAGS and PTHREAD_LIBS may contain `/' inknu2002-10-101-2/+2 * Update to 0.11.4p1pat2002-10-085-66/+4 * BROKEN: Does not compilekris2002-10-062-0/+4 * BROKEN: Does not buildkris2002-10-061-0/+2 * Update WWWpat2002-10-061-1/+1 * Use gnomehack in the default case. This fixes make patch when GNOME ismarcus2002-09-241-2/+2 * 1. add missing files into plistijliao2002-09-233-6/+37 * New port: kmerlin, replaces kmsn.alane2002-09-217-0/+147 * Unbreak after recent GNOMENG change.marcus2002-09-212-5/+3 * BROKEN: Does not patchkris2002-09-211-0/+2 * Add missing dependency on gnomepanel.marcus2002-09-192-2/+2 * 1. Update to use kdelibs3perky2002-09-168-14/+120 * Update the pkg-descr and include the new Sourceforge URL.marcus2002-09-161-3/+4 * Update to 0.59.3. This fixes a problem when logging into Yahoo! as well asmarcus2002-09-162-2/+2 * Add missing files/directorieskris2002-09-161-2/+8 * Fix some GCC problems in CURRENTdinoex2002-09-152-1/+7 * Update to 0.59.2.marcus2002-09-144-144/+61 * Add gnomeicu2 --> ports/net/gnomeicu2, repo-copied from ports/net/gnomeicusobomax2002-09-1116-92/+356 * upgrade to 4.8.4ijliao2002-09-112-2/+2 * Add in the DATADIR PLIST_SUB as GNOMENG doesn't do this.marcus2002-09-091-0/+2 * Fix things after recent GNOMENG commit.marcus2002-09-091-8/+7 * Updating maintainer e-mail addressseanc2002-09-054-7/+7 * Deploy USE_GNOMENG infrastructurelioux2002-09-036-18/+25 * Remove USE_NEWGCC, which is no longer supported or required.kris2002-08-311-1/+0 * upgrade to 4.8.3ijliao2002-08-293-13/+2 * * Update to 0.59.1marcus2002-08-285-81/+108 * - Update to version 0.99.19-1kevlo2002-08-284-9/+38 * Update MASTER_SITESdwcjr2002-08-261-1/+2 * Add missing .pyo files to each pkg-plistperky2002-08-231-0/+2 * upgrade to 4.8.2ijliao2002-08-203-16/+7 * Well, this looks like an i386 binary. Mark as such.naddy2002-08-161-0/+2 * Update to 0.4.3.jim2002-08-134-6/+25 * remove -DWITH_LICQ_DEVEL supportfjoe2002-08-131-1/+0 * remove support for -DWITH_LICQ_DEVELfjoe2002-08-132-8/+0 * Update to 1.2.0adinoex2002-08-1011-112/+58 * upgrade to 4.8.0ijliao2002-08-102-3/+3 * USE_X_PREFIX since it's a X based portlioux2002-08-091-0/+1 * * libicq2000lioux2002-08-082-5/+11 * Really assume maintainership as previously statedlioux2002-08-081-1/+1 * o Update to 0.3.2lioux2002-08-082-3/+3 * o Update to 0.8.2lioux2002-08-083-35/+35 * Update to 0.98.3.marcus2002-08-026-38/+8 * Chase shlib rev of devel/gettextade2002-08-022-2/+2 * Remove patch to fix bug with qt 3.0.3 and bump PORTREVISION againpat2002-07-312-25/+1 * Fix a packaging error when applet support is not available.marcus2002-07-291-3/+4 * Add patch to fix missing line breaks in the chat boxpat2002-07-284-2/+30 * Use USE_GNOMENG.sobomax2002-07-204-36/+20 * no longer need itijliao2002-07-191-3/+0 * upgrade to 0.11.3ijliao2002-07-195-11/+44 * fribidi malfunctioned, so disable itijliao2002-07-171-4/+4 * upgrade to 4.7.8ijliao2002-07-164-14/+16 * upgrade to 4.7.7ijliao2002-07-166-3/+53 * Convert USE_GLIB into USE_GNOMENG+USE_GNOME.sobomax2002-07-161-1/+2 * Update to 0.8.6pat2002-07-135-105/+156 * Fix plist.marcus2002-07-121-2/+1 * * Implement USE_GNOMENGmarcus2002-07-121-14/+7