summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-05-04 03:16:28 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-05-04 03:16:28 +0000
commit00dd821a5a738981b20662bc2a0a0f26f32b94e9 (patch)
tree89361c4c8d2114dbf8312079123269311868ac65
parent2c5634dad18a75ffc16b0653b662193d48b7de3c (diff)
downloadgtk+-00dd821a5a738981b20662bc2a0a0f26f32b94e9.tar.gz
Avoid getting the interface struct twice in the same function. (#300513,
2005-05-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilesystem.c: * gtk/gtkcelleditable.c: * gtk/gtktreemodel.c: Avoid getting the interface struct twice in the same function. (#300513, Billy Biggs)
-rw-r--r--ChangeLog2
-rw-r--r--ChangeLog.pre-2-102
-rw-r--r--ChangeLog.pre-2-82
-rw-r--r--gtk/gtkcelleditable.c1
-rw-r--r--gtk/gtkfilesystem.c18
5 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 78f1b1511a..d53f0fd6d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2005-05-03 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkfilesystem.c:
+ * gtk/gtkcelleditable.c:
* gtk/gtktreemodel.c: Avoid getting the interface struct
twice in the same function. (#300513, Billy Biggs)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 78f1b1511a..d53f0fd6d5 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,7 @@
2005-05-03 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkfilesystem.c:
+ * gtk/gtkcelleditable.c:
* gtk/gtktreemodel.c: Avoid getting the interface struct
twice in the same function. (#300513, Billy Biggs)
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 78f1b1511a..d53f0fd6d5 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,5 +1,7 @@
2005-05-03 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkfilesystem.c:
+ * gtk/gtkcelleditable.c:
* gtk/gtktreemodel.c: Avoid getting the interface struct
twice in the same function. (#300513, Billy Biggs)
diff --git a/gtk/gtkcelleditable.c b/gtk/gtkcelleditable.c
index 8df3351355..f186123405 100644
--- a/gtk/gtkcelleditable.c
+++ b/gtk/gtkcelleditable.c
@@ -94,7 +94,6 @@ gtk_cell_editable_start_editing (GtkCellEditable *cell_editable,
GdkEvent *event)
{
g_return_if_fail (GTK_IS_CELL_EDITABLE (cell_editable));
- g_return_if_fail (GTK_CELL_EDITABLE_GET_IFACE (cell_editable)->start_editing != NULL);
(* GTK_CELL_EDITABLE_GET_IFACE (cell_editable)->start_editing) (cell_editable, event);
}
diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c
index 93152407de..fa0560bcbd 100644
--- a/gtk/gtkfilesystem.c
+++ b/gtk/gtkfilesystem.c
@@ -790,9 +790,9 @@ gtk_file_system_get_bookmark_label (GtkFileSystem *file_system,
g_return_val_if_fail (GTK_IS_FILE_SYSTEM (file_system), NULL);
g_return_val_if_fail (path != NULL, FALSE);
- if (GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_bookmark_label)
- return GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_bookmark_label (file_system,
- path);
+ GtkFileSystemIface *iface = GTK_FILE_SYSTEM_GET_IFACE (file_system);
+ if (iface->get_bookmark_label)
+ return iface->get_bookmark_label (file_system, path);
return NULL;
}
@@ -816,10 +816,9 @@ gtk_file_system_set_bookmark_label (GtkFileSystem *file_system,
g_return_if_fail (GTK_IS_FILE_SYSTEM (file_system));
g_return_if_fail (path != NULL);
- if (GTK_FILE_SYSTEM_GET_IFACE (file_system)->set_bookmark_label)
- GTK_FILE_SYSTEM_GET_IFACE (file_system)->set_bookmark_label (file_system,
- path,
- label);
+ GtkFileSystemIface *iface = GTK_FILE_SYSTEM_GET_IFACE (file_system);
+ if (iface->set_bookmark_label)
+ iface->set_bookmark_label (file_system, path, label);
}
/*****************************************
@@ -939,10 +938,11 @@ gtk_file_folder_is_finished_loading (GtkFileFolder *folder)
{
g_return_val_if_fail (GTK_IS_FILE_FOLDER (folder), TRUE);
- if (!GTK_FILE_FOLDER_GET_IFACE (folder)->is_finished_loading)
+ GtkFileFolderIface *iface = GTK_FILE_FOLDER_GET_IFACE (folder);
+ if (!iface->is_finished_loading)
return TRUE;
else
- return GTK_FILE_FOLDER_GET_IFACE (folder)->is_finished_loading (folder);
+ return iface->is_finished_loading (folder);
}