bug/missing feature in gtk2



Hello,

I'm not sure whether to call this a bug or a missing feature...

First of all, gtk-1.3.14 fixed the bug where my picture disappeared if I
highlighted the button to which it was attached, thanks! Now, I've
noticed something else that might be wrong.

I have the following code:

  menu = gtk_menu_new();
  for (i=0;i<g_list_length(list);i++)
  {
    if (!strncmp((gchar*)g_list_nth_data(list, i), "Line", 4))
      pixmap = (const gchar**) audio_src_line_xpm;
    else if (!strncmp((gchar*)g_list_nth_data(list, i), "Mic", 3))
      pixmap = (const gchar**) audio_src_mic_xpm;
    else if (!strncmp((gchar*)g_list_nth_data(list, i), "CD", 2))
      pixmap = (const gchar**) audio_src_cd_xpm;
    else
      pixmap = (const gchar**) audio_src_volume_xpm;
    menuitem =
gtk_image_menu_item_new_with_label((gchar*)g_list_nth_data(list, i));
    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem),
       
gtk_image_new_from_pixbuf(gdk_pixbuf_new_from_xpm_data(pixmap)));
    gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
    if (i == active)
      gtk_menu_set_active(GTK_MENU(menu), i);
  }
  gtk_option_menu_set_menu (prefs->audio_recsrc, menu);
  gtk_widget_show_all(menu);

prefs->audio_recsrc is a GtkOptionMenu. The problem is that hat images
*do* appear in the menu if it pops up, but not in the GtkOptionMenu
itself with the selected item. I hope the following two screenshots can
make clear what I mean:
http://ronald.bitfreak.net/images/icon-problem-1.png
http://ronald.bitfreak.net/images/icon-problem-2.png
In the second one, you'll notice that the icon is not being shown in
front of the selected item, while in the popup-menu itself, the icons
are being shown. I'm not sure whether to call this a bug or a missing
feature. Should I report this somewhere?

Secondly (this is very offtopic), I'm getting my icons from the 'tigert'
collection (http://primates.ximian.com/~tigert/new_stock_project/).
According to that page, these icons are supposed to be part of gtk's
stock icon collection, however, I can't find the media-rec, media-pause
and media-stop icons as stock icons in Gtk. Are they supposed to be in
some other package than Gtk?

Thanks,

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje ronald bitfreak net>
-  // \\   | Running: Linux 2.4.17-XFS and OpenBSD 3.0
- /(   )\  | http://ronald.bitfreak.net/
-  ^^-^^




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]