+Fri Sep 23 20:46:40 2005 Soeren Sandmann <sandmann@redhat.com>
+
+ * sysprof.c (build_gui): If the glade file doesn't exists pop up
+ an alert suggesting running 'make install'
+
+ * sysprof.c: Remove some commented out code
+
Sat Sep 17 14:35:32 2005 Soeren Sandmann <sandmann@redhat.com>
* Bump version numbers
);
}
-static void
+#define GLADE_FILE DATADIR "/sysprof.glade"
+#define ICON_FILE PIXMAPDIR "/sysprof-icon.png"
+
+static gboolean
build_gui (Application *app)
{
GladeXML *xml;
GtkTreeViewColumn *col;
set_shadows ();
+
+ if (!g_file_test (GLADE_FILE, G_FILE_TEST_EXISTS) ||
+ !g_file_test (ICON_FILE, G_FILE_TEST_EXISTS))
+ {
+ sorry (NULL,
+ "Sysprof was not compiled or installed correctly.\n"
+ "\n"
+ "Running \"make install\" may solve this problem.\n");
+
+ return FALSE;
+ }
+
- xml = glade_xml_new (DATADIR "/sysprof.glade", NULL, NULL);
+ xml = glade_xml_new (GLADE_FILE, NULL, NULL);
/* Main Window */
app->main_window = glade_xml_get_widget (xml, "main_window");
- app->icon = gdk_pixbuf_new_from_file (PIXMAPDIR "/sysprof-icon.png", NULL);
+ app->icon = gdk_pixbuf_new_from_file (ICON_FILE, NULL);
gtk_window_set_icon (GTK_WINDOW (app->main_window), app->icon);
/* Statusbar */
queue_show_samples (app);
+
+ return TRUE;
}
static Application *
g_timeout_add (10, on_timeout, app);
#endif
- build_gui (app);
+ if (!build_gui (app))
+ return -1;
update_sensitivity (app);