Check for ditem::icon != NULL before calling gnome_pixmap_file.

2002-01-03  Richard Hestilow  <hestilow@ximian.com>

	* capplet-dir.c (capplet_new): Check for ditem::icon != NULL
	before calling gnome_pixmap_file.

	* gnomecc.glade: Remove toolbar & menu stuff (this was causing
	runtime glade warnings).
This commit is contained in:
Richard Hestilow 2002-01-03 21:25:24 +00:00 committed by Rachel Hestilow
parent ff7a43359d
commit 4d346978f5
4 changed files with 17 additions and 8 deletions

View file

@ -1,3 +1,11 @@
2002-01-03 Richard Hestilow <hestilow@ximian.com>
* capplet-dir.c (capplet_new): Check for ditem::icon != NULL
before calling gnome_pixmap_file.
* gnomecc.glade: Remove toolbar & menu stuff (this was causing
runtime glade warnings).
2001-12-20 Bradford Hovinen <hovinen@ximian.com>
* capplet-dir-view-list.c: Eliminate compiler warnings

View file

@ -163,7 +163,7 @@ sidebar_dummy_foreach (GtkTreeModel *model, GtkTreePath *path,
g_return_if_fail (dir != NULL);
g_value_init (&val, G_TYPE_POINTER);
//g_value_init (&val, G_TYPE_POINTER);
gtk_tree_model_get_value (model, iter, SIDEBAR_DATA, &val);
*dir = g_value_get_pointer (&val);
}

View file

@ -107,10 +107,12 @@ capplet_new (CappletDir *dir, gchar *desktop_path)
}
if (!g_file_exists (entry->icon))
{
const gchar *icon;
g_free (entry->icon);
entry->icon = gnome_pixmap_file (
gnome_desktop_item_get_string (dentry,
GNOME_DESKTOP_ITEM_ICON));
icon = gnome_desktop_item_get_string (dentry, GNOME_DESKTOP_ITEM_ICON);
if (icon)
entry->icon = gnome_pixmap_file (icon);
if (!entry->icon)
entry->icon = gnome_pixmap_file ("gnome-unknown.png");
}

View file

@ -267,7 +267,7 @@
<property name="enable_layout_config">yes</property>
<property name="window-position">GTK_WIN_POS_NONE</property>
<child internal-child="vbox">
<!-- <child internal-child="vbox">
<widget class="GnomeDock" id="dock1">
<property name="allow_floating">yes</property>
<property name="visible">yes</property>
@ -351,11 +351,10 @@
<property name="expand">yes</property>
<property name="fill">yes</property>
</packing>
</child>
</child> -->
<child>
<widget class="GnomeAppBar" id="appbar1">
<property name="child_name">GnomeApp:appbar</property>
<property name="has_progress">no</property>
<property name="has_status">yes</property>
<property name="visible">yes</property>
@ -365,6 +364,6 @@
<property name="expand">yes</property>
<property name="fill">yes</property>
</packing>
</child>
</child>
</widget>
</glade-interface>