Fix a couple of tooltips.

svn path=/trunk/; revision=37975
This commit is contained in:
Anders Broman 2011-07-11 19:34:57 +00:00
parent 5467d67f2a
commit 3a35b7229c
3 changed files with 9 additions and 34 deletions

View File

@ -129,11 +129,6 @@ capture_options *capture_opts)
gchar *title_iface;
gchar *descr;
GString *str;
#if !GTK_CHECK_VERSION(2,14,0)
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
#endif
info = g_malloc0(sizeof(capture_info_ui_t));
info->counts[0].title = "Total";
@ -300,11 +295,7 @@ capture_options *capture_opts)
g_signal_connect(info->cap_w, "delete_event", G_CALLBACK(capture_info_delete_cb), capture_opts);
ci_help = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
#if GTK_CHECK_VERSION(2,14,0)
gtk_widget_set_tooltip_text(ci_help, "Get help about this dialog");
#else
gtk_tooltips_set_tip (tooltips, ci_help, ("Get help about this dialog"), NULL);
#endif
g_signal_connect(ci_help, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_CAPTURE_INFO_DIALOG);
gtk_widget_show(info->cap_w);

View File

@ -1738,7 +1738,6 @@ decode_as_cb (GtkWidget * w _U_, gpointer user_data _U_)
{
GtkWidget *main_vb, *format_hb, *bbox, *ok_bt, *close_bt, *help_bt, *button;
GtkWidget *button_vb, *apply_bt;
GtkTooltips *tooltips = gtk_tooltips_new();
if (decode_w != NULL) {
/* There's already a "Decode As" dialog box; reactivate it. */
@ -1771,8 +1770,7 @@ decode_as_cb (GtkWidget * w _U_, gpointer user_data _U_)
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
#endif
gtk_box_pack_start(GTK_BOX(button_vb), button, FALSE, FALSE, 0);
gtk_tooltips_set_tip(tooltips, button,
"Open a dialog showing the current settings.", NULL);
gtk_widget_set_tooltip_text(button, "Open a dialog showing the current settings.");
button = gtk_button_new_from_stock(GTK_STOCK_CLEAR);
g_signal_connect(button, "clicked", G_CALLBACK(decode_clear_cb), NULL);
@ -1782,8 +1780,7 @@ decode_as_cb (GtkWidget * w _U_, gpointer user_data _U_)
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
#endif
gtk_box_pack_start(GTK_BOX(button_vb), button, FALSE, FALSE, 0);
gtk_tooltips_set_tip(tooltips, button,
"Clear ALL settings.", NULL);
gtk_widget_set_tooltip_text(button, "Clear ALL settings.");
decode_add_notebook(format_hb);
@ -1794,19 +1791,16 @@ decode_as_cb (GtkWidget * w _U_, gpointer user_data _U_)
ok_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK);
g_signal_connect(ok_bt, "clicked", G_CALLBACK(decode_ok_cb), decode_w);
gtk_tooltips_set_tip(tooltips, ok_bt,
"Apply current setting, close dialog and redissect packets.", NULL);
gtk_widget_set_tooltip_text(ok_bt, "Apply current setting, close dialog and redissect packets.");
apply_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_APPLY);
g_signal_connect(apply_bt, "clicked", G_CALLBACK(decode_apply_cb), decode_w);
gtk_tooltips_set_tip(tooltips, apply_bt,
"Apply current setting, redissect packets and keep dialog open.", NULL);
gtk_widget_set_tooltip_text(apply_bt, "Apply current setting, redissect packets and keep dialog open.");
close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE);
window_set_cancel_button(decode_w, close_bt, NULL);
g_signal_connect(close_bt, "clicked", G_CALLBACK(decode_close_cb), decode_w);
gtk_tooltips_set_tip(tooltips, close_bt,
"Close the dialog, don't redissect packets.", NULL);
gtk_widget_set_tooltip_text(close_bt, "Close the dialog, don't redissect packets.");
help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_DECODE_AS_DIALOG);

View File

@ -400,7 +400,6 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
GtkWidget *vbox, *bbox, *help_bt, *cancel_bt, *save_bt, *save_all_bt;
GtkTooltips *button_bar_tips;
GString *error_msg;
export_object_list_t *object_list;
gchar *window_title;
@ -426,8 +425,6 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
}
/* Setup our GUI window */
button_bar_tips = gtk_tooltips_new();
window_title = g_strdup_printf("Wireshark: %s object list", name);
object_list->dlg = dlg_window_new(window_title);
g_free(window_title);
@ -513,29 +510,22 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_
/* Help button */
help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_EXPORT_OBJECT_LIST);
gtk_tooltips_set_tip(GTK_TOOLTIPS(button_bar_tips), help_bt,
"Show help for this dialog.", NULL);
gtk_widget_set_tooltip_text(help_bt, "Show help for this dialog.");
/* Save All button */
save_all_bt = g_object_get_data(G_OBJECT(bbox), WIRESHARK_STOCK_SAVE_ALL);
g_signal_connect(save_all_bt, "clicked", G_CALLBACK(eo_save_all_clicked_cb),
object_list);
gtk_tooltips_set_tip(GTK_TOOLTIPS(button_bar_tips), save_all_bt,
"Save all listed objects with their displayed "
"filenames.", NULL);
gtk_widget_set_tooltip_text(save_all_bt, "Save all listed objects with their displayed filenames.");
/* Save As button */
save_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_SAVE_AS);
g_signal_connect(save_bt, "clicked", G_CALLBACK(eo_save_clicked_cb), object_list);
gtk_tooltips_set_tip(GTK_TOOLTIPS(button_bar_tips), save_bt,
"Saves the currently selected content to a file.",
NULL);
gtk_widget_set_tooltip_text(save_bt, "Saves the currently selected content to a file.");
/* Cancel button */
cancel_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL);
gtk_tooltips_set_tip(GTK_TOOLTIPS(button_bar_tips), cancel_bt,
"Cancel this dialog.", NULL);
gtk_widget_set_tooltip_text(cancel_bt, "Cancel this dialog.");
/* Pack the buttons into the "button box" */
gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);