Re: [Wireshark-dev] [Wireshark-commits] rev 48652: /trunk/ui/gtk/ /trunk/ui/gtk/: capture_dlg.c

2013-03-30 Thread Jaap Keuter
On 03/30/2013 05:09 PM, Bill Meier wrote:
> On 3/30/2013 7:57 AM, j...@wireshark.org wrote:
>> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=48652
>>
>> User: jake
>> Date: 2013/03/30 04:57 AM
>>
>> Log:
>>   Have 'Capture file' and 'Stop after' extries left aligned in GTK+ 3 as 
>> well.
>>
>> Directory: /trunk/ui/gtk/
>>ChangesPath Action
>>+49 -23capture_dlg.cModified
>>
> 
> The fix was to use ws_gtk_grid_attach_extended()
> with just GTK_FILL as the X & Y options in various places.
> 
> My understanding of the normal expected semantics of GTK_FILL is that it only
> takes effect when GTK_EXPAND is used.
> 
> So: I'll have to look at the way I implemented ws_gtk_grid_attach_extended()
> using halign and valign for GTK3 to see if it's OK or if I should change
> something (and thus if I need to change the fix in SVN #48652 and possibly
> change other calls to ws_gtk_grid...).
> 
> Bill
> 

He Bill,

This was merely try and error, taking out flags from _default() until it worked.
Then of course restoring _default() to its original glory and change the
applicable _extended() calls accordingly. I wouldn't be surprised if it could be
cleaned up further.

Thanks,
Jaap
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] [Wireshark-commits] rev 48652: /trunk/ui/gtk/ /trunk/ui/gtk/: capture_dlg.c

2013-03-30 Thread Bill Meier

On 3/30/2013 7:57 AM, j...@wireshark.org wrote:

http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=48652

User: jake
Date: 2013/03/30 04:57 AM

Log:
  Have 'Capture file' and 'Stop after' extries left aligned in GTK+ 3 as well.

Directory: /trunk/ui/gtk/
   ChangesPath Action
   +49 -23capture_dlg.cModified



The fix was to use ws_gtk_grid_attach_extended()
with just GTK_FILL as the X & Y options in various places.

My understanding of the normal expected semantics of GTK_FILL is that it 
only takes effect when GTK_EXPAND is used.


So: I'll have to look at the way I implemented 
ws_gtk_grid_attach_extended() using halign and valign for GTK3 to see if 
it's OK or if I should change something (and thus if I need to change 
the fix in SVN #48652 and possibly change other calls to ws_gtk_grid...).


Bill


___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] Catch called dissector error....

2013-03-30 Thread Evan Huus
On Sat, Mar 30, 2013 at 8:09 AM, Sebastiano Di Paola
 wrote:
> Hi all,
> I would like to know if there is a way to call a dissector and check it's
> return value..I mean the behavior I would like to achieve is the
> following...
> I have a blob of data that usually is json, but I don't have any chance to
> know it without trying to parse it...
> So I would like to do...
>
> 
> decode other part of the packet and create the subtree where to append the
> maybe json data...
>
> try {
> decode the blob
> }
> catch {
> cannot decode...maybe it's not json..or wrongly formatted
> and then append to the current "subtree" as a blob
> }
>
> Is it possible to do it ? I mean trap the json dissector error/execption and
> then append the undecode/unkonw data as unknown to the same subtree?

It sounds like what you want is for JSON to register a heuristic
dissector. Then you can make a 'decode' call that will return a
boolean which is true only if decoding was successful - if not you can
append it as a blob. However, the JSON dissector doesn't do this (it
hasn't historically needed to) and making it do this is not
immediately trivial.

One 'workaround' would be to register a preference for your protocol
controlling whether the payloads are decoded as json or not. This
would probably be the least work to achieve approximately the desired
effect.

Cheers,
Evan
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


[Wireshark-dev] Catch called dissector error....

2013-03-30 Thread Sebastiano Di Paola
Hi all,
I would like to know if there is a way to call a dissector and check it's
return value..I mean the behavior I would like to achieve is the
following...
I have a blob of data that usually is json, but I don't have any chance to
know it without trying to parse it...
So I would like to do...


decode other part of the packet and create the subtree where to append the
maybe json data...

try {
decode the blob
}
catch {
cannot decode...maybe it's not json..or wrongly formatted
and then append to the current "subtree" as a blob
}

Is it possible to do it ? I mean trap the json dissector error/execption
and then append the undecode/unkonw data as unknown to the same subtree?

Kind regards.
Ciao.
Seba
___
Sent via:Wireshark-dev mailing list 
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe