summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Zesch <[email protected]>2012-11-19 21:01:01 -0800
committerSteve Zesch <[email protected]>2012-11-19 21:01:01 -0800
commit42e355492516efe168b1ad16e3762610402fce10 (patch)
treebe8449620a69f0053b65f4c40160ec3c7c5e1ae4 /src
parent6d06a224d764c5b58127f665b2fcfa7eeac080ee (diff)
parent244dabb83477ab71b8f023c58461b3246988c34c (diff)
downloadmate-system-monitor-42e355492516efe168b1ad16e3762610402fce10.tar.bz2
mate-system-monitor-42e355492516efe168b1ad16e3762610402fce10.tar.xz
Merge pull request #11 from sbalneav/master
Fixes #9
Diffstat (limited to 'src')
-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);