gtkhtml r8894 - trunk/components/editor
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r8894 - trunk/components/editor
- Date: Mon, 14 Jul 2008 14:29:17 +0000 (UTC)
Author: mbarnes
Date: Mon Jul 14 14:29:17 2008
New Revision: 8894
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8894&view=rev
Log:
2008-07-14 Matthew Barnes <mbarnes redhat com>
* components/editor/gtkhtml-editor.c (gtkhtml_editor_get_action),
(gtkhtml_editor_get_action_group), (gtkhtml_editor_get_widget),
(gtkhtml_editor_get_managed_widget):
Use gtkhtml_editor_get_ui_manager() to get the UI manager.
Replace assertions with g_return_val_if_fail().
Modified:
trunk/components/editor/ChangeLog
trunk/components/editor/gtkhtml-editor.c
Modified: trunk/components/editor/gtkhtml-editor.c
==============================================================================
--- trunk/components/editor/gtkhtml-editor.c (original)
+++ trunk/components/editor/gtkhtml-editor.c Mon Jul 14 14:29:17 2008
@@ -920,13 +920,16 @@
gtkhtml_editor_get_action (GtkhtmlEditor *editor,
const gchar *action_name)
{
+ GtkUIManager *manager;
GtkAction *action = NULL;
GList *iter;
g_return_val_if_fail (GTKHTML_IS_EDITOR (editor), NULL);
g_return_val_if_fail (action_name != NULL, NULL);
- iter = gtk_ui_manager_get_action_groups (editor->priv->manager);
+ manager = gtkhtml_editor_get_ui_manager (editor);
+ iter = gtk_ui_manager_get_action_groups (manager);
+
while (iter != NULL && action == NULL) {
GtkActionGroup *action_group = iter->data;
@@ -934,7 +937,8 @@
action_group, action_name);
iter = g_list_next (iter);
}
- g_assert (action != NULL);
+
+ g_return_val_if_fail (action != NULL, NULL);
return action;
}
@@ -943,12 +947,15 @@
gtkhtml_editor_get_action_group (GtkhtmlEditor *editor,
const gchar *group_name)
{
+ GtkUIManager *manager;
GList *iter;
g_return_val_if_fail (GTKHTML_IS_EDITOR (editor), NULL);
g_return_val_if_fail (group_name != NULL, NULL);
- iter = gtk_ui_manager_get_action_groups (editor->priv->manager);
+ manager = gtkhtml_editor_get_ui_manager (editor);
+ iter = gtk_ui_manager_get_action_groups (manager);
+
while (iter != NULL) {
GtkActionGroup *action_group = iter->data;
const gchar *name;
@@ -973,7 +980,7 @@
g_return_val_if_fail (widget_name != NULL, NULL);
widget = glade_xml_get_widget (editor->priv->glade_xml, widget_name);
- g_assert (widget != NULL);
+ g_return_val_if_fail (widget != NULL, NULL);
return widget;
}
@@ -990,7 +997,8 @@
manager = gtkhtml_editor_get_ui_manager (editor);
widget = gtk_ui_manager_get_widget (manager, widget_path);
- g_assert (widget != NULL);
+
+ g_return_val_if_fail (widget != NULL, NULL);
return widget;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]