Unix/Linux Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

How to display a notification with image? - Libnotify

Programming


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-25-2010   -   Original Discussion by hakermania
hakermania's Unix or Linux Image
hakermania hakermania is offline
Registered User
 
Join Date: Feb 2010
Last Activity: 22 September 2013, 7:10 AM EDT
Posts: 169
Thanks: 34
Thanked 4 Times in 4 Posts
Unix or Linux Question How to display a notification with image? - Libnotify

Hi all, this is the code:

Code:
#include <libnotify/notify.h>
#include <stdio.h>
#include <unistd.h>

int main()
{
    NotifyNotification *n;

    notify_init("Basics");

    n = notify_notification_new ("Summary",
                                 "\nThis is the message that we want to display",
                                  NULL, NULL);
    notify_notification_set_timeout (n, 5000); // 5 seconds

    if (!notify_notification_show (n, NULL))
    {
        return 1;
    }

    g_object_unref(G_OBJECT(n));

    return 0;
}

It displays a message without any problem, but I want to add a specific image to it as many apps do so...
Is this possible with libnotify? And if it is, how do I do it? LinuxLinux
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with image display stored outside webserver in Unix? nsurendiran Web Programming 1 12-27-2009 07:50 AM
Create an Ignite image on tape from Online IgniteUX image Andrek UNIX for Advanced & Expert Users 3 02-28-2007 07:14 PM



All times are GMT -4. The time now is 09:47 AM.