Ethereal-dev: Re: [Ethereal-dev] New feature for ethereal
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Wed, 24 Jan 2001 20:41:30 -0800
On Mon, Jan 22, 2001 at 09:07:51AM -0800, David Hampton wrote: > Done. Here are the new diffs. Here's a small patch to put the option menus into alignments, so that they don't expand vertically (they look a bit bizarre if they expand vertically to match the size of the protocol list widget):
*** gtk/decode_as_dlg.c.SAVE Wed Jan 24 20:23:56 2001
--- gtk/decode_as_dlg.c Wed Jan 24 20:39:31 2001
***************
*** 865,870 ****
--- 865,890 ----
/**************************************************/
/*
+ * This routine is called to pack an option menu into an aligment, so
+ * that it doesn't expand vertically to fill up the space available to
+ * it.
+ *
+ * @param optmenu A pointer to the option menu to be so packed.
+ *
+ * @return GtkWidget * A pointer to the newly created alignment.
+ */
+ static GtkWidget *
+ decode_add_pack_menu (GtkWidget *optmenu)
+ {
+ GtkWidget *alignment;
+
+ alignment = gtk_alignment_new(0.0, 0.5, 0.0, 0.0);
+ gtk_container_add(GTK_CONTAINER(alignment), optmenu);
+
+ return(alignment);
+ }
+
+ /*
* This routine is called to add the transport protocol selection menu
* to the dialog box. This is a three choice menu: TCP, UDP, and
* TCP/UDP. The default choice for the menu is set to the transport
***************
*** 873,884 ****
* @param page A pointer notebook page that will contain all
* widgets created by this routine.
*
! * @return GtkWidget * A pointer to the newly created option menu.
*/
static GtkWidget *
decode_add_tcpudp_menu (GtkWidget *page)
{
! GtkWidget *optmenu, *menu, *menuitem;
gint requested_tcpudp;
optmenu = gtk_option_menu_new();
--- 893,905 ----
* @param page A pointer notebook page that will contain all
* widgets created by this routine.
*
! * @return GtkWidget * A pointer to the newly created alignment into
! * which we've packed the newly created option menu.
*/
static GtkWidget *
decode_add_tcpudp_menu (GtkWidget *page)
{
! GtkWidget *optmenu, *menu, *menuitem, *alignment;
gint requested_tcpudp;
optmenu = gtk_option_menu_new();
***************
*** 906,912 ****
gtk_object_set_data(GTK_OBJECT(page), E_MENU_TCPUDP, menu);
gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu);
! return(optmenu);
}
--- 927,935 ----
gtk_object_set_data(GTK_OBJECT(page), E_MENU_TCPUDP, menu);
gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu);
! alignment = decode_add_pack_menu(optmenu);
!
! return(alignment);
}
***************
*** 919,930 ****
* @param page A pointer notebook page that will contain all
* widgets created by this routine.
*
! * @return GtkWidget * A pointer to the newly created option menu.
*/
static GtkWidget *
decode_add_srcdst_menu (GtkWidget *page)
{
! GtkWidget *optmenu, *menu, *menuitem;
gchar tmp[100];
optmenu = gtk_option_menu_new();
--- 942,954 ----
* @param page A pointer notebook page that will contain all
* widgets created by this routine.
*
! * @return GtkWidget * A pointer to the newly created alignment into
! * which we've packed the newly created option menu.
*/
static GtkWidget *
decode_add_srcdst_menu (GtkWidget *page)
{
! GtkWidget *optmenu, *menu, *menuitem, *alignment;
gchar tmp[100];
optmenu = gtk_option_menu_new();
***************
*** 952,958 ****
gtk_object_set_data(GTK_OBJECT(page), E_MENU_SRCDST, menu);
gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu);
! return(optmenu);
}
/**************************************************/
--- 976,984 ----
gtk_object_set_data(GTK_OBJECT(page), E_MENU_SRCDST, menu);
gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu);
! alignment = decode_add_pack_menu(optmenu);
!
! return(alignment);
}
/**************************************************/
- References:
- Re: [Ethereal-dev] New feature for ethereal
- From: David Hampton
- Re: [Ethereal-dev] New feature for ethereal
- From: Guy Harris
- Re: [Ethereal-dev] New feature for ethereal
- From: David Hampton
- Re: [Ethereal-dev] New feature for ethereal
- Prev by Date: Re: [Ethereal-dev] New FT type
- Next by Date: Re: [Ethereal-dev] New FT type
- Previous by thread: Re: [Ethereal-dev] New feature for ethereal
- Next by thread: Re: [Ethereal-dev] New feature for ethereal
- Index(es):





