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)
This commit is contained in:
Matthias Clasen 2005-05-04 03:16:28 +00:00 committed by Matthias Clasen
parent 2c5634dad1
commit 00dd821a5a
5 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,7 @@
2005-05-03 Matthias Clasen <mclasen@redhat.com> 2005-05-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystem.c:
* gtk/gtkcelleditable.c:
* gtk/gtktreemodel.c: Avoid getting the interface struct * gtk/gtktreemodel.c: Avoid getting the interface struct
twice in the same function. (#300513, Billy Biggs) twice in the same function. (#300513, Billy Biggs)

View File

@ -1,5 +1,7 @@
2005-05-03 Matthias Clasen <mclasen@redhat.com> 2005-05-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystem.c:
* gtk/gtkcelleditable.c:
* gtk/gtktreemodel.c: Avoid getting the interface struct * gtk/gtktreemodel.c: Avoid getting the interface struct
twice in the same function. (#300513, Billy Biggs) twice in the same function. (#300513, Billy Biggs)

View File

@ -1,5 +1,7 @@
2005-05-03 Matthias Clasen <mclasen@redhat.com> 2005-05-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystem.c:
* gtk/gtkcelleditable.c:
* gtk/gtktreemodel.c: Avoid getting the interface struct * gtk/gtktreemodel.c: Avoid getting the interface struct
twice in the same function. (#300513, Billy Biggs) twice in the same function. (#300513, Billy Biggs)

View File

@ -94,7 +94,6 @@ gtk_cell_editable_start_editing (GtkCellEditable *cell_editable,
GdkEvent *event) GdkEvent *event)
{ {
g_return_if_fail (GTK_IS_CELL_EDITABLE (cell_editable)); 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); (* GTK_CELL_EDITABLE_GET_IFACE (cell_editable)->start_editing) (cell_editable, event);
} }

View File

@ -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 (GTK_IS_FILE_SYSTEM (file_system), NULL);
g_return_val_if_fail (path != NULL, FALSE); g_return_val_if_fail (path != NULL, FALSE);
if (GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_bookmark_label) GtkFileSystemIface *iface = GTK_FILE_SYSTEM_GET_IFACE (file_system);
return GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_bookmark_label (file_system, if (iface->get_bookmark_label)
path); return iface->get_bookmark_label (file_system, path);
return NULL; 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 (GTK_IS_FILE_SYSTEM (file_system));
g_return_if_fail (path != NULL); g_return_if_fail (path != NULL);
if (GTK_FILE_SYSTEM_GET_IFACE (file_system)->set_bookmark_label) GtkFileSystemIface *iface = GTK_FILE_SYSTEM_GET_IFACE (file_system);
GTK_FILE_SYSTEM_GET_IFACE (file_system)->set_bookmark_label (file_system, if (iface->set_bookmark_label)
path, iface->set_bookmark_label (file_system, path, label);
label);
} }
/***************************************** /*****************************************
@ -939,10 +938,11 @@ gtk_file_folder_is_finished_loading (GtkFileFolder *folder)
{ {
g_return_val_if_fail (GTK_IS_FILE_FOLDER (folder), TRUE); 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; return TRUE;
else else
return GTK_FILE_FOLDER_GET_IFACE (folder)->is_finished_loading (folder); return iface->is_finished_loading (folder);
} }