aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodney Dawes <dobey@novell.com>2004-06-23 05:25:59 +0800
committerRodney Dawes <dobey@src.gnome.org>2004-06-23 05:25:59 +0800
commitcc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb (patch)
tree90babdc9769c8cc590d378819dc037e3a0112e89
parentecb35cecb1d7690c69607d8fa738d452b3ffded0 (diff)
downloadgsoc2013-evolution-cc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb.tar
gsoc2013-evolution-cc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb.tar.gz
gsoc2013-evolution-cc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb.tar.bz2
gsoc2013-evolution-cc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb.tar.lz
gsoc2013-evolution-cc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb.tar.xz
gsoc2013-evolution-cc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb.tar.zst
gsoc2013-evolution-cc7c47284a2554f4e46d6cd4d182f5daa4ee1eeb.zip
Fix some spacing and border width properties on the dialog's widgets to
2004-06-22 Rodney Dawes <dobey@novell.com> * e-table-config.c (do_fields_config_dialog, e_table_config_new): Fix some spacing and border width properties on the dialog's widgets to make the dialog compliant with the HIG 2004-06-22 Christopher James Lahey <clahey@ximian.com> * e-table-model.[ch]: Added e_table_model_freeze and e_table_model_thaw * e-table-config.c (setup_fields): Use e_table_model_freeze and e_table_model_thaw Fixes #54785 svn path=/trunk/; revision=26460
-rw-r--r--widgets/table/e-table-config.c12
-rw-r--r--widgets/table/e-table-model.c37
-rw-r--r--widgets/table/e-table-model.h3
3 files changed, 52 insertions, 0 deletions
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index cc3af93cd9..884bae4ebb 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -365,6 +365,8 @@ setup_fields (ETableConfig *config)
{
int i;
+ e_table_model_freeze (config->available_model);
+ e_table_model_freeze (config->shown_model);
e_table_without_show_all (config->available_model);
e_table_subset_variable_clear (config->shown_model);
@@ -379,6 +381,8 @@ setup_fields (ETableConfig *config)
e_table_without_hide (config->available_model, GINT_TO_POINTER(idx));
}
}
+ e_table_model_thaw (config->available_model);
+ e_table_model_thaw (config->shown_model);
}
static void
@@ -474,6 +478,10 @@ do_fields_config_dialog (ETableConfig *config)
{
int response, running = 1;
+ gtk_widget_ensure_style (config->dialog_show_fields);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (config->dialog_show_fields)->vbox), 0);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (config->dialog_show_fields)->action_area), 12);
+
config->temp_state = e_table_state_duplicate (config->state);
setup_fields (config);
@@ -1189,6 +1197,10 @@ e_table_config_new (const char *header,
return NULL;
}
+ gtk_widget_ensure_style (config->dialog_toplevel);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (config->dialog_toplevel)->vbox), 0);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (config->dialog_toplevel)->action_area), 12);
+
gtk_dialog_set_response_sensitive (GTK_DIALOG (config->dialog_toplevel),
GTK_RESPONSE_APPLY, FALSE);
gtk_widget_show (config->dialog_toplevel);
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index dddcace5be..67c443c8c6 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -28,6 +28,7 @@
#include "gal/util/e-marshal.h"
#define ETM_CLASS(e) (E_TABLE_MODEL_GET_CLASS (e))
+#define ETM_FROZEN(e) (GPOINTER_TO_INT (g_object_get_data (G_OBJECT(e), "frozen")) != 0)
#define d(x)
@@ -386,6 +387,9 @@ e_table_model_pre_change (ETableModel *e_table_model)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+
+ if (ETM_FROZEN (e_table_model))
+ return;
d(print_tabs());
d(g_print("Emitting pre_change on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
@@ -414,6 +418,9 @@ e_table_model_no_change (ETableModel *e_table_model)
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+ if (ETM_FROZEN (e_table_model))
+ return;
+
d(print_tabs());
d(g_print("Emitting model_no_change on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
@@ -441,6 +448,9 @@ e_table_model_changed (ETableModel *e_table_model)
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+ if (ETM_FROZEN (e_table_model))
+ return;
+
d(print_tabs());
d(g_print("Emitting model_changed on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
@@ -465,6 +475,9 @@ e_table_model_row_changed (ETableModel *e_table_model, int row)
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+ if (ETM_FROZEN (e_table_model))
+ return;
+
d(print_tabs());
d(g_print("Emitting row_changed on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
@@ -490,6 +503,9 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row)
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+ if (ETM_FROZEN (e_table_model))
+ return;
+
d(print_tabs());
d(g_print("Emitting cell_changed on model 0x%p, a %s, row %d, col %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row, col));
d(depth++);
@@ -515,6 +531,9 @@ e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count)
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+ if (ETM_FROZEN (e_table_model))
+ return;
+
d(print_tabs());
d(g_print("Emitting row_inserted on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
@@ -555,6 +574,9 @@ e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count)
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
+ if (ETM_FROZEN (e_table_model))
+ return;
+
d(print_tabs());
d(g_print("Emitting row_deleted on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
@@ -577,3 +599,18 @@ e_table_model_row_deleted (ETableModel *e_table_model, int row)
{
e_table_model_rows_deleted(e_table_model, row, 1);
}
+
+void
+e_table_model_freeze (ETableModel *e_table_model)
+{
+ e_table_model_pre_change (e_table_model);
+ g_object_set_data (G_OBJECT (e_table_model), "frozen", GINT_TO_POINTER (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (e_table_model), "frozen")) + 1));
+}
+
+void
+e_table_model_thaw (ETableModel *e_table_model)
+{
+ g_object_set_data (G_OBJECT (e_table_model), "frozen", GINT_TO_POINTER (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (e_table_model), "frozen")) - 1));
+ e_table_model_changed (e_table_model);
+}
+
diff --git a/widgets/table/e-table-model.h b/widgets/table/e-table-model.h
index 6244fa2e7a..a08d9712ad 100644
--- a/widgets/table/e-table-model.h
+++ b/widgets/table/e-table-model.h
@@ -165,6 +165,9 @@ int row);
void e_table_model_row_deleted (ETableModel *e_table_model,
int row);
+void e_table_model_freeze (ETableModel *e_table_model);
+void e_table_model_thaw (ETableModel *e_table_model);
+
G_END_DECLS
#endif /* _E_TABLE_MODEL_H_ */