summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2012-11-19 22:42:09 -0600
committerScott Balneaves <[email protected]>2012-11-19 22:42:09 -0600
commit244dabb83477ab71b8f023c58461b3246988c34c (patch)
treebe8449620a69f0053b65f4c40160ec3c7c5e1ae4
parent6d06a224d764c5b58127f665b2fcfa7eeac080ee (diff)
downloadmate-system-monitor-244dabb83477ab71b8f023c58461b3246988c34c.tar.bz2
mate-system-monitor-244dabb83477ab71b8f023c58461b3246988c34c.tar.xz
Fixes issue #9
-rw-r--r--src/prettytable.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/prettytable.cpp b/src/prettytable.cpp
index a3c3947..10ee060 100644
--- a/src/prettytable.cpp
+++ b/src/prettytable.cpp
@@ -40,6 +40,7 @@ void
PrettyTable::on_application_opened(MatewnckScreen* screen, MatewnckApplication* app, gpointer data)
{
PrettyTable * const that = static_cast<PrettyTable*>(data);
+ FILE *f;
pid_t pid = matewnck_application_get_pid(app);
@@ -51,7 +52,11 @@ PrettyTable::on_application_opened(MatewnckScreen* screen, MatewnckApplication*
Glib::RefPtr<Gdk::Pixbuf> icon;
- icon = that->theme->load_icon(icon_name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN);
+ f = fopen (icon_name, "r");
+ if (f != NULL) {
+ fclose (f);
+ icon = that->theme->load_icon(icon_name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN);
+ }
if (not icon) {
icon = Glib::wrap(matewnck_application_get_icon(app), /* take_copy */ true);