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> 2001-12-20 Bradford Hovinen <hovinen@ximian.com>
* capplet-dir-view-list.c: Eliminate compiler warnings * 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_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); gtk_tree_model_get_value (model, iter, SIDEBAR_DATA, &val);
*dir = g_value_get_pointer (&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)) if (!g_file_exists (entry->icon))
{ {
const gchar *icon;
g_free (entry->icon); g_free (entry->icon);
entry->icon = gnome_pixmap_file ( icon = gnome_desktop_item_get_string (dentry, GNOME_DESKTOP_ITEM_ICON);
gnome_desktop_item_get_string (dentry, if (icon)
GNOME_DESKTOP_ITEM_ICON)); entry->icon = gnome_pixmap_file (icon);
if (!entry->icon) if (!entry->icon)
entry->icon = gnome_pixmap_file ("gnome-unknown.png"); entry->icon = gnome_pixmap_file ("gnome-unknown.png");
} }

View file

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