aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-header.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-21 00:57:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-21 00:57:56 +0800
commit292aea67a7f3f1d194ef60214d482881f54ab083 (patch)
tree268d5e8e59a0354f744189f5849fa0bfd3d2f4c3 /composer/e-composer-header.c
parent432c803741d14c6f5f5316544248d23f85c595c4 (diff)
parenta1f287ca6bf35d27e5dcb9b89a10f76e9abbd057 (diff)
downloadgsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar
gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.gz
gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.bz2
gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.lz
gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.xz
gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.tar.zst
gsoc2013-evolution-292aea67a7f3f1d194ef60214d482881f54ab083.zip
Merge branch '274117-compoer-view-fields'
Diffstat (limited to 'composer/e-composer-header.c')
-rw-r--r--composer/e-composer-header.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index 8cbcf64f1f..272556969d 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -41,6 +41,9 @@ enum {
struct _EComposerHeaderPrivate {
gchar *label;
gboolean button;
+
+ guint sensitive : 1;
+ guint visible : 1;
};
static gpointer parent_class;
@@ -302,15 +305,9 @@ e_composer_header_get_label (EComposerHeader *header)
gboolean
e_composer_header_get_sensitive (EComposerHeader *header)
{
- gboolean sensitive;
-
g_return_val_if_fail (E_IS_COMPOSER_HEADER (header), FALSE);
- sensitive = GTK_WIDGET_SENSITIVE (header->title_widget);
- if (GTK_WIDGET_SENSITIVE (header->input_widget) != sensitive)
- g_warning ("%s: Sensitivity is out of sync", G_STRFUNC);
-
- return sensitive;
+ return header->priv->sensitive;
}
void
@@ -319,8 +316,7 @@ e_composer_header_set_sensitive (EComposerHeader *header,
{
g_return_if_fail (E_IS_COMPOSER_HEADER (header));
- gtk_widget_set_sensitive (header->title_widget, sensitive);
- gtk_widget_set_sensitive (header->input_widget, sensitive);
+ header->priv->sensitive = sensitive;
g_object_notify (G_OBJECT (header), "sensitive");
}
@@ -328,15 +324,9 @@ e_composer_header_set_sensitive (EComposerHeader *header,
gboolean
e_composer_header_get_visible (EComposerHeader *header)
{
- gboolean visible;
-
g_return_val_if_fail (E_IS_COMPOSER_HEADER (header), FALSE);
- visible = GTK_WIDGET_VISIBLE (header->title_widget);
- if (GTK_WIDGET_VISIBLE (header->input_widget) != visible)
- g_warning ("%s: Visibility is out of sync", G_STRFUNC);
-
- return visible;
+ return header->priv->visible;
}
void
@@ -345,13 +335,7 @@ e_composer_header_set_visible (EComposerHeader *header,
{
g_return_if_fail (E_IS_COMPOSER_HEADER (header));
- if (visible) {
- gtk_widget_show (header->title_widget);
- gtk_widget_show (header->input_widget);
- } else {
- gtk_widget_hide (header->title_widget);
- gtk_widget_hide (header->input_widget);
- }
+ header->priv->visible = visible;
g_object_notify (G_OBJECT (header), "visible");
}