summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 50a5468)
raw | patch | inline | side by side (parent: 50a5468)
author | Eric Wertz <ericdwertz@gmail.com> | |
Fri, 17 Nov 2017 14:06:39 +0000 (09:06 -0500) | ||
committer | Eric Wertz <ericdwertz@gmail.com> | |
Fri, 17 Nov 2017 14:06:39 +0000 (09:06 -0500) |
dock_icon.c | patch | blob | history | |
main.c | patch | blob | history |
diff --git a/dock_icon.c b/dock_icon.c
index c56a71b3f4a5e9419e8481e5ac5d3bc1bcf38241..4e6666e30e2aa20c5269d3e0cb391964f75889df 100644 (file)
--- a/dock_icon.c
+++ b/dock_icon.c
{
GKeyFile* key_file = g_key_file_new();
gchar file[256];
+ gchar* out;
sprintf( file, "/usr/share/applications/%s.desktop", name );
if( !g_key_file_load_from_file( key_file, file, G_KEY_FILE_NONE, NULL ) )
return NULL;
- return g_key_file_get_string( key_file, G_KEY_FILE_DESKTOP_GROUP, "Icon", NULL );
+ out = g_key_file_get_string( key_file, G_KEY_FILE_DESKTOP_GROUP, "Icon", NULL );
+ g_key_file_free( key_file );
+
+ return out;
}
/* Gets the pixbuf from a desktop file's icon name. Based on the same function * from matchbox-desktop
pixbuf = wnck_window_get_icon( window );
unref = 0;
}
+
if (pixbuf == NULL)
{
pixbuf = gtk_icon_theme_load_icon(theme, "application-x-executable",
index 8c4009ec2a538acbbacb19e5f7531ac5a7821ed5..bcd57303b5154f0b1cb160d7d94e96ade9643f9b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -109,6 +109,10 @@ GdkFilterReturn handle_x11_event( GdkXEvent *xevent, GdkEvent *event, gpointer d
{
system( "/home/eric/EricOS/ericlock/ericlock" );
}
+ if( xev->xkey.keycode == 39 )
+ {
+ system( "/home/eric/EricOS/ericsnip/ericsnip" );
+ }
}
}
if( xev->type == KeyRelease )