Rename ws_gtk_grid_attach() to ws_gtk_grid_attach_defaults();
Also: fix a typo in a comment in 'gui_utils.h' svn path=/trunk/; revision=46951
This commit is contained in:
parent
5c57af2df2
commit
93c28b7da1
|
@ -47,19 +47,19 @@ typedef const char *bootp_info_value_t;
|
|||
|
||||
/* used to keep track of the statistics for an entire program interface */
|
||||
typedef struct _dhcp_stats_t {
|
||||
char *filter;
|
||||
GtkWidget *win;
|
||||
GHashTable *hash;
|
||||
GtkWidget *grid_message_type;
|
||||
guint index; /* Number of to display */
|
||||
char *filter;
|
||||
GtkWidget *win;
|
||||
GHashTable *hash;
|
||||
GtkWidget *grid_message_type;
|
||||
guint index; /* Number of to display */
|
||||
} dhcpstat_t;
|
||||
|
||||
/* used to keep track of a single DHCP message type */
|
||||
typedef struct _dhcp_message_type_t {
|
||||
const char *name;
|
||||
guint32 packets;
|
||||
GtkWidget *widget;/* label in which we print the number of packets */
|
||||
dhcpstat_t *sp; /* entire program interface */
|
||||
const char *name;
|
||||
guint32 packets;
|
||||
GtkWidget *widget; /* label in which we print the number of packets */
|
||||
dhcpstat_t *sp; /* entire program interface */
|
||||
} dhcp_message_type_t;
|
||||
|
||||
static void
|
||||
|
@ -72,7 +72,7 @@ dhcp_reset_hash(gchar *key _U_ , dhcp_message_type_t *data, gpointer ptr _U_)
|
|||
* or create it if it don't exist.
|
||||
*/
|
||||
static void
|
||||
dhcp_draw_message_type(gchar *key _U_, dhcp_message_type_t *data, gchar * unused _U_)
|
||||
dhcp_draw_message_type(gchar *key _U_, dhcp_message_type_t *data, gchar *unused _U_)
|
||||
{
|
||||
char string_buff[256];
|
||||
|
||||
|
@ -86,13 +86,13 @@ dhcp_draw_message_type(gchar *key _U_, dhcp_message_type_t *data, gchar * unused
|
|||
/* Maybe we should display the hexadecimal value ? */
|
||||
/* g_snprintf(string_buff, sizeof(string_buff), "%s (0X%x)", data->name, *key); */
|
||||
tmp = gtk_label_new(data->name /* string_buff */);
|
||||
ws_gtk_grid_attach(GTK_GRID(data->sp->grid_message_type), tmp, x, y, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(data->sp->grid_message_type), tmp, x, y, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT);
|
||||
gtk_widget_show(tmp);
|
||||
|
||||
g_snprintf(string_buff, sizeof(string_buff), "%9d", data->packets);
|
||||
data->widget = gtk_label_new(string_buff);
|
||||
ws_gtk_grid_attach(GTK_GRID(data->sp->grid_message_type), data->widget, x+1, y, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(data->sp->grid_message_type), data->widget, x+1, y, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(data->widget), GTK_JUSTIFY_LEFT);
|
||||
gtk_widget_show(data->widget);
|
||||
|
||||
|
@ -109,6 +109,7 @@ dhcpstat_reset(void *psp)
|
|||
dhcpstat_t *sp = psp;
|
||||
g_hash_table_foreach(sp->hash, (GHFunc)dhcp_reset_hash, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri)
|
||||
{
|
||||
|
|
|
@ -441,12 +441,12 @@ static void funnel_new_dialog(const gchar* title,
|
|||
|
||||
label = gtk_label_new(fieldname);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(main_grid), label, 0, i+1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(main_grid), label, 0, i+1, 1, 1);
|
||||
gtk_widget_show(label);
|
||||
|
||||
entry = gtk_entry_new();
|
||||
g_ptr_array_add(dd->entries,entry);
|
||||
ws_gtk_grid_attach(GTK_GRID(main_grid), entry, 1, i+1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(main_grid), entry, 1, i+1, 1, 1);
|
||||
gtk_widget_show(entry);
|
||||
}
|
||||
|
||||
|
|
|
@ -2044,8 +2044,9 @@ gtk_separator_new(GtkOrientation orientation)
|
|||
#else /* GTK3 */
|
||||
|
||||
void
|
||||
ws_gtk_grid_attach(GtkGrid *grid, GtkWidget *child, gint left, gint top, gint width, gint height)
|
||||
ws_gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top, gint width, gint height)
|
||||
{
|
||||
/* Use defaults for [x|y]options and [x|y]padding which match those for gtk_table_attach_defaults() */
|
||||
ws_gtk_grid_attach_extended(grid, child, left, top, width, height, GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -2095,7 +2096,7 @@ ws_gtk_grid_set_homogeneous(GtkGrid *grid, gboolean homogeneous)
|
|||
#endif /* !GTK_CHECK_VERSION(3,0,0) */
|
||||
|
||||
/*
|
||||
* Wrapp gdk_cairo_set_source_color() with the GTK 3 equivalent
|
||||
* Wrap gdk_cairo_set_source_color() with the GTK 3 equivalent
|
||||
* to be used in GTK2
|
||||
*/
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
|
@ -2107,6 +2108,6 @@ gdk_cairo_set_source_rgba(cairo_t *cr, const GdkRGBA *rgba)
|
|||
gdkRGBAcolor_to_GdkColor(&color, rgba);
|
||||
|
||||
gdk_cairo_set_source_color(cr, &color);
|
||||
|
||||
|
||||
}
|
||||
#endif /* GTK_CHECK_VERSION(3,0,0) */
|
||||
|
|
|
@ -563,8 +563,9 @@ void gdk_cairo_set_source_rgba(cairo_t *cr, const GdkRGBA *rgba);
|
|||
* (other than ws_gtk_attach_extended() which has no gtk_grid...() equivalent).
|
||||
*
|
||||
* ws_gtk_grid_new() ;; gtk_table_new()
|
||||
* ws_gtk_grid_attach() ;; gtk_table_attach_defaults()
|
||||
* ;; Gtk3: sets GTK_EXPAND/GTK_FILL as default;
|
||||
* ws_gtk_grid_attach_defaults() ;; gtk_table_attach_defaults()
|
||||
* ;; Gtk3: sets GTK_EXPAND/GTK_FILL as default;
|
||||
* ;; That is, the defaults used by gtk_table_attach_defaults()
|
||||
* ws_gtk_grid_attach_extended() ;; gtk_table_attach()
|
||||
* ;; Essentially gtk_grid_attach() with eadditional args
|
||||
* ;; to specify 'options' and 'padding' [as used in gtk_table_attach()];
|
||||
|
@ -580,7 +581,7 @@ void gdk_cairo_set_source_rgba(cairo_t *cr, const GdkRGBA *rgba);
|
|||
* gtk_table_attach_defaults(GTK_TABLE(foo_tb), child, col, col+1, row, row+1)
|
||||
*
|
||||
* should be converted to:
|
||||
* ws_gtk_grid_attach(GTK_GRID(foo_grid), child, col, row, 1, 1);
|
||||
* ws_gtk_grid_attach_defaults(GTK_GRID(foo_grid), child, col, row, 1, 1);
|
||||
*/
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
|
@ -591,7 +592,7 @@ typedef GtkTable GtkGrid;
|
|||
#define ws_gtk_grid_new() \
|
||||
gtk_table_new(0, 0, FALSE)
|
||||
|
||||
#define ws_gtk_grid_attach(grid, child, left, top, width, height) \
|
||||
#define ws_gtk_grid_attach_defaults(grid, child, left, top, width, height) \
|
||||
gtk_table_attach_defaults(grid, child, left, left+width, top, top+height)
|
||||
|
||||
#define ws_gtk_grid_attach_extended(grid, child, left, top, width, height, xoptions, yoptions, xpadding, ypadding) \
|
||||
|
@ -611,8 +612,8 @@ typedef GtkTable GtkGrid;
|
|||
#define ws_gtk_grid_new() \
|
||||
gtk_grid_new()
|
||||
|
||||
extern void ws_gtk_grid_attach(GtkGrid *grid, GtkWidget *child,
|
||||
gint left, gint top, gint width, gint height);
|
||||
extern void ws_gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child,
|
||||
gint left, gint top, gint width, gint height);
|
||||
|
||||
extern void ws_gtk_grid_attach_extended(GtkGrid *grid, GtkWidget *child,
|
||||
gint left, gint top, gint width, gint height,
|
||||
|
|
|
@ -296,41 +296,41 @@ mcast_on_params(GtkButton *button _U_, gpointer data _U_)
|
|||
grid = ws_gtk_grid_new();
|
||||
gtk_box_pack_start(GTK_BOX(main_vb), grid, TRUE, TRUE, 0);
|
||||
label = gtk_label_new(" Burst measurement interval (ms) ");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 0, 1, 1);
|
||||
entry1 = gtk_entry_new();
|
||||
g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_burstint);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry1), label_text);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), entry1, 1, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry1, 1, 0, 1, 1);
|
||||
label = gtk_label_new(" Burst alarm threshold (packets) ");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, 1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 1, 1, 1);
|
||||
entry2 = gtk_entry_new();
|
||||
g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_trigger);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry2), label_text);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), entry2, 1, 1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry2, 1, 1, 1, 1);
|
||||
label = gtk_label_new(" Buffer alarm threshold (bytes) ");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, 2, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 2, 1, 1);
|
||||
entry3 = gtk_entry_new();
|
||||
g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_bufferalarm);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry3), label_text);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), entry3, 1, 2, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry3, 1, 2, 1, 1);
|
||||
label = gtk_label_new(" Stream empty speed (kbit/s) ");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, 3, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 3, 1, 1);
|
||||
entry4 = gtk_entry_new();
|
||||
g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_emptyspeed);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry4), label_text);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), entry4, 1, 3, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry4, 1, 3, 1, 1);
|
||||
label = gtk_label_new(" Total empty speed (kbit/s) ");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, 4, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 4, 1, 1);
|
||||
entry5 = gtk_entry_new();
|
||||
g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_cumulemptyspeed);
|
||||
gtk_entry_set_text(GTK_ENTRY(entry5), label_text);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), entry5, 1, 4, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry5, 1, 4, 1, 1);
|
||||
|
||||
gtk_widget_show (grid);
|
||||
|
||||
/* button row */
|
||||
hbuttonbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), hbuttonbox, 0, 5, 2, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), hbuttonbox, 0, 5, 2, 1);
|
||||
ok_bt = gtk_button_new_from_stock(GTK_STOCK_OK);
|
||||
gtk_container_add (GTK_CONTAINER(hbuttonbox), ok_bt);
|
||||
cancel_bt = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
|
||||
|
|
|
@ -617,7 +617,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
if (args->to_file)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dest_cb), TRUE);
|
||||
gtk_widget_set_tooltip_text(dest_cb, "Output to file instead of printer");
|
||||
ws_gtk_grid_attach(GTK_GRID(printer_grid), dest_cb, 0, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(printer_grid), dest_cb, 0, 0, 1, 1);
|
||||
if(action == output_action_print)
|
||||
gtk_widget_show(dest_cb);
|
||||
|
||||
|
@ -626,7 +626,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
g_object_set_data(G_OBJECT(dest_cb), PRINT_FILE_TE_KEY, file_te);
|
||||
gtk_widget_set_tooltip_text(file_te, "Enter Output filename");
|
||||
gtk_entry_set_text(GTK_ENTRY(file_te), args->file);
|
||||
ws_gtk_grid_attach(GTK_GRID(printer_grid), file_te, 1, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(printer_grid), file_te, 1, 0, 1, 1);
|
||||
gtk_widget_set_sensitive(file_te, args->to_file);
|
||||
gtk_widget_show(file_te);
|
||||
if (args->to_file)
|
||||
|
@ -637,7 +637,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
g_object_set_data(G_OBJECT(dest_cb), PRINT_FILE_BT_KEY, file_bt);
|
||||
g_object_set_data(G_OBJECT(file_bt), PRINT_TE_PTR_KEY, file_te);
|
||||
gtk_widget_set_tooltip_text(file_bt, "Browse output filename in filesystem");
|
||||
ws_gtk_grid_attach(GTK_GRID(printer_grid), file_bt, 2, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(printer_grid), file_bt, 2, 0, 1, 1);
|
||||
gtk_widget_set_sensitive(file_bt, args->to_file);
|
||||
gtk_widget_show(file_bt);
|
||||
|
||||
|
@ -646,7 +646,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
cmd_lb = gtk_label_new("Print command:");
|
||||
g_object_set_data(G_OBJECT(dest_cb), PRINT_CMD_LB_KEY, cmd_lb);
|
||||
gtk_misc_set_alignment(GTK_MISC(cmd_lb), 1.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(printer_grid), cmd_lb, 0, 1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(printer_grid), cmd_lb, 0, 1, 1, 1);
|
||||
gtk_widget_set_sensitive(cmd_lb, !args->to_file);
|
||||
if(action == output_action_print)
|
||||
gtk_widget_show(cmd_lb);
|
||||
|
@ -655,7 +655,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args)
|
|||
g_object_set_data(G_OBJECT(dest_cb), PRINT_CMD_TE_KEY, cmd_te);
|
||||
gtk_widget_set_tooltip_text(cmd_te, "Enter print command");
|
||||
gtk_entry_set_text(GTK_ENTRY(cmd_te), args->cmd);
|
||||
ws_gtk_grid_attach(GTK_GRID(printer_grid), cmd_te, 1, 1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(printer_grid), cmd_te, 1, 1, 1, 1);
|
||||
gtk_widget_set_sensitive(cmd_te, !args->to_file);
|
||||
if(action == output_action_print)
|
||||
gtk_widget_show(cmd_te);
|
||||
|
|
|
@ -565,13 +565,13 @@ GtkWidget *range_new(packet_range_t *range, gboolean saving)
|
|||
|
||||
/* captured button */
|
||||
captured_bt = gtk_toggle_button_new_with_mnemonic("_Captured");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), captured_bt, 1, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), captured_bt, 1, 0, 1, 1);
|
||||
g_signal_connect(captured_bt, "toggled", G_CALLBACK(toggle_captured_cb), range_grid);
|
||||
gtk_widget_set_tooltip_text (captured_bt,("Process all the below chosen packets"));
|
||||
|
||||
/* displayed button */
|
||||
displayed_bt = gtk_toggle_button_new_with_mnemonic("_Displayed");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), displayed_bt, 2, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), displayed_bt, 2, 0, 1, 1);
|
||||
g_signal_connect(displayed_bt, "toggled", G_CALLBACK(toggle_filtered_cb), range_grid);
|
||||
if (saving)
|
||||
/* XXX: Testing shows there's a limit to the number of tooltip character displayed: 72 ? */
|
||||
|
@ -586,72 +586,72 @@ GtkWidget *range_new(packet_range_t *range, gboolean saving)
|
|||
|
||||
/* Process all packets */
|
||||
select_all_rb = gtk_radio_button_new_with_mnemonic_from_widget(NULL, "_All packets");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_all_rb, 0, 1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_all_rb, 0, 1, 1, 1);
|
||||
gtk_widget_set_tooltip_text (select_all_rb, ("Process all packets"));
|
||||
g_signal_connect(select_all_rb, "toggled", G_CALLBACK(toggle_select_all), range_grid);
|
||||
|
||||
select_all_c_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_all_c_lb, 1, 1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_all_c_lb, 1, 1, 1, 1);
|
||||
select_all_d_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_all_d_lb, 2, 1, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_all_d_lb, 2, 1, 1, 1);
|
||||
|
||||
|
||||
/* Process currently selected */
|
||||
select_curr_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(select_all_rb),
|
||||
"_Selected packet only");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_curr_rb, 0, 2, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_curr_rb, 0, 2, 1, 1);
|
||||
gtk_widget_set_tooltip_text (select_curr_rb, ("Process the currently selected packet only"));
|
||||
g_signal_connect(select_curr_rb, "toggled", G_CALLBACK(toggle_select_selected), range_grid);
|
||||
|
||||
select_curr_c_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_curr_c_lb, 1, 2, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_curr_c_lb, 1, 2, 1, 1);
|
||||
select_curr_d_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_curr_d_lb, 2, 2, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_curr_d_lb, 2, 2, 1, 1);
|
||||
|
||||
|
||||
/* Process marked packets */
|
||||
select_marked_only_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(select_all_rb),
|
||||
"_Marked packets only");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_marked_only_rb, 0, 3, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_marked_only_rb, 0, 3, 1, 1);
|
||||
gtk_widget_set_tooltip_text (select_marked_only_rb, ("Process marked packets only"));
|
||||
g_signal_connect(select_marked_only_rb, "toggled", G_CALLBACK(toggle_select_marked_only), range_grid);
|
||||
|
||||
select_marked_only_c_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_marked_only_c_lb, 1, 3, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_marked_only_c_lb, 1, 3, 1, 1);
|
||||
select_marked_only_d_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_marked_only_d_lb, 2, 3, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_marked_only_d_lb, 2, 3, 1, 1);
|
||||
|
||||
|
||||
/* Process packet range between first and last packet */
|
||||
select_marked_range_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(select_all_rb),
|
||||
"From first _to last marked packet");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_marked_range_rb, 0, 4, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_marked_range_rb, 0, 4, 1, 1);
|
||||
gtk_widget_set_tooltip_text (select_marked_range_rb,("Process all packets between the first and last marker"));
|
||||
g_signal_connect(select_marked_range_rb, "toggled", G_CALLBACK(toggle_select_marked_range), range_grid);
|
||||
|
||||
select_marked_range_c_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_marked_range_c_lb, 1, 4, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_marked_range_c_lb, 1, 4, 1, 1);
|
||||
select_marked_range_d_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_marked_range_d_lb, 2, 4, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_marked_range_d_lb, 2, 4, 1, 1);
|
||||
|
||||
|
||||
/* Process a user specified provided packet range : -10,30,40-70,80- */
|
||||
select_user_range_rb = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(select_all_rb),
|
||||
"Specify a packet _range:");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_user_range_rb, 0, 5, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_user_range_rb, 0, 5, 1, 1);
|
||||
gtk_widget_set_tooltip_text (select_user_range_rb,("Process a specified packet range"));
|
||||
g_signal_connect(select_user_range_rb, "toggled", G_CALLBACK(toggle_select_user_range), range_grid);
|
||||
|
||||
select_user_range_c_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_user_range_c_lb, 1, 5, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_user_range_c_lb, 1, 5, 1, 1);
|
||||
select_user_range_d_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_user_range_d_lb, 2, 5, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_user_range_d_lb, 2, 5, 1, 1);
|
||||
|
||||
|
||||
/* The entry part */
|
||||
select_user_range_entry = gtk_entry_new();
|
||||
gtk_entry_set_max_length (GTK_ENTRY (select_user_range_entry), 254);
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), select_user_range_entry, 0, 6, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), select_user_range_entry, 0, 6, 1, 1);
|
||||
gtk_widget_set_tooltip_text (select_user_range_entry,
|
||||
"Specify a range of packet numbers : \nExample : 1-10,18,25-100,332-");
|
||||
g_signal_connect(select_user_range_entry,"changed", G_CALLBACK(range_entry), range_grid);
|
||||
|
@ -659,14 +659,14 @@ GtkWidget *range_new(packet_range_t *range, gboolean saving)
|
|||
|
||||
/* Remove ignored packets */
|
||||
remove_ignored_cb = gtk_check_button_new_with_mnemonic("Remove _Ignored packets");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), remove_ignored_cb, 0, 7, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), remove_ignored_cb, 0, 7, 1, 1);
|
||||
gtk_widget_set_tooltip_text (remove_ignored_cb,("Remove all packets marked as Ignored"));
|
||||
g_signal_connect(remove_ignored_cb, "toggled", G_CALLBACK(toggle_remove_ignored), range_grid);
|
||||
|
||||
ignored_c_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), ignored_c_lb, 1, 7, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), ignored_c_lb, 1, 7, 1, 1);
|
||||
ignored_d_lb = gtk_label_new("?");
|
||||
ws_gtk_grid_attach(GTK_GRID(range_grid), ignored_d_lb, 2, 7, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(range_grid), ignored_d_lb, 2, 7, 1, 1);
|
||||
|
||||
gtk_widget_show_all(range_grid);
|
||||
|
||||
|
|
|
@ -112,27 +112,27 @@ rpcprogs_init_grid(GtkWidget *grid_parent)
|
|||
gtk_container_add(GTK_CONTAINER(grid_parent), grid);
|
||||
|
||||
tmp = gtk_label_new("Program");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), tmp, 0, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), tmp, 0, 0, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT);
|
||||
|
||||
tmp = gtk_label_new("Version");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), tmp, 1, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), tmp, 1, 0, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_RIGHT);
|
||||
|
||||
tmp = gtk_label_new("Calls");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), tmp, 2, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), tmp, 2, 0, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_RIGHT);
|
||||
|
||||
tmp = gtk_label_new("Min SRT");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), tmp, 3, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), tmp, 3, 0, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_RIGHT);
|
||||
|
||||
tmp = gtk_label_new("Max SRT");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), tmp, 4, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), tmp, 4, 0, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_RIGHT);
|
||||
|
||||
tmp = gtk_label_new("Avg SRT");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), tmp, 5, 0, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), tmp, 5, 0, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_RIGHT);
|
||||
}
|
||||
|
||||
|
@ -166,27 +166,27 @@ add_new_program(rpc_program_t *rp)
|
|||
num_progs++;
|
||||
|
||||
rp->wprogram = gtk_label_new("0");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), rp->wprogram, 0, num_progs, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), rp->wprogram, 0, num_progs, 1, 1);
|
||||
gtk_widget_show(rp->wprogram);
|
||||
|
||||
rp->wversion = gtk_label_new("0");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), rp->wversion, 1, num_progs, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), rp->wversion, 1, num_progs, 1, 1);
|
||||
gtk_widget_show(rp->wversion);
|
||||
|
||||
rp->wnum = gtk_label_new("0");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), rp->wnum, 2, num_progs, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), rp->wnum, 2, num_progs, 1, 1);
|
||||
gtk_widget_show(rp->wnum);
|
||||
|
||||
rp->wmin = gtk_label_new("0");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), rp->wmin, 3, num_progs, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), rp->wmin, 3, num_progs, 1, 1);
|
||||
gtk_widget_show(rp->wmin);
|
||||
|
||||
rp->wmax = gtk_label_new("0");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), rp->wmax, 4, num_progs, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), rp->wmax, 4, num_progs, 1, 1);
|
||||
gtk_widget_show(rp->wmax);
|
||||
|
||||
rp->wavg = gtk_label_new("0");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), rp->wavg, 5, num_progs, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), rp->wavg, 5, num_progs, 1, 1);
|
||||
gtk_widget_show(rp->wavg);
|
||||
|
||||
rp->num = 0;
|
||||
|
|
|
@ -693,25 +693,25 @@ sctp_chunk_dlg(struct sctp_udata *u_data)
|
|||
|
||||
label = gtk_label_new("ChunkType");
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
label = gtk_label_new("Association");
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
label = gtk_label_new("Endpoint 1");
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
label = gtk_label_new("Endpoint 2");
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
row ++;
|
||||
label = gtk_label_new("");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
label = gtk_label_new("");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
label = gtk_label_new("");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
label = gtk_label_new("");
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
row ++;
|
||||
|
||||
for (i=0; i<NUM_CHUNKS; i++)
|
||||
|
@ -720,38 +720,38 @@ sctp_chunk_dlg(struct sctp_udata *u_data)
|
|||
{
|
||||
label = gtk_label_new(chunk_name(i));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
g_snprintf(label_txt, 10, "%u", selected_stream->chunk_count[i]);
|
||||
label = gtk_label_new(label_txt);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
g_snprintf(label_txt, 10, "%u", selected_stream->ep1_chunk_count[i]);
|
||||
label = gtk_label_new(label_txt);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
g_snprintf(label_txt, 10, "%u", selected_stream->ep2_chunk_count[i]);
|
||||
label = gtk_label_new(label_txt);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
row ++;
|
||||
}
|
||||
}
|
||||
|
||||
label = gtk_label_new("Others");
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, row, 1, 1);
|
||||
g_snprintf(label_txt, 10, "%u", selected_stream->chunk_count[OTHER_CHUNKS_INDEX]);
|
||||
label = gtk_label_new(label_txt);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1);
|
||||
g_snprintf(label_txt, 10, "%u", selected_stream->ep1_chunk_count[OTHER_CHUNKS_INDEX]);
|
||||
label = gtk_label_new(label_txt);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1);
|
||||
g_snprintf(label_txt, 10, "%u", selected_stream->ep2_chunk_count[OTHER_CHUNKS_INDEX]);
|
||||
label = gtk_label_new(label_txt);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
|
||||
ws_gtk_grid_attach(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1);
|
||||
|
||||
h_button_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_box_pack_start(GTK_BOX(main_vb), h_button_box, FALSE, FALSE, 0);
|
||||
|
|
|
@ -305,7 +305,7 @@ sip_draw_hash_responses(gint *key _U_ , sip_response_code_t *data, gchar *unused
|
|||
tmp = gtk_label_new(string_buff);
|
||||
|
||||
/* Insert the label in the correct place in the table */
|
||||
ws_gtk_grid_attach(GTK_GRID(data->table_info->grid), tmp, 0, x, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(data->table_info->grid), tmp, 0, x, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT);
|
||||
gtk_widget_show(tmp);
|
||||
|
||||
|
@ -314,7 +314,7 @@ sip_draw_hash_responses(gint *key _U_ , sip_response_code_t *data, gchar *unused
|
|||
data->widget = gtk_label_new(string_buff);
|
||||
|
||||
/* Show this widget in the right place */
|
||||
ws_gtk_grid_attach(GTK_GRID(data->table_info->grid), data->widget, 1, x, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(data->table_info->grid), data->widget, 1, x, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(data->widget), GTK_JUSTIFY_RIGHT);
|
||||
gtk_widget_show(data->widget);
|
||||
|
||||
|
|
|
@ -94,13 +94,13 @@ wsp_draw_statuscode(gchar *key _U_, wsp_status_code_t *data, gchar *unused _U_)
|
|||
/* Maybe we should display the hexadecimal value ? */
|
||||
/* g_snprintf(string_buff, sizeof(string_buff), "%s (0X%x)", data->name, *key); */
|
||||
tmp = gtk_label_new(data->name /* string_buff */ );
|
||||
ws_gtk_grid_attach(GTK_GRID(data->sp->grid_status_code), tmp, x, y, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(data->sp->grid_status_code), tmp, x, y, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT);
|
||||
gtk_widget_show(tmp);
|
||||
|
||||
g_snprintf(string_buff, sizeof(string_buff), "%9d", data->packets);
|
||||
data->widget = gtk_label_new(string_buff);
|
||||
ws_gtk_grid_attach(GTK_GRID(data->sp->grid_status_code), data->widget, x+1, y, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(data->sp->grid_status_code), data->widget, x+1, y, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(data->widget), GTK_JUSTIFY_LEFT);
|
||||
gtk_widget_show(data->widget);
|
||||
|
||||
|
@ -231,7 +231,7 @@ add_table_entry(wspstat_t *sp, const char *str, int x, int y, int idx)
|
|||
GtkWidget *tmp;
|
||||
|
||||
tmp = gtk_label_new(str);
|
||||
ws_gtk_grid_attach(GTK_GRID(sp->grid_pdu_types), tmp, x, y, 1, 1);
|
||||
ws_gtk_grid_attach_defaults(GTK_GRID(sp->grid_pdu_types), tmp, x, y, 1, 1);
|
||||
gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT);
|
||||
gtk_widget_show(tmp);
|
||||
if (idx != 0) {
|
||||
|
|
Loading…
Reference in New Issue