Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: Re: [Wireshark-dev] Help fetching values from a GtkTreeView

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Wed, 5 Dec 2007 19:14:55 -0700

On Thu, Dec 06, 2007 at 12:59:02AM +0100, Stig Bj?rlykke wrote:

> As I'm trying to implement the "Apply as Filter" menu in the Protocol
> Hierarchy Statistics window, I have a problem storing the
> hfinfo->abbrev value in the node and then fetch this in the
> select_filter callback.  I have no experience with Gtk programming, so
> I need some help here :)
>
> Anyone able to give me some hints?

I haven't used GtkTreeView as a tree before, but when using it as a
list, you make the final field a G_TYPE_POINTER.  A G_TYPE_POINTER (as
opposed to, say, a G_TYPE_STRING) isn't displayed to the user - it is
only used for you to store and retrieve values.  I assume it works the
same way with a GtkTreeView tree.  Check out the GtkTreeStore functions
in the GTK+ docs as I believe that is what is needed to store and
retrieve the value of the G_TYPE_POINTER "field" by passing a gpointer
(a "void *") instead of a string that you see in the examples.

I hope this helps.  I don't remember much this functionality at the
moment, but if more comes back to me, I'll let you know :)


Steve


  • Follow-Ups:
    • Re: [Wireshark-dev] Help fetching values from a GtkTreeView
      • From: Stig Bjørlykke
  • References:
    • [Wireshark-dev] Help fetching values from a GtkTreeView
      • From: Stig Bjørlykke
  • Prev by Date: [Wireshark-dev] Help fetching values from a GtkTreeView
  • Next by Date: [Wireshark-dev] Windows buildbot failing on portableapps package
  • Previous by thread: [Wireshark-dev] Help fetching values from a GtkTreeView
  • Next by thread: Re: [Wireshark-dev] Help fetching values from a GtkTreeView
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation