Use zenity for selecting mesh blog options
This commit is contained in:
parent
dab37d1d22
commit
7cb7225c2f
|
@ -222,29 +222,18 @@ function change_theme {
|
||||||
}
|
}
|
||||||
|
|
||||||
function menu_blog {
|
function menu_blog {
|
||||||
data=$(tempfile 2>/dev/null)
|
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)
|
||||||
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
|
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
255) exit 1;;
|
255) exit 1;;
|
||||||
esac
|
esac
|
||||||
case $(cat $data) in
|
case $data in
|
||||||
1) view_blog;;
|
1) view_blog;;
|
||||||
2) new_blog;;
|
2) new_blog;;
|
||||||
3) edit_blog;;
|
3) edit_blog;;
|
||||||
4) delete_blog;;
|
4) delete_blog;;
|
||||||
5) change_theme;;
|
5) change_theme;;
|
||||||
6) break;;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue