diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-06-30 14:55:19 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-07-01 02:10:22 +0000 |
commit | 5cf7fcdf0f62cf0d8617428141a26e6f280a45d0 (patch) | |
tree | 104b76a624fe278c5db96591e97d26912f64f5ea /ui/gtk/main_menubar.c | |
parent | f860e8de525d721d6678896fc9ef415ea68e2ead (diff) |
Qt+Gtk: Fix the -t command line flag.
Add the time format to commandline_param_info_t and apply it when we've
finished application initialization.
Bug: 12489
Change-Id: Ice626198a610567e945a8e53c0c1093797e8208e
Reviewed-on: https://code.wireshark.org/review/16232
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/gtk/main_menubar.c')
-rw-r--r-- | ui/gtk/main_menubar.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c index 9ad082c547..3b6035e519 100644 --- a/ui/gtk/main_menubar.c +++ b/ui/gtk/main_menubar.c @@ -38,6 +38,7 @@ #include "globals.h" #include <epan/color_filters.h> +#include "ui/commandline.h" #include "ui/main_statusbar.h" #include "ui/preference_utils.h" #include "ui/recent.h" @@ -3173,6 +3174,9 @@ menus_init(void) G_N_ELEMENTS(main_menu_bar_toggle_action_entries), /* the number of entries */ NULL); /* data to pass to the action callbacks */ + if (global_commandline_info.time_format != TS_NOT_SET) { + recent.gui_time_format = global_commandline_info.time_format; + } gtk_action_group_add_radio_actions (main_menu_bar_action_group, /* the action group */ main_menu_bar_radio_view_time_entries, /* an array of radio action descriptions */ G_N_ELEMENTS(main_menu_bar_radio_view_time_entries), /* the number of entries */ @@ -4248,9 +4252,9 @@ menu_recent_read_finished(void) #endif main_widgets_rearrange(); - /* don't change the time format, if we had a command line value */ - if (timestamp_get_type() != TS_NOT_SET) { - recent.gui_time_format = timestamp_get_type(); + /* Update the time format if we had a command line value. */ + if (global_commandline_info.time_format != TS_NOT_SET) { + recent.gui_time_format = global_commandline_info.time_format; } /* XXX Fix me */ |