Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fun.git;a=commitdiff;h=662baf903dd5e157a84ee7f385ad67d5f02da3a2

commit 662baf903dd5e157a84ee7f385ad67d5f02da3a2
Author: Priyank <[EMAIL PROTECTED]>
Date:   Sat Nov 3 11:35:15 2007 +0530

fun-ui
* Display a notification when an update is available
* Minor changes in tooltip geometry

diff --git a/src/fun-dbus.c b/src/fun-dbus.c
index db83a96..a11483e 100644
--- a/src/fun-dbus.c
+++ b/src/fun-dbus.c
@@ -71,11 +71,6 @@ fun_dbus_perform_service (guint service, gchar 
**package_list)
dbus_error_free (&error);
return FALSE;
}
-                       /* if there are any updates, display a notification */
-                       if (package_list != NULL)
-                       {
-
-                       }

dbus_message_unref (reply);
dbus_message_unref (message);
diff --git a/src/fun-ui.c b/src/fun-ui.c
index 6e88cd9..1125ba0 100644
--- a/src/fun-ui.c
+++ b/src/fun-ui.c
@@ -32,7 +32,7 @@
static void fun_about_show (void);
static void fun_about_hide (void);

-#define FUN_ICON               "fun.png"
+#define FUN_ICON                       "fun.png"
#define FUN_TOOLTIP_ICON        "fun.png"

EggTrayIcon     *icon = NULL;
@@ -137,7 +137,7 @@ cb_fun_systray_enter_notify (GtkWidget *widget, 
GdkEventCrossing *event, gpointe
rectangle.x = 2500;
rectangle.y = 2500;
rectangle.width = 100;
-       rectangle.height = 50;
+       rectangle.height = 70;
screen = gtk_widget_get_screen (GTK_WIDGET(icon));
sexy_tooltip_position_to_rect (SEXY_TOOLTIP(stooltip), &rectangle, screen);
gtk_widget_show_all (stooltip);
@@ -152,7 +152,7 @@ cb_fun_systray_enter_notify (GtkWidget *widget, 
GdkEventCrossing *event, gpointe
else
{
rectangle.x = x-(w/4);
-               rectangle.y = y-120;
+               rectangle.y = y-130;
}

sexy_tooltip_position_to_rect (SEXY_TOOLTIP(stooltip), &rectangle, screen);
@@ -230,7 +230,7 @@ void
fun_ui_init (void)
{
GError          *error = NULL;
-       guint           seconds = 40;
+       guint           seconds = 15;

fun_systray_create ();
if (fun_dbus_perform_service (TEST_SERVICE, NULL) == FALSE)
@@ -279,8 +279,12 @@ fun_timeout_func (void)

if (fun_dbus_perform_service (PERFORM_UPDATE, &plist)==TRUE)
{
-               g_print ("\nlist is\n %s", plist);
-               g_print ("Yeaahaaw! success\n");
+               //g_print ("\nlist is\n %s", plist);
+               //g_print ("Yeaahaaw! success\n");
+               fun_tooltip_set_text1 (tooltip, "Updates are available", TRUE);
+               fun_tooltip_set_text2 (tooltip, "Click here to know more..", 
TRUE);
+               fun_tooltip_show (tooltip);
+               cb_fun_systray_enter_notify (NULL, NULL, NULL);
}
else
g_print ("Damn !\n");
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to