PROP_TO_EDITABLE,
PROP_CC,
PROP_CC_EDITABLE,
+ PROP_CC_VISIBLE,
PROP_BCC,
PROP_BCC_EDITABLE,
+ PROP_BCC_VISIBLE,
PROP_SUBJECT,
PROP_SUBJECT_EDITABLE,
PROP_BODY,
GtkWidget *from;
GtkWidget *to;
GtkWidget *cc;
+ GtkWidget *cc_lbl;
GtkWidget *bcc;
+ GtkWidget *bcc_lbl;
GtkWidget *subject;
GtkWidget *body;
};
TRUE,
G_PARAM_READWRITE));
+ g_object_class_install_property (object_class, PROP_CC_VISIBLE,
+ g_param_spec_boolean ("cc-visible",
+ "Cc field visible",
+ "Cc field visible",
+ TRUE,
+ G_PARAM_READWRITE));
+
g_object_class_install_property (object_class, PROP_BCC,
g_param_spec_string ("bcc",
"Bcc",
TRUE,
G_PARAM_READWRITE));
+ g_object_class_install_property (object_class, PROP_BCC_VISIBLE,
+ g_param_spec_boolean ("bcc-visible",
+ "Bcc field visible",
+ "Bcc field visible",
+ TRUE,
+ G_PARAM_READWRITE));
+
g_object_class_install_property (object_class, PROP_SUBJECT,
g_param_spec_string ("subject",
"Subject",
priv->from = GTK_WIDGET (gtk_builder_get_object (builder, "entry3"));
priv->to = GTK_WIDGET (gtk_builder_get_object (builder, "entry4"));
priv->cc = GTK_WIDGET (gtk_builder_get_object (builder, "entry6"));
+ priv->cc_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label11"));
priv->bcc = GTK_WIDGET (gtk_builder_get_object (builder, "entry7"));
+ priv->bcc_lbl = GTK_WIDGET (gtk_builder_get_object (builder, "label12"));
priv->subject = GTK_WIDGET (gtk_builder_get_object (builder, "entry5"));
priv->body = GTK_WIDGET (gtk_builder_get_object (builder, "textview1"));
gtk_entry_set_editable (GTK_ENTRY (priv->cc), g_value_get_boolean (value));
break;
+ case PROP_CC_VISIBLE:
+ gtk_widget_set_visible (priv->cc, g_value_get_boolean (value));
+ gtk_widget_set_visible (priv->cc_lbl, g_value_get_boolean (value));
+ if (g_value_get_boolean (value))
+ {
+ gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 2, 5);
+ }
+ else
+ {
+ gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 2, 0);
+ }
+ break;
+
case PROP_BCC:
gtk_entry_set_text (GTK_ENTRY (priv->bcc), g_strstrip (g_value_dup_string (value)));
break;
gtk_entry_set_editable (GTK_ENTRY (priv->bcc), g_value_get_boolean (value));
break;
+ case PROP_BCC_VISIBLE:
+ gtk_widget_set_visible (priv->bcc, g_value_get_boolean (value));
+ gtk_widget_set_visible (priv->bcc_lbl, g_value_get_boolean (value));
+ if (g_value_get_boolean (value))
+ {
+ gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 3, 5);
+ }
+ else
+ {
+ gtk_table_set_row_spacing (GTK_TABLE (priv->widget), 3, 0);
+ }
+ break;
+
case PROP_SUBJECT:
gtk_entry_set_text (GTK_ENTRY (priv->subject), g_strstrip (g_value_dup_string (value)));
break;
g_value_set_boolean (value, gtk_editable_get_editable (GTK_EDITABLE (priv->cc)));
break;
+ case PROP_CC_VISIBLE:
+ g_value_set_boolean (value, gtk_widget_get_visible (priv->cc));
+ break;
+
case PROP_BCC:
g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (priv->bcc)));
break;
g_value_set_boolean (value, gtk_editable_get_editable (GTK_EDITABLE (priv->bcc)));
break;
+ case PROP_BCC_VISIBLE:
+ g_value_set_boolean (value, gtk_widget_get_visible (priv->bcc));
+ break;
+
case PROP_SUBJECT:
g_value_set_string (value, gtk_entry_get_text (GTK_ENTRY (priv->subject)));
break;