aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-07-01 07:29:46 +0800
committerIain Holmes <iain@src.gnome.org>2001-07-01 07:29:46 +0800
commit1e53a6e3d58c50e1f28c8cc289f7d6da8e9d76aa (patch)
tree18eadbdc6f390a37e99979bc953447a4df80be75 /my-evolution
parent730ceece38016a382888d5a9958eca004f65acf0 (diff)
downloadgsoc2013-evolution-1e53a6e3d58c50e1f28c8cc289f7d6da8e9d76aa.tar.gz
gsoc2013-evolution-1e53a6e3d58c50e1f28c8cc289f7d6da8e9d76aa.tar.zst
gsoc2013-evolution-1e53a6e3d58c50e1f28c8cc289f7d6da8e9d76aa.zip
Allow new RDFs to be added.
svn path=/trunk/; revision=10640
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog7
-rw-r--r--my-evolution/e-summary-preferences.c44
2 files changed, 51 insertions, 0 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 9bffe15343..cffdd1e85e 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,5 +1,12 @@
2001-06-30 Iain Holmes <iain@ximian.com>
+ * e-summary-preferences.c (add_dialog_clicked_cb): Add the new url to
+ the list.
+ (rdf_new_url_clicked_cb): Create a dialog and allow the user to add
+ new urls.
+
+2001-06-30 Iain Holmes <iain@ximian.com>
+
* e-summary-rdf.c (tree_walk): Remove spewage.
(e_summary_rdf_count):
(e_summary_rdf_add):
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
index 8611109944..5ef93c6970 100644
--- a/my-evolution/e-summary-preferences.c
+++ b/my-evolution/e-summary-preferences.c
@@ -13,9 +13,12 @@
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-util.h>
+#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-config.h>
#include <libgnomeui/gnome-propertybox.h>
+#include <libgnomeui/gnome-stock.h>
+
#include <glade/glade.h>
static void
make_initial_mail_list (ESummaryPrefs *prefs)
@@ -358,6 +361,7 @@ struct _CalendarPage {
typedef struct _PropertyData {
ESummary *summary;
GnomePropertyBox *box;
+ GtkWidget *new_entry;
GladeXML *xml;
struct _MailPage *mail;
@@ -627,10 +631,50 @@ rdf_remove_clicked_cb (GtkButton *button,
}
static void
+add_dialog_clicked_cb (GnomeDialog *dialog,
+ int button,
+ PropertyData *pd)
+{
+ char *text[1];
+
+ if (button == 1) {
+ return;
+ }
+
+ text[0] = gtk_entry_get_text (GTK_ENTRY (pd->new_entry));
+ gtk_clist_append (GTK_CLIST (pd->rdf->all), text);
+
+ gnome_dialog_close (dialog);
+}
+
+static void
rdf_new_url_clicked_cb (GtkButton *button,
PropertyData *pd)
{
+ static GtkWidget *add_dialog = NULL;
+ GtkWidget *label;
+ if (add_dialog != NULL) {
+ gdk_window_raise (add_dialog->window);
+ gdk_window_show (add_dialog->window);
+ return;
+ }
+
+ add_dialog = gnome_dialog_new (_("Add a new RDF"),
+ GNOME_STOCK_BUTTON_OK,
+ GNOME_STOCK_BUTTON_CANCEL, NULL);
+ gtk_signal_connect (GTK_OBJECT (add_dialog), "clicked",
+ GTK_SIGNAL_FUNC (add_dialog_clicked_cb), pd);
+ gtk_signal_connect (GTK_OBJECT (add_dialog), "destroy",
+ GTK_SIGNAL_FUNC (gtk_widget_destroyed), &add_dialog);
+
+ label = gtk_label_new (_("Enter the URL of the RDF file you wish to add"));
+ gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox), label,
+ TRUE, TRUE, 0);
+ pd->new_entry = gtk_entry_new ();
+ gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox),
+ pd->new_entry, TRUE, TRUE, 0);
+ gtk_widget_show_all (add_dialog);
}
static void