I have solved the second problem (yelp only searches /usr/*, not $HOME).
Any help on the first problem please?

On Mon, 2013-06-10 at 16:53 +0100, Rudra Banerjee wrote:
> Dear friends,
> I am writing a code with gtk+3.
> I am facing problems with linking the icons and help files with the
> code.
> 
> #include "config.h"
> 
> #include <stdio.h>
> #include <stdlib.h>
> 
> #include <glib/gi18n.h>
> #include <gdk-pixbuf/gdk-pixbuf.h>
> 
> #include <gtk/gtk.h>
> #include <string.h>
> 
> GtkWidget *window;
> void help_about (GtkMenuItem *helpabout, GtkWidget *window)
> {
>     const gchar *authors[] = {
>    "RudraB <mai...@example.com>",
>     NULL
>   };
> 
>   const gchar *copyright = "Copyright \xc2\xa9 2012-2013 Rudra  Banerjee";
>   const gchar *comments = _("Manage and Create BibTeX File");
>   gchar *hstr=g_strdup_printf("%s/mkbib.svg", PIXMAP);
>    g_print("%s",hstr);
>   g_return_if_fail (GTK_IS_WIDGET (window));
>   
>   gtk_show_about_dialog (GTK_IS_WINDOW (window) ? GTK_WINDOW (window) : NULL,
>                        "name", _("mkbib"),
>                        "version", VERSION,
>                        "copyright", copyright,
>                        "comments", comments,
>                        "authors", authors,
>                        "logo-icon-name",hstr,
>                        "license-type", GTK_LICENSE_GPL_3_0,
>                        "screen", gtk_widget_get_screen (window),
>                        NULL);
> 
> }
> void help_content(GtkWidget *widget, gpointer data)
> 
> {
>   gchar *uri, *str;
>   GError *Err=NULL;
> 
>   uri=g_strdup("help:mkbib");
>   gtk_show_uri(NULL, uri, gtk_get_current_event_time(), &Err);
>   g_free(uri);
>   if (Err)
>   {
>     caution("File does not exist");
>   }
> }
> I also have the pixbuff defined in the main.c as
> 
> 
> GdkPixbuf *create_pixbuf(const gchar * iconname) {
>   GdkPixbuf *pixbuf;
>   GError *error = NULL;
>   pixbuf = gdk_pixbuf_new_from_file(iconname, &error);
>   if (!pixbuf) {
>     fprintf(stderr, "%s\n", error->message);
>     g_error_free(error);
>   }
> 
>   return pixbuf;
> }
> 
> int main(int argc,
>     char *argv[]) {
> ............
> ............
>   gchar *sicon=g_strdup_printf("%s/icon.svg",PIXMAP);
>   gtk_window_set_icon(GTK_WINDOW(window), 
>       create_pixbuf(sicon));
>   g_free(sicon);
> ............
> ............
> }
> The problem is:
> 1) while the icon is shown in the topbar, as any gnome3 application, in
> "About" window, the icon is missing. but the pathe shown by 
> 
> g_print("%s",hstr);
> does exist.
> 
> 2) the help files, in help/C/*.page is there, but Help->Help(i.e. F1)
> shows 
> Quote:
> The URI ‘help:mkbib/index’ does not point to a valid page. 
> .
> 
> What I am missing? Kindly help.
> 
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to