gtk+ r20008 - in trunk: . docs/reference/gtk/tmpl gtk
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20008 - in trunk: . docs/reference/gtk/tmpl gtk
- Date: Wed, 16 Apr 2008 17:35:18 +0100 (BST)
Author: tvb
Date: Wed Apr 16 17:35:17 2008
New Revision: 20008
URL: http://svn.gnome.org/viewvc/gtk+?rev=20008&view=rev
Log:
* gtk/gtkwindow.c: Chain up in buildable_finish()
* gtk/gtkbuilder.c: _gtk_builder_get_absolute_filename() handle
cases where g_path_get_dirname() returns "."
* docs/reference/gtk/tmpl/gtklabel.sgml,
docs/reference/gtk/tmpl/gtkbuilder.sgml: Added documentation
for the <attributes> tags on GtkLabel
Modified:
trunk/ChangeLog
trunk/docs/reference/gtk/tmpl/gtkbuilder.sgml
trunk/docs/reference/gtk/tmpl/gtklabel.sgml
trunk/gtk/gtkbuilder.c
trunk/gtk/gtkwindow.c
Modified: trunk/docs/reference/gtk/tmpl/gtkbuilder.sgml
==============================================================================
--- trunk/docs/reference/gtk/tmpl/gtkbuilder.sgml (original)
+++ trunk/docs/reference/gtk/tmpl/gtkbuilder.sgml Wed Apr 16 17:35:17 2008
@@ -203,6 +203,7 @@
These XML fragments are explained in the documentation of the
respective objects, see
<link linkend="GtkWidget-BUILDER-UI">GtkWidget</link>,
+<link linkend="GtkLabel-BUILDER-UI">GtkLabel</link>,
<link linkend="GtkContainer-BUILDER-UI">GtkContainer</link>,
<link linkend="GtkDialog-BUILDER-UI">GtkDialog</link>,
<link linkend="GtkCellLayout-BUILDER-UI">GtkCellLayout</link>,
Modified: trunk/docs/reference/gtk/tmpl/gtklabel.sgml
==============================================================================
--- trunk/docs/reference/gtk/tmpl/gtklabel.sgml (original)
+++ trunk/docs/reference/gtk/tmpl/gtklabel.sgml Wed Apr 16 17:35:17 2008
@@ -11,6 +11,27 @@
#GtkButton, a #GtkMenuItem, or a #GtkOptionMenu.
</para>
+<refsect2 id="GtkLabel-BUILDER-UI">
+<title>GtkLabel as GtkBuildable</title>
+<para>
+The GtkLabel implementation of the GtkBuildable interface supports a
+custom <attributes> element, which supports any number of <attribute>
+elements. the <attribute> element has attributes named name, value,
+start and end and allows you to specify #PangoAttributs for this label.
+</para>
+<example>
+<title>A UI definition fragment specifying pango attributes</title>
+<programlisting><![CDATA[
+<object class="GtkLabel">
+ <attributes>
+ <attribute name=\"weight\" value=\"PANGO_WEIGHT_BOLD\"/>
+ </attributes>
+</object>
+]]></programlisting>
+</example>
+</refsect2>
+
+
<refsect2>
<title>Mnemonics</title>
Modified: trunk/gtk/gtkbuilder.c
==============================================================================
--- trunk/gtk/gtkbuilder.c (original)
+++ trunk/gtk/gtkbuilder.c Wed Apr 16 17:35:17 2008
@@ -1460,8 +1460,16 @@
return g_strdup (string);
if (builder->priv->filename &&
- strcmp (builder->priv->filename, ".") != 0)
- dirname = g_path_get_dirname (builder->priv->filename);
+ strcmp (builder->priv->filename, ".") != 0)
+ {
+ dirname = g_path_get_dirname (builder->priv->filename);
+
+ if (strcmp (dirname, ".") == 0)
+ {
+ g_free (dirname);
+ dirname = g_get_current_dir ();
+ }
+ }
else
dirname = g_get_current_dir ();
Modified: trunk/gtk/gtkwindow.c
==============================================================================
--- trunk/gtk/gtkwindow.c (original)
+++ trunk/gtk/gtkwindow.c Wed Apr 16 17:35:17 2008
@@ -1162,6 +1162,8 @@
if (priv->builder_visible)
gtk_widget_show (GTK_WIDGET (buildable));
+
+ parent_buildable_iface->parser_finished (buildable, builder);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]