aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>2000-01-25 16:43:24 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-25 16:43:24 +0800
commit670f57583d84d4c8f0195d3eefbef93920c6e9d9 (patch)
tree5a99fdf111ee22bd689c42b3f0c36c22a44a41fc /mail/folder-browser.c
parented7345eec736a39e3e37a4e76a0bdba7157270b7 (diff)
downloadgsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar
gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.gz
gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.bz2
gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.lz
gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.xz
gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.tar.zst
gsoc2013-evolution-670f57583d84d4c8f0195d3eefbef93920c6e9d9.zip
More work
svn path=/trunk/; revision=1628
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r--mail/folder-browser.c90
1 files changed, 90 insertions, 0 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
new file mode 100644
index 0000000000..63cf7566fb
--- /dev/null
+++ b/mail/folder-browser.c
@@ -0,0 +1,90 @@
+/*
+ * folder-browser.c: Folder browser top level component
+ *
+ * Author:
+ * Miguel de Icaza (miguel@kernel.org)
+ *
+ * (C) 2000 Helix Code, Inc.
+ */
+
+#include <config.h>
+#include "folder-browser.h"
+
+#define PARENT_TYPE (gtk_table_get_type ())
+
+static GtkObjectClass *folder_browser_parent_class;
+
+#define PROPERTY_FOLDER_URI "folder_uri"
+
+static void
+folder_browser_destroy (GtkObject *object)
+{
+ FolderBrowser *folder_browser = FOLDER_BROWSER (object);
+
+ folder_browser_parent_class->destroy (object);
+}
+
+static void
+folder_browser_class_init (GtkObjectClass *object_class)
+{
+ object_class->destroy = folder_browser_destroy;
+
+ folder_browser_parent_class = gtk_type_class (PARENT_TYPE);
+}
+
+#define EQUAL(a,b) (strcmp (a,b) == 0)
+
+void
+folder_browser_set_uri (FolderBrowser *folder_browser, const char *uri)
+{
+ g_free (folder_browser->uri);
+ folder_browser->uri = g_strudp (uri);
+}
+
+static void
+folder_browser_property_changed (GnomePropertyBag *properties,
+ const char *name,
+ const char *type,
+ gpointer old_value,
+ gpointer new_value,
+ gpointer user_data)
+{
+ FolderBrowser *folder_browser = FOLDER_BROWSER (user_data);
+
+ if (EQUAL (name, PROPERTY_FOLDER_URI)){
+ folder_browser_set_uri (folder_browser, new_value);
+ return;
+ }
+}
+
+static void
+folder_browser_init (GtkObject *object)
+{
+ FolderBrowser *fb = FOLDER_BROWSER (object);
+
+ fb->properties = gnome_property_bag_new ();
+
+ gnome_property_bag_add (
+ fb->properties, PROPERTY_FOLDER_URI, "string",
+ NULL, NULL, _("The URI that the Folder Browser will display", 0);
+
+ gtk_signal_connect (GTK_OBJECT (fb->properties), "value_changed",
+ property_changed, fb);
+}
+
+GtkWidget *
+folder_browser_new (void)
+{
+ FolderBrowser *folder_browser = gtk_type_new (folder_browser_get_type ());
+ GtkTable *table = GTK_TABLE (folder_browser);
+
+ table->homogeous = FALSE;
+ gtk_table_resize (table, 1, 2);
+
+ return GTK_WIDGET (folder_browser);
+}
+
+
+E_MAKE_TYPE (folder_browser, "FolderBrowser", FolderBrowser, folder_browser_class_init, folder_browser_init, PARENT_TYPE);
+
+