Set valid tool tip in Gnome applet when no transfer selected.
[doldaconnect.git] / clients / gnome-trans-applet / dolcon-trans-applet.c
index ab31d3c..0495560 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Dolda Connect - Modular multiuser Direct Connect-style client
- *  Copyright (C) 2005 Fredrik Tolf (fredrik@dolda2000.com)
+ *  Copyright (C) 2005 Fredrik Tolf <fredrik@dolda2000.com>
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ static void cancel_transfer(BonoboUIComponent *uic, struct appletdata *data, con
 static BonoboUIVerb ctxtmenuverbs[] =
 {
     BONOBO_UI_VERB("dca_pref", run_pref_dialog),
-    BONOBO_UI_VERB("dca_cancel", cancel_transfer),
+    BONOBO_UI_VERB("dca_cancel", (void (*)(BonoboUIComponent*, gpointer, const char *))cancel_transfer),
     BONOBO_UI_VERB_END
 };
 
@@ -75,8 +75,10 @@ static gboolean updatetip(struct appletdata *data)
     time_t now;
     char buf[256];
     
-    if(data->curdisplay == NULL)
+    if(data->curdisplay == NULL) {
+       gtk_tooltips_set_tip(data->tips, GTK_WIDGET(data->applet), _("No transfer selected"), NULL);
        return(TRUE);
+    }
     now = time(NULL);
     if(data->curdisplay->cmptime == 0)
     {