mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
If the glade file doesn't exists pop up an alert suggesting running 'make
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
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
15baed047a
commit
03feea82e4
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
Sat Sep 17 14:35:32 2005 Soeren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
* Bump version numbers
|
* Bump version numbers
|
||||||
|
|||||||
26
sysprof.c
26
sysprof.c
@ -1353,7 +1353,10 @@ set_shadows (void)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
#define GLADE_FILE DATADIR "/sysprof.glade"
|
||||||
|
#define ICON_FILE PIXMAPDIR "/sysprof-icon.png"
|
||||||
|
|
||||||
|
static gboolean
|
||||||
build_gui (Application *app)
|
build_gui (Application *app)
|
||||||
{
|
{
|
||||||
GladeXML *xml;
|
GladeXML *xml;
|
||||||
@ -1362,11 +1365,23 @@ build_gui (Application *app)
|
|||||||
|
|
||||||
set_shadows ();
|
set_shadows ();
|
||||||
|
|
||||||
xml = glade_xml_new (DATADIR "/sysprof.glade", NULL, NULL);
|
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 (GLADE_FILE, NULL, NULL);
|
||||||
|
|
||||||
/* Main Window */
|
/* Main Window */
|
||||||
app->main_window = glade_xml_get_widget (xml, "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);
|
gtk_window_set_icon (GTK_WINDOW (app->main_window), app->icon);
|
||||||
|
|
||||||
@ -1475,6 +1490,8 @@ build_gui (Application *app)
|
|||||||
|
|
||||||
/* Statusbar */
|
/* Statusbar */
|
||||||
queue_show_samples (app);
|
queue_show_samples (app);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Application *
|
static Application *
|
||||||
@ -1539,7 +1556,8 @@ main (int argc, char **argv)
|
|||||||
g_timeout_add (10, on_timeout, app);
|
g_timeout_add (10, on_timeout, app);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
build_gui (app);
|
if (!build_gui (app))
|
||||||
|
return -1;
|
||||||
|
|
||||||
update_sensitivity (app);
|
update_sensitivity (app);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user