The new selector widget

svn path=/trunk/; revision=15565
This commit is contained in:
Iain Holmes 2002-02-04 19:52:43 +00:00
parent 9af47c6d0f
commit e1268e37a4
13 changed files with 1053 additions and 1521 deletions

View File

@ -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

View File

@ -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 \

View File

@ -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;
/* 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);
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;
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 *

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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);

View File

@ -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;
}

View File

@ -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

View File

@ -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,13 +645,38 @@ e_summary_weather_code_to_name (const char *code)
}
}
void
e_summary_weather_ctree_fill (GtkCTree *tree)
static gboolean
is_weather_shown (ESummaryWeather *weather,
const char *code)
{
GtkCTreeNode *region, *state, *location, *pref_loc_root;
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_fill_etable (ESummaryTable *est,
ESummary *summary)
{
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");
@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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 ());

View File

@ -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>