Commit 9e844847 authored by Tristan Van Berkom's avatar Tristan Van Berkom

Fixed bold modified state for disabled properties.


	* gladeui/glade-property.c: Fixed bold modified state for 
	disabled properties.

	* plugins/gtk+/gtk+.xml.in: Made default width/height match
	the default-width default-height set for each dialog as reasonable
	default values.


svn path=/trunk/; revision=1794
parent 072bcf8a
2008-04-10 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-property.c: Fixed bold modified state for
disabled properties.
* plugins/gtk+/gtk+.xml.in: Made default width/height match
the default-width default-height set for each dialog as reasonable
default values.
2008-04-10 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-palette-item.c, gladeui/glade-palette.c,
......
......@@ -160,7 +160,7 @@ glade_editor_property_fix_label (GladeEditorProperty *eprop)
if (!eprop->property)
return;
/* refresh label */
switch (eprop->property->state)
{
......@@ -215,7 +215,7 @@ glade_editor_property_enabled_cb (GladeProperty *property,
{
enabled = glade_property_get_enabled (property);
/* sensitive = enabled && */
/* sensitive = enabled && sensitive */
if (enabled == FALSE)
gtk_widget_set_sensitive (eprop->input, FALSE);
else if (glade_property_get_sensitive (property))
......
......@@ -355,8 +355,6 @@ glade_editor_update_class_field (GladeEditor *editor)
static GtkWidget *
glade_editor_setup_class_field (GladeEditor *editor)
{
PangoAttrList *attr_list = pango_attr_list_new ();
PangoAttribute *attr_weight = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
GtkWidget *hbox;
hbox = gtk_hbox_new (FALSE, 4);
......@@ -369,9 +367,6 @@ glade_editor_setup_class_field (GladeEditor *editor)
gtk_widget_set_no_show_all (editor->warning, TRUE);
gtk_widget_set_no_show_all (editor->class_icon, TRUE);
pango_attr_list_insert (attr_list, attr_weight);
gtk_label_set_attributes (GTK_LABEL (editor->class_label), attr_list);
pango_attr_list_unref (attr_list);
gtk_misc_set_alignment (GTK_MISC (editor->class_label), 0.0, 0.5);
gtk_label_set_ellipsize (GTK_LABEL (editor->class_label),
PANGO_ELLIPSIZE_END);
......
......@@ -220,19 +220,23 @@ glade_property_fix_state (GladeProperty *property)
property->state = GLADE_STATE_NORMAL;
else if (property->support_warning)
{
if (property->enabled &&
glade_property_default (property))
property->state = GLADE_STATE_UNSUPPORTED;
else
property->state = GLADE_STATE_UNSUPPORTED_CHANGED;
if (property->enabled)
{
if (glade_property_original_default (property))
property->state = GLADE_STATE_UNSUPPORTED;
else
property->state = GLADE_STATE_UNSUPPORTED_CHANGED;
}
}
else
{
if (property->enabled &&
glade_property_default (property))
property->state = GLADE_STATE_NORMAL;
else
property->state = GLADE_STATE_CHANGED;
if (property->enabled)
{
if (glade_property_original_default (property))
property->state = GLADE_STATE_NORMAL;
else
property->state = GLADE_STATE_CHANGED;
}
}
g_object_notify (G_OBJECT (property), "state");
......@@ -1396,6 +1400,8 @@ glade_property_set_enabled (GladeProperty *property,
if (enabled)
glade_property_sync (property);
glade_property_fix_state (property);
g_object_notify (G_OBJECT (property), "enabled");
}
......
......@@ -60,7 +60,7 @@ struct _GladeProperty
gboolean enabled; /* Enabled is a flag that is used for GladeProperties
* that have the optional flag set to let us know
* if this widget has this GladeSetting enabled or
* if this widget has this setting enabled or
* not. (Like default size, it can be specified or
* unspecified). This flag also sets the state
* of the property->input state for the loaded
......
......@@ -287,8 +287,8 @@ embedded in another object</_tooltip>
</displayable-values>
</property>
<property id="modal" ignore="True"/>
<property id="default-width" default="0" optional="True" optional-default="False"/>
<property id="default-height" default="0" optional="True" optional-default="False"/>
<property id="default-width" default="440" optional="True" optional-default="False"/>
<property id="default-height" default="250" optional="True" optional-default="False"/>
<property id="type-hint" ignore="True">
<displayable-values>
<value id="GDK_WINDOW_TYPE_HINT_NORMAL" _name="Normal"/>
......@@ -1016,8 +1016,8 @@ embedded in another object</_tooltip>
<get-children-function>glade_gtk_dialog_get_children</get-children-function>
<set-property-function>glade_gtk_dialog_set_property</set-property-function>
<properties>
<property id="default-width" default="0" optional="True" optional-default="False"/>
<property id="default-height" default="0" optional="True" optional-default="False"/>
<property id="default-width" default="320" optional="True" optional-default="False"/>
<property id="default-height" default="260" optional="True" optional-default="False"/>
<property id="has-separator" default="False"/>
<property id="type-hint" save-always="True"/>
</properties>
......@@ -1479,8 +1479,8 @@ embedded in another object</_tooltip>
<glade-widget-class name="GtkMessageDialog" generic-name="messagedialog" _title="Message Dialog" default-width="400" default-height="115">
<properties>
<property id="default-width" default="0" optional="True" optional-default="False"/>
<property id="default-height" default="0" optional="True" optional-default="False"/>
<property id="default-width" default="400" optional="True" optional-default="False"/>
<property id="default-height" default="115" optional="True" optional-default="False"/>
<property common="True" id="sensitive"/>
<property common="True" id="can-default"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment