diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-12-30 19:33:05 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-12-30 19:33:05 +0000 |
commit | 4ca47864db302c67baaccc6de20c974753ec60e5 (patch) | |
tree | 2c709c645c5d5f13cab446e4337a35df004122a8 /ui/gtk/profile_dlg.c | |
parent | af2b925604c272b2e348e8a1db60d0550961176b (diff) |
Move profile deletion code from profile_dlg.c to profile.c. Add left
mouse and context (right mouse) signals to label stacks and use them to
pop up profile menus in the status bar. Add profile actions (manage,
new, edit, delete) to the profile dialog.
svn path=/trunk/; revision=46863
Diffstat (limited to 'ui/gtk/profile_dlg.c')
-rw-r--r-- | ui/gtk/profile_dlg.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/ui/gtk/profile_dlg.c b/ui/gtk/profile_dlg.c index f8fea7fc12..9d5abb149b 100644 --- a/ui/gtk/profile_dlg.c +++ b/ui/gtk/profile_dlg.c @@ -971,19 +971,8 @@ profile_new_cb (GtkWidget *w _U_, gpointer data _U_) void profile_delete_cb (GtkWidget *w _U_, gpointer data _U_) { - const gchar *name = get_profile_name(); - char *pf_dir_path; - - if (profile_exists(name, FALSE) && strcmp (name, DEFAULT_PROFILE) != 0) { - if (delete_persconffile_profile(name, &pf_dir_path) == -1) { - simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, - "Can't delete profile directory\n\"%s\":\n%s.", - pf_dir_path, g_strerror(errno)); - - g_free(pf_dir_path); - } - - /* Change to the default profile */ + if (delete_current_profile()) { + /* Change to the default profile (we have to do this ourselves). */ change_configuration_profile (NULL); } } |