aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-04 21:08:32 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-04 21:08:32 +0800
commitc3e0648d8b5a1d73f82f0a7691b9ab1320248392 (patch)
tree677c9472380b3119d08f42eb48c001d18bfd6243 /widgets
parent5395bd3308e25f3ca2ac1b35460ba6df1d294f4b (diff)
parentfb970ccf14e33d92cfb9409d44f7b06355e958fc (diff)
downloadgsoc2013-evolution-c3e0648d8b5a1d73f82f0a7691b9ab1320248392.tar
gsoc2013-evolution-c3e0648d8b5a1d73f82f0a7691b9ab1320248392.tar.gz
gsoc2013-evolution-c3e0648d8b5a1d73f82f0a7691b9ab1320248392.tar.bz2
gsoc2013-evolution-c3e0648d8b5a1d73f82f0a7691b9ab1320248392.tar.lz
gsoc2013-evolution-c3e0648d8b5a1d73f82f0a7691b9ab1320248392.tar.xz
gsoc2013-evolution-c3e0648d8b5a1d73f82f0a7691b9ab1320248392.tar.zst
gsoc2013-evolution-c3e0648d8b5a1d73f82f0a7691b9ab1320248392.zip
Merge branch 'master' into kill-bonobo
Conflicts: addressbook/gui/Makefile.am addressbook/gui/widgets/Makefile.am addressbook/gui/widgets/eab-popup-control.c calendar/gui/e-meeting-time-sel.c calendar/gui/migration.c calendar/modules/e-memo-shell-module-migrate.h e-util/e-logger.c mail/e-mail-attachment-bar.c mail/em-composer-utils.c mail/em-format-html-display.c plugins/mail-account-disable/Makefile.am plugins/select-one-source/Makefile.am po/es.po shell/Makefile.am shell/e-shell-common.h shell/e-shell-nm.c shell/e-shell-window-commands.c shell/e-shell-window.c shell/e-sidebar.c shell/e-user-creatable-items-handler.c shell/importer/Makefile.am shell/test/Makefile.am widgets/misc/test-error.c widgets/misc/test-info-label.c widgets/misc/test-multi-config-dialog.c
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-table-search.c2
-rw-r--r--widgets/table/e-tree-model.c30
-rw-r--r--widgets/table/e-tree-model.h2
-rw-r--r--widgets/table/e-tree-table-adapter.c27
-rw-r--r--widgets/text/e-text.c2
5 files changed, 61 insertions, 2 deletions
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 7a51b62f1c..307d28de39 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -100,7 +100,7 @@ static void
add_timeout (ETableSearch *ets)
{
drop_timeout (ets);
- ets->priv->timeout_id = g_timeout_add (1000, ets_accept, ets);
+ ets->priv->timeout_id = g_timeout_add_seconds (1, ets_accept, ets);
}
static void
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 10c7afeb54..b2e2d99a75 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -53,6 +53,7 @@ enum {
NODE_REMOVED,
NODE_DELETED,
NODE_REQUEST_COLLAPSE,
+ REBUILT,
LAST_SIGNAL
};
@@ -82,6 +83,15 @@ e_tree_model_class_init (ETreeModelClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ e_tree_model_signals [REBUILT] =
+ g_signal_new ("rebuilt",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, rebuilt),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
e_tree_model_signals [NODE_CHANGED] =
g_signal_new ("node_changed",
G_TYPE_FROM_CLASS (object_class),
@@ -183,6 +193,7 @@ e_tree_model_class_init (ETreeModelClass *klass)
klass->pre_change = NULL;
klass->no_change = NULL;
+ klass->rebuilt = NULL;
klass->node_changed = NULL;
klass->node_data_changed = NULL;
klass->node_col_changed = NULL;
@@ -241,6 +252,25 @@ e_tree_model_no_change (ETreeModel *tree_model)
}
/**
+ * e_tree_model_rebuilt:
+ * @tree_model:
+ * @node:
+ *
+ *
+ *
+ * Return value:
+ **/
+void
+e_tree_model_rebuilt (ETreeModel *tree_model)
+{
+ g_return_if_fail (tree_model != NULL);
+ g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+
+ d(g_print("Emitting rebuilt on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+
+ g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [REBUILT], 0);
+}
+/**
* e_tree_model_node_changed:
* @tree_model:
* @node:
diff --git a/widgets/table/e-tree-model.h b/widgets/table/e-tree-model.h
index a318bd7df0..96828a8e0a 100644
--- a/widgets/table/e-tree-model.h
+++ b/widgets/table/e-tree-model.h
@@ -112,6 +112,7 @@ struct ETreeModelClass {
void (*node_inserted) (ETreeModel *etm, ETreePath parent, ETreePath inserted_node);
void (*node_removed) (ETreeModel *etm, ETreePath parent, ETreePath removed_node, int old_position);
void (*node_deleted) (ETreeModel *etm, ETreePath deleted_node);
+ void (*rebuilt) (ETreeModel *etm);
/* This signal requests that any viewers of the tree that
* collapse and expand nodes collapse this node.
@@ -206,6 +207,7 @@ ETreePath e_tree_model_node_find (ETreeModel *model,
*/
void e_tree_model_pre_change (ETreeModel *tree_model);
void e_tree_model_no_change (ETreeModel *tree_model);
+void e_tree_model_rebuilt (ETreeModel *tree_model);
void e_tree_model_node_changed (ETreeModel *tree_model,
ETreePath node);
void e_tree_model_node_data_changed (ETreeModel *tree_model,
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 7e63a64783..10c29fbf10 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -72,6 +72,7 @@ struct ETreeTableAdapterPriv {
int pre_change_id;
int no_change_id;
+ int rebuilt_id;
int node_changed_id;
int node_data_changed_id;
int node_col_changed_id;
@@ -543,6 +544,8 @@ etta_dispose (GObject *object)
g_signal_handler_disconnect (G_OBJECT (etta->priv->source),
etta->priv->no_change_id);
g_signal_handler_disconnect (G_OBJECT (etta->priv->source),
+ etta->priv->rebuilt_id);
+ g_signal_handler_disconnect (G_OBJECT (etta->priv->source),
etta->priv->node_changed_id);
g_signal_handler_disconnect (G_OBJECT (etta->priv->source),
etta->priv->node_data_changed_id);
@@ -730,6 +733,7 @@ etta_init (ETreeTableAdapter *etta)
etta->priv->pre_change_id = 0;
etta->priv->no_change_id = 0;
+ etta->priv->rebuilt_id = 0;
etta->priv->node_changed_id = 0;
etta->priv->node_data_changed_id = 0;
etta->priv->node_col_changed_id = 0;
@@ -754,6 +758,27 @@ etta_proxy_no_change (ETreeModel *etm, ETreeTableAdapter *etta)
}
static gboolean
+remove_all (gpointer key, gpointer value, gpointer data)
+{
+ GNode *gn = (GNode *) data;
+ if (data)
+ g_free (gn->data);
+
+ return TRUE;
+}
+
+static void
+etta_proxy_rebuilt (ETreeModel *etm, ETreeTableAdapter *etta)
+{
+ if (!etta->priv->root)
+ return;
+ kill_gnode (etta->priv->root, etta);
+ etta->priv->root = NULL;
+ g_hash_table_destroy (etta->priv->nodes);
+ etta->priv->nodes = g_hash_table_new(NULL, NULL);
+}
+
+static gboolean
resort_model (ETreeTableAdapter *etta)
{
etta_sort_info_changed (NULL, etta);
@@ -866,6 +891,8 @@ e_tree_table_adapter_construct (ETreeTableAdapter *etta, ETreeModel *source, ETa
G_CALLBACK (etta_proxy_pre_change), etta);
etta->priv->no_change_id = g_signal_connect (G_OBJECT (source), "no_change",
G_CALLBACK (etta_proxy_no_change), etta);
+ etta->priv->rebuilt_id = g_signal_connect (G_OBJECT (source), "rebuilt",
+ G_CALLBACK (etta_proxy_rebuilt), etta);
etta->priv->node_changed_id = g_signal_connect (G_OBJECT (source), "node_changed",
G_CALLBACK (etta_proxy_node_changed), etta);
etta->priv->node_data_changed_id = g_signal_connect (G_OBJECT (source), "node_data_changed",
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index f15317b01e..0890b46243 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -2460,7 +2460,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
{
if ( text->tooltip_count == 0 && text->clip) {
if (!text->tooltip_timeout)
- text->tooltip_timeout = g_timeout_add (2000, _do_tooltip, text);
+ text->tooltip_timeout = g_timeout_add_seconds (2, _do_tooltip, text);
}
text->tooltip_count ++;
}