aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution')
-rw-r--r--my-evolution/ChangeLog42
-rw-r--r--my-evolution/Makefile.am2
-rw-r--r--my-evolution/e-summary-mail.c169
-rw-r--r--my-evolution/e-summary-mail.h9
-rw-r--r--my-evolution/e-summary-preferences.c821
-rw-r--r--my-evolution/e-summary-rdf.c3
-rw-r--r--my-evolution/e-summary-table.c423
-rw-r--r--my-evolution/e-summary-table.h73
-rw-r--r--my-evolution/e-summary-weather.c113
-rw-r--r--my-evolution/e-summary-weather.h5
-rw-r--r--my-evolution/e-summary.c4
-rw-r--r--my-evolution/main.c1
-rw-r--r--my-evolution/my-evolution.glade903
13 files changed, 1050 insertions, 1518 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index ce2893b8bf..eb2a31ca24 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,45 @@
+2002-02-04 Iain Holmes <iain@ximian.com>
+
+ * Makefile.am: Add the e-summary-table.[ch] files.
+
+ * e-summary-mail.c: Move the headers.
+ (e_summary_mail_get_html): Regenerate the HTML.
+ (update_folder_cb): Make the file:// part static as it's the same
+ every time.
+ (mail_change_notify): Don't recalculate the HTML here.
+ (e_summary_mail_reconfigure): Don't add file:// if it's already there.
+ (get_parent_path): Given a path, return it's parent.
+ (is_folder_shown): Check all the shown folders to see if the given one
+ is shown.
+ (insert_path_recur): Recursively add a path to the tree.
+ (free_path_hash): Free the key of the hash table.
+ (e_summary_mail_fill_list): Add all the folders to the tree.
+
+ * e-summary-preferences.c: Move the headers
+ (rdf_is_shown): Check if an RDF is shown.
+ (fill_rdf_etable): Fill the etable with all the RDFs
+ (fill_weather_etable): Fill the weather etable.
+ (fill_mail_etable): Ditto (with mail)
+ (make_property_dialog): Use the etables.
+ (free_property_dialog): Free the new lists.
+ (maybe_add_to_shown): Check if the item is clicked and if so add it to
+ the list.
+ (property_box_clicked_cb): Set all the new properties
+ (e_summary_preferences_make_*_table): Make the etables
+
+ * e-summary-rdf.c (e_summary_rdf_update): Don't cancel the message,
+ just keep using the previous one.
+
+ * e-summary-weather.c (message_finished): Better error message.
+ (e_summary_weather_update): Just continue if a message is already
+ going.
+ (is_weather_shown): Find out if a station is shown.
+ (e_summary_weather_fill_etable): Fill the etable.
+
+ * main.c (main): Init the cursors.
+
+ * my-evolution.glade: Add the custom widgets.
+
2002-02-02 Ettore Perazzoli <ettore@ximian.com>
* e-summary-offline-handler.c (create_connection_list): Allocate
diff --git a/my-evolution/Makefile.am b/my-evolution/Makefile.am
index 36a6ba0c8c..4507864148 100644
--- a/my-evolution/Makefile.am
+++ b/my-evolution/Makefile.am
@@ -44,6 +44,8 @@ evolution_executive_summary_SOURCES = \
e-summary-preferences.h \
e-summary-rdf.c \
e-summary-rdf.h \
+ e-summary-table.c \
+ e-summary-table.h \
e-summary-tasks.c \
e-summary-tasks.h \
e-summary-type.h \
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
index 90d6bddd91..5d6d7fc0d2 100644
--- a/my-evolution/e-summary-mail.c
+++ b/my-evolution/e-summary-mail.c
@@ -26,12 +26,6 @@
#include <liboaf/liboaf.h>
#include <gal/widgets/e-unicode.h>
-#include "Mail.h"
-#include "e-summary.h"
-#include "e-summary-mail.h"
-
-#include "e-util/e-path.h"
-
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h> /* gnome_util_prepend_user_home */
@@ -42,6 +36,13 @@
#include <Evolution.h>
#include <evolution-storage-listener.h>
+#include "Mail.h"
+#include "e-summary.h"
+#include "e-summary-mail.h"
+#include "e-summary-table.h"
+
+#include "e-util/e-path.h"
+
#define MAIL_IID "OAFIID:GNOME_Evolution_FolderInfo"
struct _ESummaryMail {
@@ -66,16 +67,6 @@ typedef struct _ESummaryMailFolder {
gboolean init; /* Has this folder been initialised? */
} ESummaryMailFolder;
-const char *
-e_summary_mail_get_html (ESummary *summary)
-{
- if (summary->mail == NULL) {
- return NULL;
- }
-
- return summary->mail->html;
-}
-
/* Work out what to do with folder names */
static char *
make_pretty_foldername (ESummary *summary,
@@ -145,6 +136,19 @@ e_summary_mail_generate_html (ESummary *summary)
g_string_free (string, FALSE);
}
+const char *
+e_summary_mail_get_html (ESummary *summary)
+{
+ /* Only regenerate HTML when it's needed */
+ e_summary_mail_generate_html (summary);
+
+ if (summary->mail == NULL) {
+ return NULL;
+ }
+
+ return summary->mail->html;
+}
+
static void
e_summary_mail_get_info (ESummaryMail *mail,
const char *uri,
@@ -218,19 +222,21 @@ update_folder_cb (EvolutionStorageListener *listener,
ESummary *summary)
{
char *evolution_dir;
- char *proto;
+ static char *proto = NULL;
char *uri;
- evolution_dir = gnome_util_prepend_user_home ("evolution/local");
+ /* Make this static, saves having to recompute it each time */
+ if (proto == NULL) {
+ evolution_dir = gnome_util_prepend_user_home ("evolution/local");
- proto = g_strconcat ("file://", evolution_dir, NULL);
+ proto = g_strconcat ("file://", evolution_dir, NULL);
+ g_free (evolution_dir);
+ }
uri = e_path_to_physical (proto, path);
e_summary_mail_get_info (summary->mail, uri, summary->mail->listener);
g_free (uri);
- g_free (evolution_dir);
- g_free (proto);
}
static void
@@ -296,8 +302,6 @@ mail_change_notify (BonoboListener *listener,
uri = g_strconcat ("file://", p->data, NULL);
if (strcmp (uri, folder->path) == 0) {
- /* Regen HTML */
- e_summary_mail_generate_html (summary);
e_summary_draw (summary);
g_free (uri);
@@ -438,7 +442,11 @@ e_summary_mail_reconfigure (ESummary *summary)
ESummaryMailFolder *folder;
char *uri;
- uri = g_strconcat ("file://", p->data, NULL);
+ if (strncmp (p->data, "file://", 7) == 0) {
+ uri = g_strdup (p->data);
+ } else {
+ uri = g_strconcat ("file://", p->data, NULL);
+ }
folder = g_hash_table_lookup (mail->folders, uri);
if (folder != NULL) {
if (folder->init == FALSE) {
@@ -498,33 +506,126 @@ str_compare (gconstpointer a,
return strcmp (rda->name, rdb->name);
}
+static char *
+get_parent_path (const char *path)
+{
+ char *last;
+
+ last = strrchr (path, '/');
+ return g_strndup (path, last - path);
+}
+
+static gboolean
+is_folder_shown (ESummaryMail *mail,
+ const char *path)
+{
+ GList *p;
+
+ for (p = mail->shown; p; p = p->next) {
+ ESummaryMailFolder *folder = p->data;
+ if (strcmp (folder->path, path) == 0) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static ETreePath
+insert_path_recur (ESummaryTable *est,
+ GHashTable *hash_table,
+ const char *path,
+ ESummaryMail *mail)
+{
+ char *parent_path, *name;
+ ETreePath parent_node, node;
+ ESummaryTableModelEntry *entry;
+ static char *toplevel = NULL;
+
+ parent_path = get_parent_path (path);
+
+ if (toplevel == NULL) {
+ char *tmp;
+
+ tmp = gnome_util_prepend_user_home ("evolution/local");
+ toplevel = g_strconcat ("file://", tmp, NULL);
+ g_free (tmp);
+ }
+
+ parent_node = g_hash_table_lookup (hash_table, parent_path);
+ if (parent_node == NULL) {
+ if (strcmp (toplevel, path) == 0) {
+ /* Insert root */
+ return NULL;
+ } else {
+ parent_node = insert_path_recur (est, hash_table, parent_path, mail);
+ }
+ }
+
+ g_free (parent_path);
+ name = strrchr (path, '/');
+
+ /* Leave out folders called "subfolder" */
+ if (strcmp (name + 1, "subfolders") == 0) {
+ return parent_node;
+ }
+
+ node = e_summary_table_add_node (est, parent_node, 0, NULL);
+ entry = g_new (ESummaryTableModelEntry, 1);
+ entry->path = node;
+ entry->location = g_strdup (path);
+ entry->name = g_strdup (name + 1);
+ entry->editable = TRUE;
+ entry->removable = FALSE;
+
+ /* Check if shown */
+ entry->shown = is_folder_shown (mail, path);
+ g_hash_table_insert (est->model, entry->path, entry);
+ g_hash_table_insert (hash_table, g_strdup (path), node);
+
+ return node;
+}
+
+static void
+free_path_hash (gpointer key,
+ gpointer value,
+ gpointer data)
+{
+ g_free (key);
+}
+
void
-e_summary_mail_fill_list (GtkCList *clist,
+e_summary_mail_fill_list (ESummaryTable *est,
ESummary *summary)
{
ESummaryMail *mail;
- GList *names = NULL, *p;
+ GList *names, *p;
+ GHashTable *path_hash;
+ g_return_if_fail (IS_E_SUMMARY_TABLE (est));
+ g_return_if_fail (IS_E_SUMMARY (summary));
+
mail = summary->mail;
if (mail == NULL) {
return;
}
+ names = NULL;
g_hash_table_foreach (mail->folders, hash_to_list, &names);
+ path_hash = g_hash_table_new (g_str_hash, g_str_equal);
+
names = g_list_sort (names, str_compare);
for (p = names; p; p = p->next) {
- ESummaryMailRowData *rd;
- char *text[1];
- int row;
-
- rd = p->data;
- text[0] = rd->name + 1;
- row = gtk_clist_append (clist, text);
- gtk_clist_set_row_data_full (clist, row, rd, free_row_data);
+ ESummaryMailRowData *rd = p->data;
+ insert_path_recur (est, path_hash, rd->uri, mail);
+ free_row_data (rd);
}
+ /* Free everything */
g_list_free (names);
+ g_hash_table_foreach (path_hash, free_path_hash, NULL);
+ g_hash_table_destroy (path_hash);
}
const char *
diff --git a/my-evolution/e-summary-mail.h b/my-evolution/e-summary-mail.h
index 58e363d113..67740f7968 100644
--- a/my-evolution/e-summary-mail.h
+++ b/my-evolution/e-summary-mail.h
@@ -23,9 +23,10 @@
#ifndef __E_SUMMARY_MAIL_H__
#define __E_SUMMARY_MAIL_H__
-#include "e-summary-type.h"
#include <Evolution.h>
-#include <gtk/gtkclist.h>
+
+#include "e-summary-type.h"
+#include "e-summary-table.h"
typedef enum _ESummaryMailMode ESummaryMailMode;
enum _ESummaryMailMode {
@@ -46,8 +47,8 @@ void e_summary_mail_init (ESummary *summary,
GNOME_Evolution_Shell corba_shell);
void e_summary_mail_reconfigure (ESummary *summary);
void e_summary_mail_free (ESummary *summary);
-void e_summary_mail_fill_list (GtkCList *clist,
- ESummary *summary);
const char *e_summary_mail_uri_to_name (ESummary *summary,
const char *uri);
+void e_summary_mail_fill_list (ESummaryTable *est,
+ ESummary *summary);
#endif
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
index 09f9996e2d..a13804abda 100644
--- a/my-evolution/e-summary-preferences.c
+++ b/my-evolution/e-summary-preferences.c
@@ -24,9 +24,6 @@
#include <config.h>
#endif
-#include "e-summary.h"
-#include "e-summary-preferences.h"
-
#include <gtk/gtk.h>
#include <libgnome/gnome-defs.h>
@@ -44,6 +41,10 @@
#include <bonobo/bonobo-moniker-util.h>
#include <bonobo-conf/bonobo-config-database.h>
+#include "e-summary.h"
+#include "e-summary-preferences.h"
+#include "e-summary-table.h"
+
static void
make_initial_mail_list (ESummaryPrefs *prefs)
{
@@ -390,26 +391,31 @@ e_summary_preferences_init (ESummary *summary)
}
struct _MailPage {
+ GtkWidget *etable;
GtkWidget *all, *shown;
GtkWidget *fullpath;
GtkWidget *add, *remove;
+
+ GHashTable *model;
+ GList *tmp_list;
};
struct _RDFPage {
- GtkWidget *all, *shown;
+ GtkWidget *etable;
GtkWidget *refresh, *limit;
- GtkWidget *add, *remove;
- GtkWidget *new_url;
+ GtkWidget *new_url, *delete_url;
- GList *known;
+ GHashTable *default_hash, *model;
+ GList *known, *tmp_list;
};
struct _WeatherPage {
- GtkWidget *all, *shown;
+ GtkWidget *etable;
GtkWidget *refresh, *imperial, *metric;
GtkWidget *add, *remove;
- GtkCTreeNode *selected_node;
+ GHashTable *model;
+ GList *tmp_list;
};
struct _CalendarPage {
@@ -432,45 +438,47 @@ typedef struct _PropertyData {
struct _RDFInfo {
char *url;
char *name;
+
+ gboolean custom;
};
static struct _RDFInfo rdfs[] = {
- {"http://advogato.org/rss/articles.xml", "Advogato"},
- {"http://barrapunto.com/barrapunto.rdf", "Barrapunto"},
- {"http://barrapunto.com/gnome.rdf", "Barrapunto GNOME"},
- {"http://www.bsdtoday.com/backend/bt.rdf", "BSD Today"},
- {"http://beyond2000.com/b2k.rdf", "Beyond 2000"},
- {"http://www.cnn.com/cnn.rss", "CNN"},
- {"http://www.debianplanet.org/debianplanet/backend.php", "Debian Planet"},
- {"http://www.dictionary.com/wordoftheday/wotd.rss", N_("Dictionary.com Word of the Day")},
- {"http://www.dvdreview.com/rss/newschannel.rss", "DVD Review"},
- {"http://freshmeat.net/backend/fm.rdf", "Freshmeat"},
- {"http://news.gnome.org/gnome-news/rdf", "GNotices"},
- {"http://headlines.internet.com/internetnews/prod-news/news.rss", "Internet.com"},
- {"http://www.hispalinux.es/backend.php", "HispaLinux"},
- {"http://dot.kde.org/rdf", "KDE Dot News"},
- {"http://www.kuro5hin.org/backend.rdf", "Kuro5hin"},
- {"http://linuxgames.com/bin/mynetscape.pl", "Linux Games"},
- {"http://linux.com/mrn/jobs/latest_jobs.rss", "Linux Jobs"},
- {"http://linuxtoday.com/backend/my-netscape.rdf", "Linux Today"},
- {"http://lwn.net/headlines/rss", "Linux Weekly News"},
- {"http://www.linux.com/mrn/front_page.rss", "Linux.com"},
- {"http://memepool.com/memepool.rss", "Memepool"},
- {"http://www.mozilla.org/news.rdf", "Mozilla"},
- {"http://www.mozillazine.org/contents.rdf", "Mozillazine"},
- {"http://www.fool.com/about/headlines/rss_headlines.asp", "The Motley Fool"},
- {"http://www.newsforge.com/newsforge.rss", "Newsforge"},
- {"http://www.nanotechnews.com/nano/rdf", "Nanotech News"},
- {"http://www.pigdog.org/pigdog.rdf", "Pigdog"},
- {"http://www.python.org/channews.rdf", "Python.org"},
- {"http://www.quotationspage.com/data/mqotd.rss", N_("Quotes of the Day")},
- {"http://www.salon.com/feed/RDF/salon_use.rdf", "Salon"},
- {"http://slashdot.org/slashdot.rdf", "Slashdot"},
- {"http://www.theregister.co.uk/tonys/slashdot.rdf", "The Register"},
- {"http://www.thinkgeek.com/thinkgeek.rdf", "Think Geek"},
- {"http://www.webreference.com/webreference.rdf", "Web Reference"},
- {"http://redcarpet.ximian.com/red-carpet.rdf", "Ximian Red Carpet New"},
- {NULL, NULL}
+ {"http://advogato.org/rss/articles.xml", "Advogato", FALSE},
+ {"http://barrapunto.com/barrapunto.rdf", "Barrapunto", FALSE},
+ {"http://barrapunto.com/gnome.rdf", "Barrapunto GNOME", FALSE,},
+ {"http://www.bsdtoday.com/backend/bt.rdf", "BSD Today", FALSE},
+ {"http://beyond2000.com/b2k.rdf", "Beyond 2000", FALSE},
+ {"http://www.cnn.com/cnn.rss", "CNN", FALSE},
+ {"http://www.debianplanet.org/debianplanet/backend.php", "Debian Planet", FALSE},
+ {"http://www.dictionary.com/wordoftheday/wotd.rss", N_("Dictionary.com Word of the Day"), FALSE},
+ {"http://www.dvdreview.com/rss/newschannel.rss", "DVD Review", FALSE},
+ {"http://freshmeat.net/backend/fm.rdf", "Freshmeat", FALSE},
+ {"http://news.gnome.org/gnome-news/rdf", "GNotices", FALSE},
+ {"http://headlines.internet.com/internetnews/prod-news/news.rss", "Internet.com", FALSE},
+ {"http://www.hispalinux.es/backend.php", "HispaLinux", FALSE},
+ {"http://dot.kde.org/rdf", "KDE Dot News", FALSE},
+ {"http://www.kuro5hin.org/backend.rdf", "Kuro5hin", FALSE},
+ {"http://linuxgames.com/bin/mynetscape.pl", "Linux Games", FALSE},
+ {"http://linux.com/mrn/jobs/latest_jobs.rss", "Linux Jobs", FALSE},
+ {"http://linuxtoday.com/backend/my-netscape.rdf", "Linux Today", FALSE},
+ {"http://lwn.net/headlines/rss", "Linux Weekly News", FALSE},
+ {"http://www.linux.com/mrn/front_page.rss", "Linux.com", FALSE},
+ {"http://memepool.com/memepool.rss", "Memepool", FALSE},
+ {"http://www.mozilla.org/news.rdf", "Mozilla", FALSE},
+ {"http://www.mozillazine.org/contents.rdf", "Mozillazine", FALSE},
+ {"http://www.fool.com/about/headlines/rss_headlines.asp", "The Motley Fool", FALSE},
+ {"http://www.newsforge.com/newsforge.rss", "Newsforge", FALSE},
+ {"http://www.nanotechnews.com/nano/rdf", "Nanotech News", FALSE},
+ {"http://www.pigdog.org/pigdog.rdf", "Pigdog", FALSE},
+ {"http://www.python.org/channews.rdf", "Python.org", FALSE},
+ {"http://www.quotationspage.com/data/mqotd.rss", N_("Quotes of the Day"), FALSE},
+ {"http://www.salon.com/feed/RDF/salon_use.rdf", "Salon", FALSE},
+ {"http://slashdot.org/slashdot.rdf", "Slashdot", FALSE},
+ {"http://www.theregister.co.uk/tonys/slashdot.rdf", "The Register", FALSE},
+ {"http://www.thinkgeek.com/thinkgeek.rdf", "Think Geek", FALSE},
+ {"http://www.webreference.com/webreference.rdf", "Web Reference", FALSE},
+ {"http://redcarpet.ximian.com/red-carpet.rdf", "Ximian Red Carpet New", FALSE},
+ {NULL, NULL, FALSE}
};
static void
@@ -522,6 +530,10 @@ save_known_rdfs (GList *rdfs)
char *line;
info = rdfs->data;
+ if (info->custom == FALSE) {
+ continue;
+ }
+
line = g_strconcat (info->url, ",", info->name, "\n", NULL);
fputs (line, handle);
g_free (line);
@@ -530,14 +542,60 @@ save_known_rdfs (GList *rdfs)
fclose (handle);
}
+/* Yeah a silly loop, but p should be short enough that it doesn't matter much */
+static gboolean
+rdf_is_shown (PropertyData *pd,
+ const char *url)
+{
+ GList *p;
+
+ for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
+ if (strcmp (p->data, url) == 0) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
static void
-fill_rdf_all_clist (GtkCList *clist,
- PropertyData *pd)
+fill_rdf_etable (GtkWidget *widget,
+ PropertyData *pd)
{
+ ESummaryTableModelEntry *entry;
+ ESummaryTable *est;
FILE *handle;
- int i;
+ int i, total;
char *rdf_file, line[4096];
+ if (pd->rdf->default_hash == NULL) {
+ pd->rdf->default_hash = g_hash_table_new (g_str_hash, g_str_equal);
+ }
+
+ est = E_SUMMARY_TABLE (widget);
+
+ /* Fill the defaults first */
+ for (i = 0; rdfs[i].url; i++) {
+ ETreePath path;
+
+ path = e_summary_table_add_node (est, NULL, i, NULL);
+
+ entry = g_new (ESummaryTableModelEntry, 1);
+ entry->path = path;
+ entry->location = g_strdup (rdfs[i].url);
+ entry->name = g_strdup (rdfs[i].name);
+ entry->editable = TRUE;
+ entry->removable = FALSE;
+ entry->shown = rdf_is_shown (pd, entry->location);
+ g_hash_table_insert (est->model, entry->path, entry);
+
+ pd->rdf->known = g_list_append (pd->rdf->known, &rdfs[i]);
+
+ g_hash_table_insert (pd->rdf->default_hash, rdfs[i].url, &rdfs[i]);
+ }
+
+ total = i;
+
rdf_file = gnome_util_prepend_user_home ("evolution/RDF-urls.txt");
handle = fopen (rdf_file, "r");
g_free (rdf_file);
@@ -549,29 +607,18 @@ fill_rdf_all_clist (GtkCList *clist,
}
if (handle == NULL) {
- for (i = 0; rdfs[i].url; i++) {
- char *text[1];
- int row;
-
- text[0] = _(rdfs[i].name);
- row = gtk_clist_append (clist, text);
- /* We don't need to free this data as it's
- static */
- gtk_clist_set_row_data (clist, row, &rdfs[i]);
- pd->rdf->known = g_list_append (pd->rdf->known, &rdfs[i]);
- }
-
return;
}
while (fgets (line, 4095, handle)) {
- char *text[1];
+ ETreePath path;
char **tokens;
struct _RDFInfo *info;
- int row;
+ int len;
- if (line[strlen (line) - 1] == '\n') {
- line[strlen (line) - 1] = 0;
+ len = strlen (line);
+ if (line[len - 1] == '\n') {
+ line[len - 1] = 0;
}
tokens = g_strsplit (line, ",", 2);
@@ -579,15 +626,28 @@ fill_rdf_all_clist (GtkCList *clist,
continue;
}
+ if (g_hash_table_lookup (pd->rdf->default_hash, tokens[0]) != NULL) {
+ g_strfreev (tokens);
+ continue;
+ }
+
info = g_new (struct _RDFInfo, 1);
info->url = g_strdup (tokens[0]);
info->name = g_strdup (tokens[1]);
-
+ info->custom = TRUE;
+
pd->rdf->known = g_list_append (pd->rdf->known, info);
- text[0] = tokens[1];
- row = gtk_clist_append (clist, text);
- gtk_clist_set_row_data_full (clist, row, info,
- (GtkDestroyNotify) free_rdf_info);
+
+ path = e_summary_table_add_node (est, NULL, total++, NULL);
+ entry = g_new (ESummaryTableModelEntry, 1);
+ entry->path = path;
+ entry->location = g_strdup (info->url);
+ entry->name = g_strdup (info->name);
+ entry->editable = TRUE;
+ entry->removable = TRUE;
+ entry->shown = rdf_is_shown (pd, entry->location);
+ g_hash_table_insert (est->model, entry->path, entry);
+
g_strfreev (tokens);
}
@@ -595,182 +655,17 @@ fill_rdf_all_clist (GtkCList *clist,
}
static void
-fill_rdf_shown_clist (GtkCList *clist,
- PropertyData *pd)
-{
- GList *p;
-
- for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
- char *text[1];
- int row;
-
- text[0] = (char *) find_name_for_url (pd, p->data);
- row = gtk_clist_append (clist, text);
- gtk_clist_set_row_data (clist, row, p);
- }
-}
-
-static void
-fill_weather_all_ctree (GtkCTree *ctree)
-{
- e_summary_weather_ctree_fill (ctree);
-}
-
-static void
-fill_weather_shown_clist (GtkCList *clist,
- PropertyData *pd)
-{
- GList *p;
-
- for (p = pd->summary->preferences->stations; p; p = p->next) {
- char *text[1];
- char *pretty;
-
- pretty = (char *) e_summary_weather_code_to_name (p->data);
-
- text[0] = pretty;
- gtk_clist_append (clist, text);
- }
-}
-
-static void
-fill_mail_all_clist (GtkCList *clist,
- PropertyData *pd)
-{
- e_summary_mail_fill_list (clist, pd->summary);
-}
-
-static void
-fill_mail_shown_clist (GtkCList *clist,
- PropertyData *pd)
-{
- GList *p;
-
- for (p = pd->summary->preferences->display_folders; p; p = p->next) {
- char *text[1];
- char *uri;
- const char *name;
- int row;
-
- uri = g_strconcat ("file://", p->data, NULL);
- name = e_summary_mail_uri_to_name (pd->summary, uri);
- g_free (uri);
- if (name == NULL) {
- text[0] = p->data;
- } else {
- text[0] = (char *) name + 1; /* GtkCList sucks. */
- }
- row = gtk_clist_prepend (clist, text);
- gtk_clist_set_row_data (clist, row, p);
- }
-}
-
-static void
-mail_all_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- ESummaryMailRowData *rd;
- GList *p;
-
- rd = gtk_clist_get_row_data (GTK_CLIST (pd->mail->all), row);
- if (rd == NULL) {
- return;
- }
-
- for (p = pd->summary->preferences->display_folders; p; p = p->next) {
- if (strcmp (rd->uri + 7, p->data) == 0) {
- /* Already in list */
- return;
- }
- }
-
- gtk_widget_set_sensitive (pd->mail->add, TRUE);
-}
-
-static void
-mail_all_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->mail->add, FALSE);
- }
-}
-
-static void
-mail_shown_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- gtk_widget_set_sensitive (pd->mail->remove, TRUE);
-}
-
-static void
-mail_shown_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->mail->remove, FALSE);
- }
-}
-
-static void
-mail_add_clicked_cb (GtkButton *button,
+fill_weather_etable (ESummaryTable *est,
PropertyData *pd)
{
- int row;
- ESummaryMailRowData *rd;
- char *text[1];
- GList *p;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->mail->all)->selection->data);
- rd = gtk_clist_get_row_data (GTK_CLIST (pd->mail->all), row);
- g_return_if_fail (rd != NULL);
-
- for (p = pd->summary->preferences->display_folders; p; p = p->next) {
- if (strcmp (rd->uri + 7, p->data) == 0) {
- /* Already in list */
- return;
- }
- }
-
- text[0] = rd->name + 1;
- row = gtk_clist_append (GTK_CLIST (pd->mail->shown), text);
-
- pd->summary->preferences->display_folders = g_list_prepend (pd->summary->preferences->display_folders,
- g_strdup (rd->uri + 7));
- gtk_clist_set_row_data (GTK_CLIST (pd->mail->shown), row, pd->summary->preferences->display_folders);
-
- gnome_property_box_changed (pd->box);
+ e_summary_weather_fill_etable (est, pd->summary);
}
static void
-mail_remove_clicked_cb (GtkButton *button,
- PropertyData *pd)
+fill_mail_etable (ESummaryTable *est,
+ PropertyData *pd)
{
- int row;
- GList *p;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->mail->shown)->selection->data);
- p = gtk_clist_get_row_data (GTK_CLIST (pd->mail->shown), row);
-
- gtk_clist_remove (GTK_CLIST (pd->mail->shown), row);
- pd->summary->preferences->display_folders = g_list_remove_link (pd->summary->preferences->display_folders, p);
- g_free (p->data);
- g_list_free (p);
-
- gtk_clist_select_row (GTK_CLIST (pd->mail->shown), row, 0);
- gnome_property_box_changed (pd->box);
+ e_summary_mail_fill_list (est, pd->summary);
}
static void
@@ -781,113 +676,7 @@ mail_show_full_path_toggled_cb (GtkToggleButton *tb,
gnome_property_box_changed (pd->box);
}
-static void
-rdf_all_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- struct _RDFInfo *info;
- GList *p;
-
- info = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->all), row);
- g_return_if_fail (info != NULL);
-
- for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
- if (strcmp (p->data, info->url) == 0) {
- /* Found it already */
- return;
- }
- }
-
- gtk_widget_set_sensitive (pd->rdf->add, TRUE);
-}
-
-static void
-rdf_all_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (GTK_CLIST (pd->rdf->all)->selection == NULL) {
- gtk_widget_set_sensitive (pd->rdf->add, FALSE);
- }
-}
-
-static void
-rdf_shown_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- gtk_widget_set_sensitive (pd->rdf->remove, TRUE);
-}
-
-static void
-rdf_shown_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (GTK_CLIST (pd->rdf->shown)->selection == NULL) {
- gtk_widget_set_sensitive (pd->rdf->remove, FALSE);
- }
-}
-
-static void
-rdf_add_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- struct _RDFInfo *info;
- GList *p, *rows;
- char *text[1];
- int row;
-
- for (rows = GTK_CLIST (pd->rdf->all)->selection; rows; rows = rows->next) {
- row = GPOINTER_TO_INT (rows->data);
- info = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->all), row);
-
- text[0] = info->name;
-
- for (p = pd->summary->preferences->rdf_urls; p; p = p->next) {
- if (strcmp (p->data, info->url) == 0) {
- /* Found it already */
- return;
- }
- }
-
-
- pd->summary->preferences->rdf_urls = g_list_prepend (pd->summary->preferences->rdf_urls, g_strdup (info->url));
- row = gtk_clist_prepend (GTK_CLIST (pd->rdf->shown), text);
- gtk_clist_set_row_data (GTK_CLIST (pd->rdf->shown), row,
- pd->summary->preferences->rdf_urls);
- }
- gnome_property_box_changed (pd->box);
-}
-
-static void
-rdf_remove_clicked_cb (GtkButton *button,
- PropertyData *pd)
-{
- GList *p;
- int row;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->rdf->shown)->selection->data);
- p = gtk_clist_get_row_data (GTK_CLIST (pd->rdf->shown), row);
- gtk_clist_remove (GTK_CLIST (pd->rdf->shown), row);
-
- pd->summary->preferences->rdf_urls = g_list_remove_link (pd->summary->preferences->rdf_urls, p);
- g_free (p->data);
- g_list_free (p);
-
- gtk_clist_select_row (GTK_CLIST (pd->rdf->shown), row, 0);
- gnome_property_box_changed (pd->box);
-}
-
+#if 0
static void
add_dialog_clicked_cb (GnomeDialog *dialog,
int button,
@@ -971,6 +760,7 @@ rdf_new_url_clicked_cb (GtkButton *button,
hbox, TRUE, TRUE, 0);
gtk_widget_show_all (add_dialog);
}
+#endif
static void
rdf_refresh_value_changed_cb (GtkAdjustment *adj,
@@ -989,105 +779,26 @@ rdf_limit_value_changed_cb (GtkAdjustment *adj,
}
static void
-weather_all_select_row_cb (GtkCTree *ctree,
- GtkCTreeNode *row,
- int column,
- PropertyData *pd)
-{
- ESummaryWeatherLocation *location;
- GList *p;
-
- location = gtk_ctree_node_get_row_data (GTK_CTREE (pd->weather->all), row);
- if (location == NULL) {
- gtk_ctree_unselect (ctree, row);
- return;
- }
-
- for (p = pd->summary->preferences->stations; p; p = p->next) {
- if (strcmp (location->code, p->data) == 0) {
- return; /* Already have it */
- }
- }
-
- gtk_widget_set_sensitive (pd->weather->add, TRUE);
- pd->weather->selected_node = row;
-}
-
-static void
-weather_all_unselect_row_cb (GtkCList *clist,
- GtkCTreeNode *row,
- int column,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->weather->add, FALSE);
- }
- pd->weather->selected_node = NULL;
-}
-
-static void
-weather_shown_select_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
+mail_etable_item_changed_cb (ESummaryTable *est,
+ ETreePath path,
PropertyData *pd)
{
- gtk_widget_set_sensitive (pd->weather->remove, TRUE);
-}
-
-static void
-weather_shown_unselect_row_cb (GtkCList *clist,
- int row,
- int column,
- GdkEvent *event,
- PropertyData *pd)
-{
- if (clist->selection == NULL) {
- gtk_widget_set_sensitive (pd->weather->remove, FALSE);
- }
+ gnome_property_box_changed (pd->box);
}
static void
-weather_add_clicked_cb (GtkButton *button,
- PropertyData *pd)
+rdf_etable_item_changed_cb (ESummaryTable *est,
+ ETreePath path,
+ PropertyData *pd)
{
- ESummaryWeatherLocation *location;
- GList *p;
- char *text[1];
-
- location = gtk_ctree_node_get_row_data (GTK_CTREE (pd->weather->all), pd->weather->selected_node);
-
- g_return_if_fail (location != NULL);
-
- for (p = pd->summary->preferences->stations; p; p = p->next) {
- if (strcmp (location->code, p->data) == 0) {
- return; /* Already have it */
- }
- }
-
- pd->summary->preferences->stations = g_list_prepend (pd->summary->preferences->stations, g_strdup (location->code));
- text[0] = location->name;
- gtk_clist_prepend (GTK_CLIST (pd->weather->shown), text);
-
gnome_property_box_changed (pd->box);
}
static void
-weather_remove_clicked_cb (GtkButton *button,
- PropertyData *pd)
+weather_etable_item_changed_cb (ESummaryTable *est,
+ ETreePath path,
+ PropertyData *pd)
{
- int row;
- GList *p;
-
- row = GPOINTER_TO_INT (GTK_CLIST (pd->weather->shown)->selection->data);
- p = g_list_nth (pd->summary->preferences->stations, row);
- gtk_clist_remove (GTK_CLIST (pd->weather->shown), row);
-
- pd->summary->preferences->stations = g_list_remove_link (pd->summary->preferences->stations, p);
- g_free (p->data);
- g_list_free (p);
-
- gtk_clist_select_row (GTK_CLIST (pd->weather->shown), row, 0);
gnome_property_box_changed (pd->box);
}
@@ -1196,21 +907,6 @@ calendar_today_toggled_cb (GtkToggleButton *tb,
gnome_property_box_changed (pd->box);
}
-static void
-construct_pixmap_button (GladeXML *xml,
- const char *id,
- const char *image)
-{
- GtkWidget *box, *pixmap;
-
- box = glade_xml_get_widget (xml, id);
-
- pixmap = gnome_stock_pixmap_widget (NULL, image);
- gtk_box_pack_start (GTK_BOX (box), pixmap, TRUE, TRUE, 0);
-
- gtk_widget_show (pixmap);
-}
-
static gboolean
make_property_dialog (PropertyData *pd)
{
@@ -1221,24 +917,17 @@ make_property_dialog (PropertyData *pd)
/* Mail */
mail = pd->mail = g_new (struct _MailPage, 1);
+ mail->tmp_list = NULL;
+
+ mail->etable = glade_xml_get_widget (pd->xml, "mail-custom");
+ g_return_val_if_fail (mail->etable != NULL, FALSE);
- /* I think this should be a fancy bonobo thingy */
- mail->all = glade_xml_get_widget (pd->xml, "clist7");
- g_return_val_if_fail (mail->all != NULL, FALSE);
- fill_mail_all_clist (GTK_CLIST (mail->all), pd);
- gtk_signal_connect (GTK_OBJECT (mail->all), "select-row",
- GTK_SIGNAL_FUNC (mail_all_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (mail->all), "unselect-row",
- GTK_SIGNAL_FUNC (mail_all_unselect_row_cb), pd);
-
- mail->shown = glade_xml_get_widget (pd->xml, "clist1");
- g_return_val_if_fail (mail->shown != NULL, FALSE);
- fill_mail_shown_clist (GTK_CLIST (mail->shown), pd);
- gtk_signal_connect (GTK_OBJECT (mail->shown), "select-row",
- GTK_SIGNAL_FUNC (mail_shown_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (mail->shown), "unselect-row",
- GTK_SIGNAL_FUNC (mail_shown_unselect_row_cb), pd);
-
+ gtk_signal_connect (GTK_OBJECT (mail->etable), "item-changed",
+ GTK_SIGNAL_FUNC (mail_etable_item_changed_cb), pd);
+
+ mail->model = E_SUMMARY_TABLE (mail->etable)->model;
+ fill_mail_etable (E_SUMMARY_TABLE (mail->etable), pd);
+
mail->fullpath = glade_xml_get_widget (pd->xml, "checkbutton1");
g_return_val_if_fail (mail->fullpath != NULL, FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mail->fullpath),
@@ -1246,39 +935,22 @@ make_property_dialog (PropertyData *pd)
gtk_signal_connect (GTK_OBJECT (mail->fullpath), "toggled",
GTK_SIGNAL_FUNC (mail_show_full_path_toggled_cb), pd);
- mail->add = glade_xml_get_widget (pd->xml, "button4");
- g_return_val_if_fail (mail->add != NULL, FALSE);
- construct_pixmap_button (pd->xml, "hbox-mailadd",
- GNOME_STOCK_BUTTON_NEXT);
- gtk_signal_connect (GTK_OBJECT (mail->add), "clicked",
- GTK_SIGNAL_FUNC (mail_add_clicked_cb), pd);
-
- mail->remove = glade_xml_get_widget (pd->xml, "button5");
- g_return_val_if_fail (mail->remove != NULL, FALSE);
- construct_pixmap_button (pd->xml, "hbox-mailremove",
- GNOME_STOCK_BUTTON_PREV);
- gtk_signal_connect (GTK_OBJECT (mail->remove), "clicked",
- GTK_SIGNAL_FUNC (mail_remove_clicked_cb), pd);
-
/* RDF */
rdf = pd->rdf = g_new (struct _RDFPage, 1);
rdf->known = NULL;
- rdf->all = glade_xml_get_widget (pd->xml, "clist6");
- g_return_val_if_fail (rdf->all != NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->all), "select-row",
- GTK_SIGNAL_FUNC (rdf_all_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (rdf->all), "unselect-row",
- GTK_SIGNAL_FUNC (rdf_all_unselect_row_cb), pd);
- fill_rdf_all_clist (GTK_CLIST (rdf->all), pd);
-
- rdf->shown = glade_xml_get_widget (pd->xml, "clist5");
- g_return_val_if_fail (rdf->shown != NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->shown), "select-row",
- GTK_SIGNAL_FUNC (rdf_shown_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (rdf->shown), "unselect-row",
- GTK_SIGNAL_FUNC (rdf_shown_unselect_row_cb), pd);
- fill_rdf_shown_clist (GTK_CLIST (rdf->shown), pd);
+ rdf->tmp_list = NULL;
+ rdf->default_hash = NULL;
+
+ rdf->etable = glade_xml_get_widget (pd->xml, "rdf-custom");
+ g_return_val_if_fail (rdf->etable != NULL, FALSE);
+ gtk_signal_connect (GTK_OBJECT (rdf->etable), "item-changed",
+ GTK_SIGNAL_FUNC (rdf_etable_item_changed_cb), pd);
+
+ rdf->model = E_SUMMARY_TABLE (rdf->etable)->model;
+
+ fill_rdf_etable (rdf->etable, pd);
+
rdf->refresh = glade_xml_get_widget (pd->xml, "spinbutton1");
g_return_val_if_fail (rdf->refresh != NULL, FALSE);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (rdf->refresh),
@@ -1293,46 +965,19 @@ make_property_dialog (PropertyData *pd)
gtk_signal_connect (GTK_OBJECT (GTK_SPIN_BUTTON (rdf->limit)->adjustment), "value_changed",
GTK_SIGNAL_FUNC (rdf_limit_value_changed_cb), pd);
- rdf->add = glade_xml_get_widget (pd->xml, "button9");
- g_return_val_if_fail (rdf->add != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-newsadd",
- GNOME_STOCK_BUTTON_NEXT);
- gtk_widget_set_sensitive (rdf->add, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->add), "clicked",
- GTK_SIGNAL_FUNC (rdf_add_clicked_cb), pd);
-
- rdf->remove = glade_xml_get_widget (pd->xml, "button10");
- g_return_val_if_fail (rdf->remove != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-newsremove",
- GNOME_STOCK_BUTTON_PREV);
- gtk_widget_set_sensitive (rdf->remove, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->remove), "clicked",
- GTK_SIGNAL_FUNC (rdf_remove_clicked_cb), pd);
-
- rdf->new_url = glade_xml_get_widget (pd->xml, "button11");
- g_return_val_if_fail (rdf->new_url != NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (rdf->new_url), "clicked",
- GTK_SIGNAL_FUNC (rdf_new_url_clicked_cb), pd);
-
/* Weather */
weather = pd->weather = g_new (struct _WeatherPage, 1);
- weather->all = glade_xml_get_widget (pd->xml, "ctree1");
- g_return_val_if_fail (weather->all != NULL, FALSE);
- fill_weather_all_ctree (GTK_CTREE (weather->all));
- gtk_signal_connect (GTK_OBJECT (weather->all), "tree-select-row",
- GTK_SIGNAL_FUNC (weather_all_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (weather->all), "tree-unselect-row",
- GTK_SIGNAL_FUNC (weather_all_unselect_row_cb), pd);
-
- weather->shown = glade_xml_get_widget (pd->xml, "clist3");
- g_return_val_if_fail (weather->shown != NULL, FALSE);
- fill_weather_shown_clist (GTK_CLIST (weather->shown), pd);
- gtk_signal_connect (GTK_OBJECT (weather->shown), "select-row",
- GTK_SIGNAL_FUNC (weather_shown_select_row_cb), pd);
- gtk_signal_connect (GTK_OBJECT (weather->shown), "unselect-row",
- GTK_SIGNAL_FUNC (weather_shown_unselect_row_cb), pd);
+ weather->tmp_list = NULL;
+
+ weather->etable = glade_xml_get_widget (pd->xml, "weather-custom");
+ g_return_val_if_fail (weather->etable != NULL, FALSE);
+
+ gtk_signal_connect (GTK_OBJECT (weather->etable), "item-changed",
+ GTK_SIGNAL_FUNC (weather_etable_item_changed_cb),
+ pd);
+ weather->model = E_SUMMARY_TABLE (weather->etable)->model;
+
+ fill_weather_etable (E_SUMMARY_TABLE (weather->etable), pd);
weather->refresh = glade_xml_get_widget (pd->xml, "spinbutton5");
g_return_val_if_fail (weather->refresh != NULL, FALSE);
@@ -1355,22 +1000,6 @@ make_property_dialog (PropertyData *pd)
gtk_signal_connect (GTK_OBJECT (weather->imperial), "toggled",
GTK_SIGNAL_FUNC (weather_imperial_toggled_cb), pd);
- weather->add = glade_xml_get_widget (pd->xml, "button6");
- g_return_val_if_fail (weather->add != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-weatheradd",
- GNOME_STOCK_BUTTON_NEXT);
- gtk_signal_connect (GTK_OBJECT (weather->add), "clicked",
- GTK_SIGNAL_FUNC (weather_add_clicked_cb), pd);
-
- weather->remove = glade_xml_get_widget (pd->xml, "button7");
- g_return_val_if_fail (weather->remove != NULL, FALSE);
-
- construct_pixmap_button (pd->xml, "hbox-weatherremove",
- GNOME_STOCK_BUTTON_PREV);
- gtk_signal_connect (GTK_OBJECT (weather->remove), "clicked",
- GTK_SIGNAL_FUNC (weather_remove_clicked_cb), pd);
-
/* Calendar */
calendar = pd->calendar = g_new (struct _CalendarPage, 1);
calendar->one = glade_xml_get_widget (pd->xml, "radiobutton3");
@@ -1417,18 +1046,25 @@ make_property_dialog (PropertyData *pd)
return TRUE;
}
-
+
static void
free_property_dialog (PropertyData *pd)
{
if (pd->rdf) {
g_list_free (pd->rdf->known);
+
+ free_str_list (pd->rdf->tmp_list);
+ g_list_free (pd->rdf->tmp_list);
g_free (pd->rdf);
}
if (pd->mail) {
+ free_str_list (pd->mail->tmp_list);
+ g_list_free (pd->mail->tmp_list);
g_free (pd->mail);
}
if (pd->weather) {
+ free_str_list (pd->weather->tmp_list);
+ g_list_free (pd->weather->tmp_list);
g_free (pd->weather);
}
if (pd->calendar) {
@@ -1446,11 +1082,74 @@ free_property_dialog (PropertyData *pd)
}
static void
+maybe_add_to_shown (gpointer key,
+ gpointer value,
+ gpointer data)
+{
+ ESummaryTableModelEntry *item;
+ GList **list;
+
+ item = (ESummaryTableModelEntry *) value;
+ list = (GList **) data;
+
+ if (item->shown == TRUE) {
+ *list = g_list_prepend (*list, g_strdup (item->location));
+ }
+}
+
+static void
property_box_clicked_cb (GnomeDialog *dialog,
int page_num,
PropertyData *pd)
{
if (page_num == -1) {
+
+ /* RDFs */
+ if (pd->rdf->tmp_list) {
+ free_str_list (pd->rdf->tmp_list);
+ g_list_free (pd->rdf->tmp_list);
+ pd->rdf->tmp_list = NULL;
+ }
+
+ /* Take each news feed which is on and add it
+ to the shown list */
+ g_hash_table_foreach (pd->rdf->model, maybe_add_to_shown, &pd->rdf->tmp_list);
+
+ if (pd->summary->preferences->rdf_urls) {
+ free_str_list (pd->summary->preferences->rdf_urls);
+ g_list_free (pd->summary->preferences->rdf_urls);
+ }
+
+ pd->summary->preferences->rdf_urls = copy_str_list (pd->rdf->tmp_list);
+
+ /* Weather */
+ if (pd->weather->tmp_list) {
+ free_str_list (pd->weather->tmp_list);
+ g_list_free (pd->weather->tmp_list);
+ pd->weather->tmp_list = NULL;
+ }
+ g_hash_table_foreach (pd->weather->model, maybe_add_to_shown, &pd->weather->tmp_list);
+
+ if (pd->summary->preferences->stations) {
+ free_str_list (pd->summary->preferences->stations);
+ g_list_free (pd->summary->preferences->stations);
+ }
+ pd->summary->preferences->stations = copy_str_list (pd->weather->tmp_list);
+
+ /* Folders */
+ if (pd->mail->tmp_list) {
+ free_str_list (pd->mail->tmp_list);
+ g_list_free (pd->mail->tmp_list);
+ pd->mail->tmp_list = NULL;
+ }
+ g_hash_table_foreach (pd->mail->model, maybe_add_to_shown, &pd->mail->tmp_list);
+
+ if (pd->summary->preferences->display_folders) {
+ free_str_list (pd->summary->preferences->display_folders);
+ g_list_free (pd->summary->preferences->display_folders);
+ }
+ pd->summary->preferences->display_folders = copy_str_list (pd->mail->tmp_list);
+
e_summary_reconfigure (pd->summary);
}
}
@@ -1469,6 +1168,28 @@ property_box_destroy_cb (GtkObject *object,
free_property_dialog (pd);
}
+/* Prototypes to shut gcc up */
+GtkWidget *e_summary_preferences_make_mail_table (PropertyData *pd);
+GtkWidget *e_summary_preferences_make_rdf_table (PropertyData *pd);
+GtkWidget *e_summary_preferences_make_weather_table (PropertyData *pd);
+GtkWidget *
+e_summary_preferences_make_mail_table (PropertyData *pd)
+{
+ return e_summary_table_new (g_hash_table_new (NULL, NULL));
+}
+
+GtkWidget *
+e_summary_preferences_make_rdf_table (PropertyData *pd)
+{
+ return e_summary_table_new (g_hash_table_new (NULL, NULL));
+}
+
+GtkWidget *
+e_summary_preferences_make_weather_table (PropertyData *pd)
+{
+ return e_summary_table_new (g_hash_table_new (NULL, NULL));
+}
+
void
e_summary_configure (BonoboUIComponent *component,
gpointer userdata,
diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c
index 1fe6d33003..9863b34a0c 100644
--- a/my-evolution/e-summary-rdf.c
+++ b/my-evolution/e-summary-rdf.c
@@ -362,10 +362,11 @@ e_summary_rdf_update (ESummary *summary)
RDF *rdf = r->data;
if (rdf->message) {
- soup_message_cancel (rdf->message);
+ continue;
}
context = soup_context_get (rdf->uri);
+ g_print ("Updating %s\n", rdf->uri);
if (context == NULL) {
g_warning ("Invalid URL: %s", rdf->uri);
soup_context_unref (context);
diff --git a/my-evolution/e-summary-table.c b/my-evolution/e-summary-table.c
new file mode 100644
index 0000000000..888b777bbd
--- /dev/null
+++ b/my-evolution/e-summary-table.c
@@ -0,0 +1,423 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Iain Holmes <iain@ximian.com>
+ *
+ * Copyright 2002 Ximain, Inc. (www.ximian.com)
+ *
+ * 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 Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkenums.h>
+
+#include <gal/util/e-util.h>
+#include <gal/widgets/e-gui-utils.h>
+
+#include <gal/e-table/e-table-header.h>
+#include <gal/e-table/e-table-header-item.h>
+#include <gal/e-table/e-table-item.h>
+#include <gal/e-table/e-cell-text.h>
+#include <gal/e-table/e-cell-tree.h>
+#include <gal/e-table/e-cell-checkbox.h>
+#include <gal/e-table/e-table.h>
+#include <gal/e-table/e-tree-scrolled.h>
+#include <gal/e-table/e-tree-memory.h>
+#include <gal/e-table/e-tree-memory-callbacks.h>
+#include <gal/e-table/e-tree-table-adapter.h>
+
+#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-init.h>
+
+#include "e-summary-table.h"
+
+#define COLS 2
+
+#if 0 /* For translators */
+char *headers[COLS] = {
+ N_("Shown"),
+ N_("Name")
+};
+#endif
+
+#define SPEC "<ETableSpecification cursor-mode=\"line\" draw-focus=\"true\"> \
+<ETableColumn model_col=\"0\" _title=\"Shown\" resizable=\"true\" cell=\"checkbox\" compare=\"integer\"/> \
+<ETableColumn model_col=\"1\" _title=\"Name\" minimum_width=\"20\" resizable=\"true\" cell=\"render-name\" compare=\"string\"/> \
+<ETableState> \
+<column source=\"0\"/> \
+<column source=\"1\"/> \
+<grouping></grouping> \
+</ETableState> \
+</ETableSpecification>"
+
+#define PARENT_TYPE (gtk_vbox_get_type ())
+
+static GtkObjectClass *e_summary_table_parent_class;
+
+struct _ESummaryTablePrivate {
+ GtkWidget *etable;
+ ETableExtras *extras;
+ ETreeTableAdapter *adapter;
+ ETreeModel *etm;
+
+ ETreePath root_node;
+};
+
+enum {
+ ITEM_CHANGED,
+ LAST_SIGNAL
+};
+static guint32 table_signals[LAST_SIGNAL] = { 0 };
+
+/* ETree callbacks */
+static GdkPixbuf *
+icon_at (ETreeModel *etm,
+ ETreePath path,
+ void *model_data)
+{
+ /* No icon, since the cell tree renderer takes care of +/- */
+ return NULL;
+}
+
+static int
+column_count (ETreeModel *etm,
+ void *data)
+{
+ return COLS;
+}
+
+static void *
+duplicate_value (ETreeModel *etm,
+ int col,
+ const void *value,
+ void *data)
+{
+ switch (col) {
+ case 0:
+ return (void *) value;
+
+ case 1:
+ return g_strdup (value);
+
+ default:
+ g_assert_not_reached ();
+ }
+
+ return NULL;
+}
+
+static void
+free_value (ETreeModel *etm,
+ int col,
+ void *value,
+ void *data)
+{
+ if (col == 1) {
+ g_free (value);
+ }
+}
+
+static void *
+initialise_value (ETreeModel *etm,
+ int col,
+ void *data)
+{
+ switch (col) {
+ case 0:
+ return GINT_TO_POINTER (1);
+
+ case 1:
+ return g_strdup ("2");
+
+ default:
+ g_assert_not_reached ();
+
+ }
+
+ return NULL;
+}
+
+static gboolean
+value_is_empty (ETreeModel *etm,
+ int col,
+ const void *value,
+ void *data)
+{
+ if (col == 1) {
+ return !(value && *(char *)value);
+ }
+
+ return FALSE;
+}
+
+static char *
+value_to_string (ETreeModel *etm,
+ int col,
+ const void *value,
+ void *data)
+{
+ switch (col) {
+ case 0:
+ return g_strdup_printf ("%d", GPOINTER_TO_INT (value));
+
+ case 1:
+ return g_strdup (value);
+
+ default:
+ g_assert_not_reached ();
+ }
+
+ return NULL;
+}
+
+static void *
+value_at (ETreeModel *etm,
+ ETreePath path,
+ int col,
+ void *model_data)
+{
+ GHashTable *table;
+ ESummaryTable *est = E_SUMMARY_TABLE (model_data);
+ ESummaryTableModelEntry *entry;
+
+ table = est->model;
+ if (e_tree_model_node_is_root (etm, path)) {
+ if (col == 1) {
+ return "<Root>";
+ } else {
+ return GINT_TO_POINTER (0);
+ }
+ } else {
+ entry = g_hash_table_lookup (table, path);
+ g_return_val_if_fail (entry != NULL, NULL);
+
+ if (col == 1) {
+ return entry->name;
+
+ } else {
+ return GINT_TO_POINTER (entry->shown);
+ }
+ }
+}
+
+static void
+set_value_at (ETreeModel *etm,
+ ETreePath path,
+ int col,
+ const void *val,
+ void *model_data)
+{
+ GHashTable *table;
+ ESummaryTable *est = E_SUMMARY_TABLE (model_data);
+ ESummaryTableModelEntry *entry;
+
+ if (e_tree_model_node_is_root (etm, path)) {
+ return;
+ }
+
+ if (col != 0) {
+ return;
+ }
+
+ table = est->model;
+ entry = g_hash_table_lookup (table, path);
+ g_return_if_fail (entry != NULL);
+
+ if (entry->editable == TRUE) {
+ entry->shown = GPOINTER_TO_INT (val);
+ gtk_signal_emit (GTK_OBJECT (est), table_signals[ITEM_CHANGED], path);
+ }
+}
+
+static gboolean
+is_editable (ETreeModel *etm,
+ ETreePath path,
+ int col,
+ void *model_data)
+{
+ GHashTable *table;
+ ESummaryTable *est = (ESummaryTable *) model_data;
+ ESummaryTableModelEntry *entry;
+
+ if (e_tree_model_node_is_root (etm, path)) {
+ return FALSE;
+ }
+
+ if (col == 1) {
+ return FALSE;
+ }
+
+ table = est->model;
+ entry = g_hash_table_lookup (table, path);
+ g_return_val_if_fail (entry != NULL, FALSE);
+
+ return entry->editable;
+}
+
+/* GtkObject callbacks */
+
+static void
+free_model_entry (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ ESummaryTableModelEntry *entry;
+
+ entry = value;
+ g_free (entry->location);
+ g_free (entry->name);
+ g_free (entry);
+}
+
+static void
+destroy (GtkObject *object)
+{
+ ESummaryTable *est;
+ ESummaryTablePrivate *priv;
+
+ est = E_SUMMARY_TABLE (object);
+ priv = est->priv;
+
+ if (priv == NULL) {
+ return;
+ }
+
+ /* What do I need to free? */
+ g_hash_table_foreach (est->model, free_model_entry, NULL);
+ g_hash_table_destroy (est->model);
+ est->model = NULL;
+
+ g_free (priv);
+ est->priv = NULL;
+
+ e_summary_table_parent_class->destroy (object);
+}
+
+static void
+e_summary_table_class_init (GtkObjectClass *object_class)
+{
+ object_class->destroy = destroy;
+
+ e_summary_table_parent_class = gtk_type_class (PARENT_TYPE);
+
+ table_signals[ITEM_CHANGED] = gtk_signal_new ("item-changed",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ESummaryTableClass, item_changed),
+ gtk_marshal_NONE__POINTER,
+ GTK_TYPE_NONE, 1,
+ GTK_TYPE_POINTER);
+ gtk_object_class_add_signals (object_class, table_signals, LAST_SIGNAL);
+}
+
+static void
+e_summary_table_init (ESummaryTable *est)
+{
+ ESummaryTablePrivate *priv;
+ ETreeMemory *etmm;
+ ECell *cell;
+ ETree *tree;
+
+ priv = g_new (ESummaryTablePrivate, 1);
+ est->priv = priv;
+
+ priv->etm = e_tree_memory_callbacks_new (icon_at,
+ column_count,
+
+ NULL,
+ NULL,
+
+ NULL,
+ NULL,
+
+ value_at,
+ set_value_at,
+ is_editable,
+
+ duplicate_value,
+ free_value,
+ initialise_value,
+ value_is_empty,
+ value_to_string,
+ est);
+ gtk_object_ref (GTK_OBJECT (priv->etm));
+ gtk_object_sink (GTK_OBJECT (priv->etm));
+
+ etmm = E_TREE_MEMORY (priv->etm);
+ e_tree_memory_set_expanded_default (etmm, TRUE);
+
+ priv->root_node = e_tree_memory_node_insert (etmm, NULL, 0, est);
+
+ cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
+ priv->extras = e_table_extras_new ();
+ e_table_extras_add_cell (priv->extras, "render-name", e_cell_tree_new (NULL, NULL, FALSE, cell));
+
+ priv->etable = e_tree_scrolled_new (priv->etm, priv->extras, SPEC, NULL);
+ if (priv->etable == NULL) {
+ g_warning ("Could not create ETable for ESummaryTable");
+ return;
+ }
+
+ tree = e_tree_scrolled_get_tree (E_TREE_SCROLLED (priv->etable));
+ e_tree_root_node_set_visible (tree, FALSE);
+
+ gtk_box_pack_start (GTK_BOX (est), GTK_WIDGET (priv->etable),
+ TRUE, TRUE, 0);
+ gtk_widget_show (GTK_WIDGET (priv->etable));
+}
+
+E_MAKE_TYPE (e_summary_table, "ESummaryTable", ESummaryTable,
+ e_summary_table_class_init, e_summary_table_init, PARENT_TYPE);
+
+GtkWidget *
+e_summary_table_new (GHashTable *model)
+{
+ ESummaryTable *table;
+
+ table = gtk_type_new (e_summary_table_get_type ());
+ table->model = model;
+
+ return GTK_WIDGET (table);
+}
+
+ETreePath
+e_summary_table_add_node (ESummaryTable *table,
+ ETreePath path,
+ int position,
+ gpointer node_data)
+{
+ ETreeMemory *etmm;
+ ETreePath p;
+
+ g_return_val_if_fail (IS_E_SUMMARY_TABLE (table), NULL);
+
+ if (path == NULL) {
+ path = table->priv->root_node;
+ }
+
+ etmm = E_TREE_MEMORY (table->priv->etm);
+ p = e_tree_memory_node_insert (etmm, path, position, node_data);
+
+ return p;
+}
+
+
diff --git a/my-evolution/e-summary-table.h b/my-evolution/e-summary-table.h
new file mode 100644
index 0000000000..cbddb9bec9
--- /dev/null
+++ b/my-evolution/e-summary-table.h
@@ -0,0 +1,73 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors: Iain Holmes <iain@ximian.com>
+ *
+ * Copyright 2002 Ximain, Inc. (www.ximian.com)
+ *
+ * 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 Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef __E_SUMMARY_TABLE_H__
+#define __E_SUMMARY_TABLE_H__
+
+#include <gtk/gtkvbox.h>
+#include <glib.h>
+#include <gal/e-table/e-tree-memory.h>
+
+#define E_SUMMARY_TABLE_TYPE (e_summary_table_get_type ())
+#define E_SUMMARY_TABLE(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TABLE_TYPE, ESummaryTable))
+#define E_SUMMARY_TABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TABLE_TYPE, ESummaryTableClass))
+#define IS_E_SUMMARY_TABLE(obj) (GTK_CHECK_TYPE ((obj), E_SUMMARY_TABLE_TYPE))
+#define IS_E_SUMMARY_TABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_SUMMARY_TABLE_TYPE))
+
+typedef struct _ESummaryTablePrivate ESummaryTablePrivate;
+typedef struct _ESummaryTableClass ESummaryTableClass;
+typedef struct _ESummaryTable ESummaryTable;
+
+typedef struct _ESummaryTableModelEntry {
+ ETreePath path;
+
+ char *location;
+
+ gboolean editable;
+ gboolean removable;
+
+ gboolean shown;
+ char *name;
+} ESummaryTableModelEntry;
+
+struct _ESummaryTable {
+ GtkVBox parent;
+
+ GHashTable *model;
+ ESummaryTablePrivate *priv;
+};
+
+struct _ESummaryTableClass {
+ GtkVBoxClass parent_class;
+
+ void (* item_changed) (ESummaryTable *table,
+ ETreePath path);
+};
+
+GtkType e_summary_table_get_type (void);
+GtkWidget *e_summary_table_new (GHashTable *model);
+ETreePath e_summary_table_add_node (ESummaryTable *est,
+ ETreePath path,
+ int position,
+ gpointer node_data);
+
+#endif
diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c
index e16d2fc8e4..db539641d8 100644
--- a/my-evolution/e-summary-weather.c
+++ b/my-evolution/e-summary-weather.c
@@ -35,6 +35,7 @@
#include <gal/widgets/e-unicode.h>
#include "e-summary.h"
+#include "e-summary-table.h"
#include "e-summary-weather.h"
#include "weather.h"
#include "metar.h"
@@ -265,7 +266,7 @@ message_finished (SoupMessage *msg,
}
if (SOUP_MESSAGE_IS_ERROR (msg)) {
- GString *string;
+ char *mess;
ESummaryWeatherLocation *location;
g_warning ("Message failed: %d\n%s", msg->errorcode,
@@ -274,16 +275,12 @@ message_finished (SoupMessage *msg,
location = g_hash_table_lookup (locations_hash, w->location);
- string = g_string_new ("<br><b>There was an error downloading data for ");
- if (location == NULL) {
- g_string_append (string, w->location);
- } else {
- g_string_append (string, location->name);
- }
+ mess = g_strdup_printf ("<br><b>%s %s</b></br>",
+ _("There was an error downloading data for"),
+ location ? location->name : w->location);
- g_string_append (string, "</b><br>");
- w->html = e_utf8_from_locale_string (string->str);
- g_string_free (string, TRUE);
+ w->html = e_utf8_from_locale_string (mess);
+ g_free (mess);
e_summary_draw (w->summary);
return;
@@ -330,12 +327,12 @@ e_summary_weather_update (ESummary *summary)
Weather *weather = w->data;
if (weather->message != NULL) {
- soup_message_cancel (weather->message);
- weather->message = NULL;
+ continue;
}
uri = g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", weather->location);
context = soup_context_get (uri);
+ g_print ("Updating %s\n", uri);
if (context == NULL) {
g_warning ("Invalid URL: %s", uri);
soup_context_unref (context);
@@ -648,14 +645,39 @@ e_summary_weather_code_to_name (const char *code)
}
}
+static gboolean
+is_weather_shown (ESummaryWeather *weather,
+ const char *code)
+{
+ GList *p;
+
+ for (p = weather->weathers; p; p = p->next) {
+ Weather *w = p->data;
+
+ if (strcmp (w->location, code) == 0) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
void
-e_summary_weather_ctree_fill (GtkCTree *tree)
+e_summary_weather_fill_etable (ESummaryTable *est,
+ ESummary *summary)
{
- GtkCTreeNode *region, *state, *location, *pref_loc_root;
+ ESummaryWeather *weather;
+ ETreePath region, state, location;
+ ESummaryTableModelEntry *entry;
char *key, *path;
int nregions, iregions;
- char **regions, *pp[1];
+ char **regions;
+ int i, n, l;
+ g_return_if_fail (IS_E_SUMMARY (summary));
+
+ weather = summary->weather;
+
path = g_strdup (EVOLUTION_DATADIR "/evolution/Locations");
key = g_strdup_printf ("=%s=/", path);
@@ -664,14 +686,9 @@ e_summary_weather_ctree_fill (GtkCTree *tree)
gnome_config_push_prefix (key);
g_free (key);
- pp[0] = _("Regions");
- pref_loc_root = gtk_ctree_insert_node (tree, NULL, NULL, pp, 0,
- NULL, NULL, NULL, NULL,
- FALSE, TRUE);
-
gnome_config_get_vector ("Main/regions", &nregions, &regions);
region = NULL;
- for (iregions = nregions - 1; iregions >= 0; iregions--) {
+ for (i = 0, iregions = nregions - 1; iregions >= 0; iregions--, i++) {
int nstates, istates;
char **states;
char *region_name;
@@ -682,16 +699,21 @@ e_summary_weather_ctree_fill (GtkCTree *tree)
states_key = g_strconcat (regions[iregions], "/states", NULL);
region_name = gnome_config_get_string (region_name_key);
- pp[0] = region_name;
- region = gtk_ctree_insert_node (tree, pref_loc_root,
- region, pp, 0, NULL,
- NULL, NULL, NULL,
- FALSE, FALSE);
-
+ region = e_summary_table_add_node (est, NULL, i, NULL);
+
+ entry = g_new (ESummaryTableModelEntry, 1);
+ entry->path = region;
+ entry->location = NULL;
+ entry->name = g_strdup (region_name);
+ entry->editable = FALSE;
+ entry->removable = FALSE;
+ entry->shown = FALSE;
+ g_hash_table_insert (est->model, entry->path, entry);
+
gnome_config_get_vector (states_key, &nstates, &states);
state = NULL;
- for (istates = nstates - 1; istates >= 0; istates--) {
+ for (n = 0, istates = nstates - 1; istates >= 0; istates--, n++) {
void *iter;
char *iter_key, *iter_val;
char *state_path, *state_name_key, *state_name;
@@ -700,37 +722,48 @@ e_summary_weather_ctree_fill (GtkCTree *tree)
state_name_key = g_strconcat (state_path, "name", NULL);
state_name = gnome_config_get_string (state_name_key);
- pp[0] = state_name;
- state = gtk_ctree_insert_node (tree, region,
- state, pp, 0,
- NULL, NULL,
- NULL, NULL,
- FALSE, FALSE);
+ state = e_summary_table_add_node (est, region, n, NULL);
+
+ entry = g_new (ESummaryTableModelEntry, 1);
+ entry->path = state;
+ entry->location = NULL;
+ entry->name = g_strdup (state_name);
+ entry->editable = FALSE;
+ entry->removable = FALSE;
+ entry->shown = FALSE;
+ g_hash_table_insert (est->model, entry->path, entry);
location = NULL;
iter = gnome_config_init_iterator (state_path);
+ l = 0;
while ((iter = gnome_config_iterator_next (iter, &iter_key, &iter_val)) != NULL) {
if (strstr (iter_key, "loc") != NULL) {
char **locdata;
int nlocdata;
- ESummaryWeatherLocation *w_location;
gnome_config_make_vector (iter_val,
&nlocdata,
&locdata);
g_return_if_fail (nlocdata == 4);
- pp[0] = locdata[0];
- location = gtk_ctree_insert_node (tree, state, location, pp, 0,
- NULL, NULL, NULL, NULL, FALSE, TRUE);
- w_location = g_hash_table_lookup (locations_hash, locdata[1]);
- gtk_ctree_node_set_row_data (tree, location, w_location);
+ location = e_summary_table_add_node (est, state, l, NULL);
+ entry = g_new (ESummaryTableModelEntry, 1);
+ entry->path = location;
+ entry->location = g_strdup (locdata[1]);
+ entry->name = g_strdup (locdata[0]);
+ entry->editable = TRUE;
+ entry->removable = FALSE;
+
+ entry->shown = is_weather_shown (weather, locdata[1]);
+ g_hash_table_insert (est->model, entry->path, entry);
+
g_strfreev (locdata);
}
g_free (iter_key);
g_free (iter_val);
+ l++;
}
g_free (state_name);
diff --git a/my-evolution/e-summary-weather.h b/my-evolution/e-summary-weather.h
index f587e5f271..795afcfede 100644
--- a/my-evolution/e-summary-weather.h
+++ b/my-evolution/e-summary-weather.h
@@ -24,7 +24,7 @@
#define __E_SUMMARY_WEATHER_H__
#include <time.h>
-#include <gtk/gtkctree.h>
+
#include "e-summary-type.h"
typedef struct _ESummaryWeather ESummaryWeather;
@@ -144,7 +144,8 @@ typedef time_t ESummaryWeatherUpdate;
char *e_summary_weather_get_html (ESummary *summary);
void e_summary_weather_init (ESummary *summary);
void e_summary_weather_reconfigure (ESummary *summary);
-void e_summary_weather_ctree_fill (GtkCTree *tree);
+void e_summary_weather_fill_etable (ESummaryTable *est,
+ ESummary *summary);
const char *e_summary_weather_code_to_name (const char *code);
void e_summary_weather_free (ESummary *summary);
gboolean e_summary_weather_update (ESummary *summary);
diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c
index 2e70e74821..c4d53dac91 100644
--- a/my-evolution/e-summary.c
+++ b/my-evolution/e-summary.c
@@ -320,7 +320,7 @@ static char *
e_read_file_with_length (const char *filename,
size_t *length)
{
- int fd, ret;
+ int fd;
struct stat stat_buf;
char *buf;
size_t bytes_read, size;
@@ -459,7 +459,7 @@ e_summary_init (ESummary *summary)
priv = summary->priv;
- priv->frozen = FALSE;
+ priv->frozen = TRUE;
priv->redraw_pending = FALSE;
priv->pending_reload_tag = 0;
diff --git a/my-evolution/main.c b/my-evolution/main.c
index 04e3c925cd..da9df3c23a 100644
--- a/my-evolution/main.c
+++ b/my-evolution/main.c
@@ -72,6 +72,7 @@ main (int argc,
glade_gnome_init ();
+ e_cursors_init ();
gtk_widget_push_visual (gdk_rgb_get_visual ());
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
diff --git a/my-evolution/my-evolution.glade b/my-evolution/my-evolution.glade
index 21a3a42544..2fad405d58 100644
--- a/my-evolution/my-evolution.glade
+++ b/my-evolution/my-evolution.glade
@@ -47,302 +47,17 @@
<spacing>0</spacing>
<widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>8</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
+ <class>Custom</class>
+ <name>mail-custom</name>
+ <creation_function>e_summary_preferences_make_mail_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Tue, 29 Jan 2002 15:52:46 GMT</last_modification_time>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>All _folders:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist7</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <label>_Display folders:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist1</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <border_width>8</border_width>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>button4</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-mailadd</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label41</name>
- <label>_Add</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button5</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-mailremove</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label42</name>
- <label> _Remove</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label11</name>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist1</name>
- <width>100</width>
- <height>150</height>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label12</name>
- <label>label27</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <width>100</width>
- <height>150</height>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist7</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label40</name>
- <label>label40</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
</widget>
<widget>
@@ -381,314 +96,17 @@
<spacing>0</spacing>
<widget>
- <class>GtkTable</class>
- <name>table3</name>
- <border_width>8</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
+ <class>Custom</class>
+ <name>rdf-custom</name>
+ <creation_function>e_summary_preferences_make_rdf_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Tue, 29 Jan 2002 15:53:47 GMT</last_modification_time>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label19</name>
- <label>All news _feeds:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist6</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label20</name>
- <label>_Displayed feeds:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist5</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <border_width>8</border_width>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox7</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>button9</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-newsadd</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label43</name>
- <label>_Add</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button10</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox9</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-newsremove</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label47</name>
- <label> _Remove</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label21</name>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow5</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist5</name>
- <width>100</width>
- <height>150</height>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label22</name>
- <label>label27</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow6</name>
- <width>100</width>
- <height>150</height>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist6</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label23</name>
- <label>label26</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
</widget>
<widget>
@@ -877,302 +295,17 @@
<spacing>0</spacing>
<widget>
- <class>GtkTable</class>
- <name>table2</name>
- <border_width>8</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
+ <class>Custom</class>
+ <name>weather-custom</name>
+ <creation_function>e_summary_preferences_make_weather_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Tue, 29 Jan 2002 15:54:10 GMT</last_modification_time>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>Al_l stations:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>ctree1</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label15</name>
- <label>_Display stations:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>clist3</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <border_width>8</border_width>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>button6</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-weatheradd</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label45</name>
- <label>_Add</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button7</name>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-weatherremove</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label48</name>
- <label> _Remove</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label></label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow3</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist3</name>
- <width>100</width>
- <height>150</height>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label17</name>
- <label>label27</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow4</name>
- <width>100</width>
- <height>150</height>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCTree</class>
- <name>ctree1</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CTree:title</child_name>
- <name>label39</name>
- <label>label39</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
</widget>
<widget>