diff --git a/src/freedombone-mesh-blog b/src/freedombone-mesh-blog index 62c67f90..4aac2630 100755 --- a/src/freedombone-mesh-blog +++ b/src/freedombone-mesh-blog @@ -222,29 +222,18 @@ function change_theme { } function menu_blog { - data=$(tempfile 2>/dev/null) - trap "rm -f $data" 0 1 2 5 15 - dialog --backtitle $"Freedombone Mesh" \ - --title $"Blogging" \ - --radiolist $"Choose an operation:" 19 50 12 \ - 1 $"View a blog" on \ - 2 $"New blog entry" off \ - 3 $"Edit the previous blog entry" off \ - 4 $"Delete the previous blog entry" off \ - 5 $"Change theme" off \ - 6 $"Exit" off 2> $data + data=$(zenity --list 1 $"View a blog" 2 $"New blog entry" 3 $"Edit the previous blog entry" 4 $"Delete the previous blog entry" 5 $"Change theme" --column="id" --title $"Blogging" --column=$"Choose an operation:" --hide-column=1 --print-column=1 --height=250) sel=$? case $sel in 1) exit 1;; 255) exit 1;; esac - case $(cat $data) in + case $data in 1) view_blog;; 2) new_blog;; 3) edit_blog;; 4) delete_blog;; 5) change_theme;; - 6) break;; esac }