summaryrefslogtreecommitdiff
path: root/gladeui
diff options
context:
space:
mode:
authorVincent Geddes <vgeddes@src.gnome.org>2007-06-20 18:15:41 +0000
committerVincent Geddes <vgeddes@src.gnome.org>2007-06-20 18:15:41 +0000
commitf228d65a45f5e8ee066b576fb876021cd0241bf7 (patch)
tree6cbdd66e37387440cecd73495a6b077e8517cfea /gladeui
parent6fbff4c18912a2e81a98b0752bba5ba6af0cfe5f (diff)
downloadglade-f228d65a45f5e8ee066b576fb876021cd0241bf7.tar.gz
Set up documentation for GladeInspector.
* doc/gladeui-docs.sgml, doc/gladeui.types, doc/gladeui-sections.txt, doc/tmpl/glade-inspector.sgml: Set up documentation for GladeInspector. * po/POTFILES.in: Add glade-inspector.c * gladeui/glade-inspector.[ch]: Add convenience function `glade_inspector_new_with_project()'. svn path=/trunk/; revision=1374
Diffstat (limited to 'gladeui')
-rw-r--r--gladeui/glade-inspector.c32
-rw-r--r--gladeui/glade-inspector.h2
2 files changed, 27 insertions, 7 deletions
diff --git a/gladeui/glade-inspector.c b/gladeui/glade-inspector.c
index 8c38122b..5d271b66 100644
--- a/gladeui/glade-inspector.c
+++ b/gladeui/glade-inspector.c
@@ -153,7 +153,7 @@ glade_inspector_class_init (GladeInspectorClass *klass)
/**
* GladeInspector::selection-changed:
- * @inspector the #GladeInspector which received the signal.
+ * @inspector: the object which received the signal
*
* Emitted when the selection changes in the GladeInspector.
*/
@@ -169,7 +169,7 @@ glade_inspector_class_init (GladeInspectorClass *klass)
/**
* GladeInspector::item-activated:
- * @inspector the #GladeInspector which received the signal.
+ * @inspector: the object which received the signal
*
* Emitted when a item is activated in the GladeInspector.
*/
@@ -387,12 +387,10 @@ project_widget_name_changed_cb (GladeProject *project,
iter = glade_util_find_iter_by_widget (model, widget, WIDGET_COLUMN);
- if (iter != NULL)
+ if (iter)
{
path = gtk_tree_model_get_path (model, iter);
-
gtk_tree_model_row_changed (model, path, iter);
-
gtk_tree_iter_free (iter);
}
}
@@ -694,9 +692,10 @@ connect_project_signals (GladeInspector *inspector,
/**
* glade_inspector_set_project:
* @inspector: a #GladeInspector
- * @project: a #GladeProject or %NULL
+ * @project: a #GladeProject
*
- * Sets the project of @inspector to @project.
+ * Sets the current project of @inspector to @project. To unset the current
+ * project, pass %NULL for @project.
*/
void
glade_inspector_set_project (GladeInspector *inspector,
@@ -788,3 +787,22 @@ glade_inspector_new (void)
return g_object_new (GLADE_TYPE_INSPECTOR, NULL);
}
+/**
+ * glade_inspector_new_with_project:
+ * @project: a #GladeProject
+ *
+ * Creates a new #GladeInspector with @project
+ *
+ * Returns: a new #GladeInspector
+ */
+GtkWidget *
+glade_inspector_new_with_project (GladeProject *project)
+{
+ g_return_val_if_fail (GLADE_IS_PROJECT (project), NULL);
+
+ return g_object_new (GLADE_TYPE_INSPECTOR,
+ "project", project,
+ NULL);
+}
+
+
diff --git a/gladeui/glade-inspector.h b/gladeui/glade-inspector.h
index 843ca7c9..935e34d8 100644
--- a/gladeui/glade-inspector.h
+++ b/gladeui/glade-inspector.h
@@ -67,6 +67,8 @@ GType glade_inspector_get_type (void) G_GNUC_CONST;
GtkWidget *glade_inspector_new (void);
+GtkWidget *glade_inspector_new_with_project (GladeProject *project);
+
void glade_inspector_set_project (GladeInspector *inspector,
GladeProject *project);